mirror of
https://github.com/servo/servo.git
synced 2025-06-24 00:54:32 +01:00
auto merge of #4050 : mttr/servo/implement_attr_nodevalue, r=Ms2ger
Fixes #4047, and updates to expect tests that are now passing because of it.
This commit is contained in:
commit
c23bfdf1c5
4 changed files with 23 additions and 14 deletions
|
@ -152,6 +152,14 @@ impl<'a> AttrMethods for JSRef<'a, Attr> {
|
||||||
self.SetValue(value)
|
self.SetValue(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn NodeValue(self) -> DOMString {
|
||||||
|
self.Value()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn SetNodeValue(self, value: DOMString) {
|
||||||
|
self.SetValue(value)
|
||||||
|
}
|
||||||
|
|
||||||
fn Name(self) -> DOMString {
|
fn Name(self) -> DOMString {
|
||||||
self.name.as_slice().to_string()
|
self.name.as_slice().to_string()
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ interface Attr {
|
||||||
readonly attribute DOMString name;
|
readonly attribute DOMString name;
|
||||||
attribute DOMString value;
|
attribute DOMString value;
|
||||||
attribute DOMString textContent; // alias of .value
|
attribute DOMString textContent; // alias of .value
|
||||||
|
attribute DOMString nodeValue; // alias of .value
|
||||||
|
|
||||||
readonly attribute Element? ownerElement;
|
readonly attribute Element? ownerElement;
|
||||||
|
|
||||||
|
|
|
@ -1165,8 +1165,8 @@
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Attr interface: attribute nodeValue]
|
[Attr interface: attribute nodeValue]
|
||||||
expected: FAIL
|
expected: PASS
|
||||||
|
|
||||||
[Attr interface: document.querySelector("[id\]").attributes[0\] must inherit property "nodeValue" with the proper type (5)]
|
[Attr interface: document.querySelector("[id\]").attributes[0\] must inherit property "nodeValue" with the proper type (5)]
|
||||||
expected: FAIL
|
expected: PASS
|
||||||
|
|
||||||
|
|
|
@ -16,38 +16,38 @@
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[setAttribute should not change the order of previously set attributes.]
|
[setAttribute should not change the order of previously set attributes.]
|
||||||
expected: FAIL
|
expected: PASS
|
||||||
|
|
||||||
[setAttribute should set the first attribute with the given name]
|
[setAttribute should set the first attribute with the given name]
|
||||||
expected: FAIL
|
expected: PASS
|
||||||
|
|
||||||
[null and the empty string should result in a null namespace.]
|
[null and the empty string should result in a null namespace.]
|
||||||
expected: FAIL
|
expected: PASS
|
||||||
|
|
||||||
[XML-namespaced attributes don\'t need an xml prefix]
|
[XML-namespaced attributes don\'t need an xml prefix]
|
||||||
expected: FAIL
|
expected: PASS
|
||||||
|
|
||||||
[xmlns should be allowed as local name]
|
[xmlns should be allowed as local name]
|
||||||
expected: FAIL
|
expected: PASS
|
||||||
|
|
||||||
[xmlns should be allowed as prefix in the XMLNS namespace]
|
[xmlns should be allowed as prefix in the XMLNS namespace]
|
||||||
expected: FAIL
|
expected: PASS
|
||||||
|
|
||||||
[xmlns should be allowed as qualified name in the XMLNS namespace]
|
[xmlns should be allowed as qualified name in the XMLNS namespace]
|
||||||
expected: FAIL
|
expected: PASS
|
||||||
|
|
||||||
[Setting the same attribute with another prefix should not change the prefix]
|
[Setting the same attribute with another prefix should not change the prefix]
|
||||||
expected: FAIL
|
expected: PASS
|
||||||
|
|
||||||
[Attributes should work in document fragments.]
|
[Attributes should work in document fragments.]
|
||||||
expected: FAIL
|
expected: PASS
|
||||||
|
|
||||||
[Attribute values should not be parsed.]
|
[Attribute values should not be parsed.]
|
||||||
expected: FAIL
|
expected: PASS
|
||||||
|
|
||||||
[Specified attributes should be accessible.]
|
[Specified attributes should be accessible.]
|
||||||
expected: FAIL
|
expected: PASS
|
||||||
|
|
||||||
[Entities in attributes should have been expanded while parsing.]
|
[Entities in attributes should have been expanded while parsing.]
|
||||||
expected: FAIL
|
expected: PASS
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue