mirror of
https://github.com/servo/servo.git
synced 2025-07-17 12:23:40 +01:00
auto merge of #3935 : evilpie/servo/master, r=Ms2ger
This commit is contained in:
commit
c311ceea8c
4 changed files with 25 additions and 55 deletions
|
@ -141,6 +141,14 @@ impl<'a> AttrMethods for JSRef<'a, Attr> {
|
||||||
self.set_value(ReplacedAttr, value);
|
self.set_value(ReplacedAttr, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn TextContent(self) -> DOMString {
|
||||||
|
self.Value()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn SetTextContent(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()
|
||||||
}
|
}
|
||||||
|
@ -156,6 +164,14 @@ impl<'a> AttrMethods for JSRef<'a, Attr> {
|
||||||
fn GetPrefix(self) -> Option<DOMString> {
|
fn GetPrefix(self) -> Option<DOMString> {
|
||||||
self.prefix.clone()
|
self.prefix.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn GetOwnerElement(self) -> Option<Temporary<Element>> {
|
||||||
|
Some(Temporary::new(self.owner))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn Specified(self) -> bool {
|
||||||
|
true // Always returns true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait AttrHelpers<'a> {
|
pub trait AttrHelpers<'a> {
|
||||||
|
|
|
@ -9,10 +9,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
interface Attr {
|
interface Attr {
|
||||||
readonly attribute DOMString localName;
|
|
||||||
attribute DOMString value;
|
|
||||||
|
|
||||||
readonly attribute DOMString name;
|
|
||||||
readonly attribute DOMString? namespaceURI;
|
readonly attribute DOMString? namespaceURI;
|
||||||
readonly attribute DOMString? prefix;
|
readonly attribute DOMString? prefix;
|
||||||
|
readonly attribute DOMString localName;
|
||||||
|
readonly attribute DOMString name;
|
||||||
|
attribute DOMString value;
|
||||||
|
attribute DOMString textContent; // alias of .value
|
||||||
|
|
||||||
|
readonly attribute Element? ownerElement;
|
||||||
|
|
||||||
|
readonly attribute boolean specified; // useless; always returns true
|
||||||
};
|
};
|
||||||
|
|
|
@ -504,24 +504,6 @@
|
||||||
[NamedNodeMap interface: operation removeNamedItemNS(DOMString,DOMString)]
|
[NamedNodeMap interface: operation removeNamedItemNS(DOMString,DOMString)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Attr interface: attribute textContent]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Attr interface: attribute ownerElement]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Attr interface: attribute specified]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Attr interface: document.querySelector("[id\]").attributes[0\] must inherit property "textContent" with the proper type (5)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Attr interface: document.querySelector("[id\]").attributes[0\] must inherit property "ownerElement" with the proper type (6)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Attr interface: document.querySelector("[id\]").attributes[0\] must inherit property "specified" with the proper type (7)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CharacterData interface: attribute previousElementSibling]
|
[CharacterData interface: attribute previousElementSibling]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
[attributes.html]
|
[attributes.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[setAttribute should not change the order of previously set attributes.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[setAttribute should set the first attribute with the given name]
|
[AttrExodus]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[setAttribute should set the attribute with the given qualified name]
|
[setAttribute should set the attribute with the given qualified name]
|
||||||
|
@ -12,36 +10,6 @@
|
||||||
[When qualifiedName does not match the QName production, an NAMESPACE_ERR exception is to be thrown.]
|
[When qualifiedName does not match the QName production, an NAMESPACE_ERR exception is to be thrown.]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[null and the empty string should result in a null namespace.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[XML-namespaced attributes don\'t need an xml prefix]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[xmlns should be allowed as local name]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[xmlns should be allowed as prefix in the XMLNS namespace]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[xmlns should be allowed as qualified name in the XMLNS namespace]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Setting the same attribute with another prefix should not change the prefix]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Attributes should work in document fragments.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Attribute values should not be parsed.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Specified attributes should be accessible.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Entities in attributes should have been expanded while parsing.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[First set attribute is returned by getAttribute]
|
[First set attribute is returned by getAttribute]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue