Auto merge of #7601 - nox:cleanup-dom-webidls, r=Ms2ger

Improve DOM interfaces' extended attributes

Some should have been `[SameObject]` instead of `[Constant]`. The rest of the changes are additional `[Constant]` and `[Pure]` extended attributes on many operations.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7601)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-09-19 17:50:22 -06:00
commit 61267cde63
18 changed files with 75 additions and 21 deletions

View file

@ -35,8 +35,9 @@ interface Node : EventTarget {
readonly attribute Node? parentNode;
[Pure]
readonly attribute Element? parentElement;
[Pure]
boolean hasChildNodes();
[Constant]
[SameObject]
readonly attribute NodeList childNodes;
[Pure]
readonly attribute Node? firstChild;
@ -54,6 +55,7 @@ interface Node : EventTarget {
void normalize();
Node cloneNode(optional boolean deep = false);
[Pure]
boolean isEqualNode(Node? node);
const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
@ -62,11 +64,16 @@ interface Node : EventTarget {
const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08;
const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10;
const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
[Pure]
unsigned short compareDocumentPosition(Node other);
[Pure]
boolean contains(Node? other);
[Pure]
DOMString? lookupPrefix(DOMString? namespace);
[Pure]
DOMString? lookupNamespaceURI(DOMString? prefix);
[Pure]
boolean isDefaultNamespace(DOMString? namespace);
[Throws]