auto merge of #3905 : Ms2ger/servo/prefix-create, r=jdm

This commit is contained in:
bors-servo 2014-11-05 19:27:35 -07:00
commit 45262ec9d2
3 changed files with 4 additions and 14 deletions

View file

@ -83,7 +83,7 @@ pub fn create_element(name: QualName, prefix: Option<DOMString>,
document: JSRef<Document>, creator: ElementCreator) document: JSRef<Document>, creator: ElementCreator)
-> Temporary<Element> { -> Temporary<Element> {
if name.ns != ns!(HTML) { 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( macro_rules! make(

View file

@ -571,14 +571,9 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
_ => {} _ => {}
} }
if ns == ns!(HTML) { let name = QualName::new(ns, Atom::from_slice(local_name_from_qname));
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,
Ok(Element::create(name, prefix_from_qname.map(|s| s.to_string()), self, ScriptCreated))
ScriptCreated))
} else {
Ok(Element::new(local_name_from_qname.to_string(), ns,
prefix_from_qname.map(|s| s.to_string()), self))
}
} }
// http://dom.spec.whatwg.org/#dom-document-createdocumentfragment // http://dom.spec.whatwg.org/#dom-document-createdocumentfragment

View file

@ -1,5 +0,0 @@
[Node-cloneNode.html]
type: testharness
[Prefixed non-HTML element]
expected: FAIL