auto merge of #3898 : Ms2ger/servo/prefix-clone, r=jdm

The current code calls as_slice() on the Option, yielding &[DOMString], and
then calls to_string, yielding "[prefix]".
This commit is contained in:
bors-servo 2014-11-05 12:57:37 -07:00
commit 76cc006a40
3 changed files with 1 additions and 13 deletions

View file

@ -1516,7 +1516,7 @@ impl Node {
local: element.local_name().clone() local: element.local_name().clone()
}; };
let element = Element::create(name, let element = Element::create(name,
Some(element.prefix().as_slice().to_string()), *document, ScriptCreated); element.prefix().as_ref().map(|p| p.as_slice().to_string()), *document, ScriptCreated);
NodeCast::from_temporary(element) NodeCast::from_temporary(element)
}, },
TextNodeTypeId => { TextNodeTypeId => {

View file

@ -3,9 +3,3 @@
[tagName should be updated when changing ownerDocument] [tagName should be updated when changing ownerDocument]
expected: FAIL expected: FAIL
[tagName should be updated when changing ownerDocument (createDocument without prefix)]
expected: FAIL
[tagName should be updated when changing ownerDocument (createDocument with prefix)]
expected: FAIL

View file

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