diff options
Diffstat (limited to 'src/components/script')
-rw-r--r-- | src/components/script/dom/bindings/codegen/HTMLDocument.webidl | 2 | ||||
-rw-r--r-- | src/components/script/dom/document.rs | 3 | ||||
-rw-r--r-- | src/components/script/dom/htmldocument.rs | 8 |
3 files changed, 3 insertions, 10 deletions
diff --git a/src/components/script/dom/bindings/codegen/HTMLDocument.webidl b/src/components/script/dom/bindings/codegen/HTMLDocument.webidl index bb209a20bf9..f735e4f5326 100644 --- a/src/components/script/dom/bindings/codegen/HTMLDocument.webidl +++ b/src/components/script/dom/bindings/codegen/HTMLDocument.webidl @@ -17,7 +17,7 @@ interface HTMLDocument : Document { // getter object (DOMString name); /*[SetterThrows] attribute HTMLElement? body;*/ - readonly attribute HTMLHeadElement? head; + // readonly attribute HTMLHeadElement? head; readonly attribute HTMLCollection images; readonly attribute HTMLCollection embeds; readonly attribute HTMLCollection plugins; diff --git a/src/components/script/dom/document.rs b/src/components/script/dom/document.rs index c22884ca07d..be4a8f06330 100644 --- a/src/components/script/dom/document.rs +++ b/src/components/script/dom/document.rs @@ -306,12 +306,13 @@ impl Document { // http://www.whatwg.org/specs/web-apps/current-work/#dom-document-head pub fn GetHead(&self) -> Option<AbstractNode> { self.get_html_element().and_then(|root| { - root.traverse_preorder().find(|child| { + root.children().find(|child| { child.type_id() == ElementNodeTypeId(HTMLHeadElementTypeId) }) }) } + // http://www.whatwg.org/specs/web-apps/current-work/#dom-document-body pub fn GetBody(&self, _: AbstractDocument) -> Option<AbstractNode> { match self.get_html_element() { None => None, diff --git a/src/components/script/dom/htmldocument.rs b/src/components/script/dom/htmldocument.rs index 57a5c96b7bd..27b5969458e 100644 --- a/src/components/script/dom/htmldocument.rs +++ b/src/components/script/dom/htmldocument.rs @@ -33,14 +33,6 @@ impl HTMLDocument { } impl HTMLDocument { - pub fn GetHead(&self) -> Option<AbstractNode> { - self.parent.GetDocumentElement().and_then(|root| { - root.traverse_preorder().find(|child| { - child.type_id() == ElementNodeTypeId(HTMLHeadElementTypeId) - }) - }) - } - pub fn Images(&self) -> @mut HTMLCollection { self.parent.createHTMLCollection(|elem| eq_slice(elem.tag_name, "img")) } |