mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-07 11:56:51 +00:00
Bug 835417 part 4. Flag a bunch of DOM getters as [Pure]. r=peterv
This commit is contained in:
parent
fc92b1e7e8
commit
183ebb351b
@ -26,8 +26,10 @@ interface Element : Node {
|
||||
readonly attribute DOMString localName;
|
||||
*/
|
||||
// Not [Constant] because it depends on which document we're in
|
||||
[Pure]
|
||||
readonly attribute DOMString tagName;
|
||||
|
||||
[Pure]
|
||||
attribute DOMString id;
|
||||
/*
|
||||
FIXME Bug 810677 Move className from HTMLElement to Element
|
||||
@ -57,10 +59,15 @@ interface Element : Node {
|
||||
|
||||
[Constant]
|
||||
readonly attribute HTMLCollection children;
|
||||
[Pure]
|
||||
readonly attribute Element? firstElementChild;
|
||||
[Pure]
|
||||
readonly attribute Element? lastElementChild;
|
||||
[Pure]
|
||||
readonly attribute Element? previousElementSibling;
|
||||
[Pure]
|
||||
readonly attribute Element? nextElementSibling;
|
||||
[Pure]
|
||||
readonly attribute unsigned long childElementCount;
|
||||
|
||||
// NEW
|
||||
@ -148,6 +155,7 @@ partial interface Element {
|
||||
|
||||
// scrolling
|
||||
void scrollIntoView(optional boolean top = true);
|
||||
// None of the CSSOM attributes are [Pure], because they flush
|
||||
attribute long scrollTop; // scroll on setting
|
||||
attribute long scrollLeft; // scroll on setting
|
||||
readonly attribute long scrollWidth;
|
||||
|
@ -21,16 +21,16 @@ interface HTMLElement : Element {
|
||||
attribute DOMString title;
|
||||
attribute DOMString lang;
|
||||
// attribute boolean translate;
|
||||
[SetterThrows]
|
||||
[SetterThrows, Pure]
|
||||
attribute DOMString dir;
|
||||
[Constant]
|
||||
readonly attribute DOMStringMap dataset;
|
||||
|
||||
// microdata
|
||||
[SetterThrows]
|
||||
[SetterThrows, Pure]
|
||||
attribute boolean itemScope;
|
||||
[PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemType;
|
||||
[SetterThrows]
|
||||
[SetterThrows, Pure]
|
||||
attribute DOMString itemId;
|
||||
[PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemRef;
|
||||
[PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemProp;
|
||||
@ -40,28 +40,31 @@ interface HTMLElement : Element {
|
||||
attribute any itemValue;
|
||||
|
||||
// user interaction
|
||||
[SetterThrows]
|
||||
[SetterThrows, Pure]
|
||||
attribute boolean hidden;
|
||||
void click();
|
||||
[SetterThrows]
|
||||
[SetterThrows, Pure]
|
||||
attribute long tabIndex;
|
||||
[Throws]
|
||||
void focus();
|
||||
[Throws]
|
||||
void blur();
|
||||
[SetterThrows]
|
||||
[SetterThrows, Pure]
|
||||
attribute DOMString accessKey;
|
||||
[Pure]
|
||||
readonly attribute DOMString accessKeyLabel;
|
||||
[SetterThrows]
|
||||
[SetterThrows, Pure]
|
||||
attribute boolean draggable;
|
||||
//[PutForwards=value] readonly attribute DOMSettableTokenList dropzone;
|
||||
[SetterThrows]
|
||||
[SetterThrows, Pure]
|
||||
attribute DOMString contentEditable;
|
||||
[Pure]
|
||||
readonly attribute boolean isContentEditable;
|
||||
[Pure]
|
||||
readonly attribute HTMLMenuElement? contextMenu;
|
||||
//[SetterThrows]
|
||||
// attribute HTMLMenuElement? contextMenu;
|
||||
[SetterThrows]
|
||||
[SetterThrows, Pure]
|
||||
attribute boolean spellcheck;
|
||||
|
||||
// command API
|
||||
@ -103,6 +106,7 @@ interface HTMLElement : Element {
|
||||
|
||||
// http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface
|
||||
partial interface HTMLElement {
|
||||
// CSSOM things are not [Pure] because they can flush
|
||||
readonly attribute Element? offsetParent;
|
||||
readonly attribute long offsetTop;
|
||||
readonly attribute long offsetLeft;
|
||||
|
@ -30,24 +30,33 @@ interface Node : EventTarget {
|
||||
const unsigned short NOTATION_NODE = 12; // historical
|
||||
[Constant]
|
||||
readonly attribute unsigned short nodeType;
|
||||
[Pure]
|
||||
readonly attribute DOMString nodeName;
|
||||
|
||||
[Pure]
|
||||
readonly attribute DOMString? baseURI;
|
||||
|
||||
[Pure]
|
||||
readonly attribute Document? ownerDocument;
|
||||
[Pure]
|
||||
readonly attribute Node? parentNode;
|
||||
[Pure]
|
||||
readonly attribute Element? parentElement;
|
||||
boolean hasChildNodes();
|
||||
[Constant]
|
||||
readonly attribute NodeList childNodes;
|
||||
[Pure]
|
||||
readonly attribute Node? firstChild;
|
||||
[Pure]
|
||||
readonly attribute Node? lastChild;
|
||||
[Pure]
|
||||
readonly attribute Node? previousSibling;
|
||||
[Pure]
|
||||
readonly attribute Node? nextSibling;
|
||||
|
||||
[SetterThrows]
|
||||
[SetterThrows, Pure]
|
||||
attribute DOMString? nodeValue;
|
||||
[SetterThrows]
|
||||
[SetterThrows, Pure]
|
||||
attribute DOMString? textContent;
|
||||
[Throws]
|
||||
Node insertBefore(Node node, Node? child);
|
||||
|
Loading…
Reference in New Issue
Block a user