aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-11-05 23:22:47 +0100
committerMs2ger <ms2ger@gmail.com>2014-11-05 23:22:47 +0100
commitf565e203e49e67847b4789829bc0e013aa981407 (patch)
treea8be39d767db8285e45d70e6d7b57af60fd31152
parenta5e9f97c8fddf754e7df876b8df766f818ab2b51 (diff)
downloadservo-f565e203e49e67847b4789829bc0e013aa981407.tar.gz
servo-f565e203e49e67847b4789829bc0e013aa981407.zip
Remove the manual Element::new call from Document::CreateElementNS.
-rw-r--r--components/script/dom/document.rs11
1 files changed, 3 insertions, 8 deletions
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