diff options
Diffstat (limited to 'src/components/script/dom')
-rw-r--r-- | src/components/script/dom/document.rs | 3 | ||||
-rw-r--r-- | src/components/script/dom/node.rs | 12 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/components/script/dom/document.rs b/src/components/script/dom/document.rs index be08ddac831..81fc5c62fbd 100644 --- a/src/components/script/dom/document.rs +++ b/src/components/script/dom/document.rs @@ -345,7 +345,8 @@ impl<'a> PrivateDocumentHelpers for JSRef<'a, Document> { fn get_html_element(&self) -> Option<Temporary<HTMLHtmlElement>> { 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| { Temporary::from_rooted(HTMLHtmlElementCast::to_ref(&*elem).unwrap()) }) diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs index 22566833057..33a8674d97e 100644 --- a/src/components/script/dom/node.rs +++ b/src/components/script/dom/node.rs @@ -76,25 +76,25 @@ pub struct Node { pub type_id: NodeTypeId, /// The parent of this node. - pub parent_node: Cell<Option<JS<Node>>>, + parent_node: Cell<Option<JS<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. - pub last_child: Cell<Option<JS<Node>>>, + last_child: Cell<Option<JS<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. - pub prev_sibling: Cell<Option<JS<Node>>>, + prev_sibling: Cell<Option<JS<Node>>>, /// The document that this node belongs to. owner_doc: Cell<Option<JS<Document>>>, /// 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. flags: Traceable<RefCell<NodeFlags>>, |