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> { self.GetDocumentElement().root().filtered(|root| { - root.node.type_id == ElementNodeTypeId(HTMLHtmlElementTypeId) + let root: &JSRef = 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>>, + parent_node: Cell>>, /// The first child of this node. - pub first_child: Cell>>, + first_child: Cell>>, /// The last child of this node. - pub last_child: Cell>>, + last_child: Cell>>, /// The next sibling of this node. - pub next_sibling: Cell>>, + next_sibling: Cell>>, /// The previous sibling of this node. - pub prev_sibling: Cell>>, + prev_sibling: Cell>>, /// The document that this node belongs to. owner_doc: Cell>>, /// The live list of children return by .childNodes. - pub child_list: Cell>>, + child_list: Cell>>, /// A bitfield of flags for node items. flags: Traceable>,