mirror of
https://github.com/servo/servo.git
synced 2025-06-24 09:04:33 +01:00
auto merge of #3856 : Ms2ger/servo/tagname, r=Manishearth
format!("{}", atom) yields strings like "Atom('span' type=Inline)", which is not intended here.
This commit is contained in:
commit
7de9ed5fc7
4 changed files with 5 additions and 24 deletions
|
@ -668,7 +668,11 @@ impl<'a> ElementMethods for JSRef<'a, Element> {
|
||||||
// http://dom.spec.whatwg.org/#dom-element-tagname
|
// http://dom.spec.whatwg.org/#dom-element-tagname
|
||||||
fn TagName(self) -> DOMString {
|
fn TagName(self) -> DOMString {
|
||||||
let qualified_name = match self.prefix {
|
let qualified_name = match self.prefix {
|
||||||
Some(ref prefix) => format!("{}:{}", prefix, self.local_name).into_maybe_owned(),
|
Some(ref prefix) => {
|
||||||
|
(format!("{:s}:{:s}",
|
||||||
|
prefix.as_slice(),
|
||||||
|
self.local_name.as_slice())).into_maybe_owned()
|
||||||
|
},
|
||||||
None => self.local_name.as_slice().into_maybe_owned()
|
None => self.local_name.as_slice().into_maybe_owned()
|
||||||
};
|
};
|
||||||
if self.html_element_in_html_document() {
|
if self.html_element_in_html_document() {
|
||||||
|
|
|
@ -9,15 +9,3 @@
|
||||||
[Invalid namespace http://www.w3.org/2000/xmlns/ and QName foo:xmlns]
|
[Invalid namespace http://www.w3.org/2000/xmlns/ and QName foo:xmlns]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Lower-case HTML element with a prefix]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Upper-case HTML element with a prefix]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Lower-case non-HTML element with a prefix]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Upper-case non-HTML element with a prefix]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
[Element-tagName.html]
|
[Element-tagName.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[tagName should upper-case for HTML elements in HTML documents.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[tagName should be updated when changing ownerDocument]
|
[tagName should be updated when changing ownerDocument]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[tagName should not upper-case for SVG elements in HTML documents.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[Node-nodeName.html]
|
|
||||||
type: testharness
|
|
||||||
[For Element nodes, nodeName should return the same as tagName.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue