diff options
author | bors-servo <metajack+bors@gmail.com> | 2014-11-05 19:27:35 -0700 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2014-11-05 19:27:35 -0700 |
commit | 45262ec9d212088f2bafa95981099d25eaac77bb (patch) | |
tree | e1ab467f3410d564037ac704d7928449a96d0fb2 | |
parent | 5dae1de2f5226527862a39608f0d7ad217c33b31 (diff) | |
parent | f565e203e49e67847b4789829bc0e013aa981407 (diff) | |
download | servo-45262ec9d212088f2bafa95981099d25eaac77bb.tar.gz servo-45262ec9d212088f2bafa95981099d25eaac77bb.zip |
auto merge of #3905 : Ms2ger/servo/prefix-create, r=jdm
-rw-r--r-- | components/script/dom/create.rs | 2 | ||||
-rw-r--r-- | components/script/dom/document.rs | 11 | ||||
-rw-r--r-- | tests/wpt/metadata/dom/nodes/Node-cloneNode.html.ini | 5 |
3 files changed, 4 insertions, 14 deletions
diff --git a/components/script/dom/create.rs b/components/script/dom/create.rs index 24f04fcbc33..59b6bb756bc 100644 --- a/components/script/dom/create.rs +++ b/components/script/dom/create.rs @@ -83,7 +83,7 @@ pub fn create_element(name: QualName, prefix: Option<DOMString>, document: JSRef<Document>, creator: ElementCreator) -> Temporary<Element> { if name.ns != ns!(HTML) { - return Element::new(name.local.as_slice().to_string(), name.ns, None, document); + return Element::new(name.local.as_slice().to_string(), name.ns, prefix, document); } macro_rules! make( diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index cae7132a14d..527622edad2 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -571,14 +571,9 @@ impl<'a> DocumentMethods for JSRef<'a, Document> { _ => {} } - if ns == ns!(HTML) { - let name = QualName::new(ns!(HTML), Atom::from_slice(local_name_from_qname)); - Ok(Element::create(name, prefix_from_qname.map(|s| s.to_string()), self, - ScriptCreated)) - } else { - Ok(Element::new(local_name_from_qname.to_string(), ns, - prefix_from_qname.map(|s| s.to_string()), self)) - } + let name = QualName::new(ns, Atom::from_slice(local_name_from_qname)); + Ok(Element::create(name, prefix_from_qname.map(|s| s.to_string()), self, + ScriptCreated)) } // http://dom.spec.whatwg.org/#dom-document-createdocumentfragment diff --git a/tests/wpt/metadata/dom/nodes/Node-cloneNode.html.ini b/tests/wpt/metadata/dom/nodes/Node-cloneNode.html.ini deleted file mode 100644 index e8a25099d6e..00000000000 --- a/tests/wpt/metadata/dom/nodes/Node-cloneNode.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[Node-cloneNode.html] - type: testharness - [Prefixed non-HTML element] - expected: FAIL - |