mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
auto merge of #3905 : Ms2ger/servo/prefix-create, r=jdm
This commit is contained in:
commit
45262ec9d2
3 changed files with 4 additions and 14 deletions
|
@ -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(
|
||||
|
|
|
@ -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));
|
||||
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))
|
||||
} 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
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[Node-cloneNode.html]
|
||||
type: testharness
|
||||
[Prefixed non-HTML element]
|
||||
expected: FAIL
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue