mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Make some of Node's members private.
This commit is contained in:
parent
ec6f83077b
commit
ce9e5ae213
2 changed files with 8 additions and 7 deletions
|
@ -345,7 +345,8 @@ impl<'a> PrivateDocumentHelpers for JSRef<'a, Document> {
|
||||||
|
|
||||||
fn get_html_element(&self) -> Option<Temporary<HTMLHtmlElement>> {
|
fn get_html_element(&self) -> Option<Temporary<HTMLHtmlElement>> {
|
||||||
self.GetDocumentElement().root().filtered(|root| {
|
self.GetDocumentElement().root().filtered(|root| {
|
||||||
root.node.type_id == ElementNodeTypeId(HTMLHtmlElementTypeId)
|
let root: &JSRef<Node> = NodeCast::from_ref(&**root);
|
||||||
|
root.type_id() == ElementNodeTypeId(HTMLHtmlElementTypeId)
|
||||||
}).map(|elem| {
|
}).map(|elem| {
|
||||||
Temporary::from_rooted(HTMLHtmlElementCast::to_ref(&*elem).unwrap())
|
Temporary::from_rooted(HTMLHtmlElementCast::to_ref(&*elem).unwrap())
|
||||||
})
|
})
|
||||||
|
|
|
@ -76,25 +76,25 @@ pub struct Node {
|
||||||
pub type_id: NodeTypeId,
|
pub type_id: NodeTypeId,
|
||||||
|
|
||||||
/// The parent of this node.
|
/// The parent of this node.
|
||||||
pub parent_node: Cell<Option<JS<Node>>>,
|
parent_node: Cell<Option<JS<Node>>>,
|
||||||
|
|
||||||
/// The first child of this node.
|
/// The first child of this node.
|
||||||
pub first_child: Cell<Option<JS<Node>>>,
|
first_child: Cell<Option<JS<Node>>>,
|
||||||
|
|
||||||
/// The last child of this node.
|
/// The last child of this node.
|
||||||
pub last_child: Cell<Option<JS<Node>>>,
|
last_child: Cell<Option<JS<Node>>>,
|
||||||
|
|
||||||
/// The next sibling of this node.
|
/// The next sibling of this node.
|
||||||
pub next_sibling: Cell<Option<JS<Node>>>,
|
next_sibling: Cell<Option<JS<Node>>>,
|
||||||
|
|
||||||
/// The previous sibling of this node.
|
/// The previous sibling of this node.
|
||||||
pub prev_sibling: Cell<Option<JS<Node>>>,
|
prev_sibling: Cell<Option<JS<Node>>>,
|
||||||
|
|
||||||
/// The document that this node belongs to.
|
/// The document that this node belongs to.
|
||||||
owner_doc: Cell<Option<JS<Document>>>,
|
owner_doc: Cell<Option<JS<Document>>>,
|
||||||
|
|
||||||
/// The live list of children return by .childNodes.
|
/// The live list of children return by .childNodes.
|
||||||
pub child_list: Cell<Option<JS<NodeList>>>,
|
child_list: Cell<Option<JS<NodeList>>>,
|
||||||
|
|
||||||
/// A bitfield of flags for node items.
|
/// A bitfield of flags for node items.
|
||||||
flags: Traceable<RefCell<NodeFlags>>,
|
flags: Traceable<RefCell<NodeFlags>>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue