diff options
author | bors-servo <release+servo@mozilla.com> | 2013-10-24 09:15:55 -0700 |
---|---|---|
committer | bors-servo <release+servo@mozilla.com> | 2013-10-24 09:15:55 -0700 |
commit | 13644ccab1942c053c3fd5e4a19bb75d9ebe8739 (patch) | |
tree | 38d66cafb51053d5c5d7304521e8948a828f1ca7 /src/components/script/dom/bindings/node.rs | |
parent | a9e23299395b59edbf8bd0a65f7a088cb03fda76 (diff) | |
parent | 4e47d59165d186d0938fe9ffd726b2c1b83d50f4 (diff) | |
download | servo-13644ccab1942c053c3fd5e4a19bb75d9ebe8739.tar.gz servo-13644ccab1942c053c3fd5e4a19bb75d9ebe8739.zip |
auto merge of #1079 : jdm/servo/docnode, r=jdm,metajack
The bit I don't like about these changes is that I ended up hiding the document node from the CSS selecting/matching code, so it continues thinking of the document's first child as the root. When I tried to send the full tree including the document node to layout, the layout code refused to create any child flows. When I sent the document's first child without hiding the document, it saw inherited values for properties like font-family, and later tried to treat the document node as an Element when searching for named nodes.
Diffstat (limited to 'src/components/script/dom/bindings/node.rs')
-rw-r--r-- | src/components/script/dom/bindings/node.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/script/dom/bindings/node.rs b/src/components/script/dom/bindings/node.rs index 5adf545f14c..e2d10ec6387 100644 --- a/src/components/script/dom/bindings/node.rs +++ b/src/components/script/dom/bindings/node.rs @@ -3,10 +3,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::utils::{Reflectable, Reflector, Traceable}; +use dom::document::{PlainDocumentTypeId, HTMLDocumentTypeId}; use dom::element::*; use dom::types::*; use dom::node::{AbstractNode, ElementNodeTypeId, TextNodeTypeId, CommentNodeTypeId}; -use dom::node::{DoctypeNodeTypeId, DocumentFragmentNodeTypeId, ScriptView}; +use dom::node::{DoctypeNodeTypeId, DocumentFragmentNodeTypeId, ScriptView, DocumentNodeTypeId}; use std::cast; use std::libc; @@ -95,6 +96,8 @@ pub fn create(cx: *JSContext, node: &mut AbstractNode<ScriptView>) -> *JSObject CommentNodeTypeId => generate_element!(Comment), DoctypeNodeTypeId => generate_element!(DocumentType), DocumentFragmentNodeTypeId => generate_element!(DocumentFragment), + DocumentNodeTypeId(PlainDocumentTypeId) => generate_element!(Document), + DocumentNodeTypeId(HTMLDocumentTypeId) => generate_element!(HTMLDocument), TextNodeTypeId => generate_element!(Text), } } |