Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Unified Diff: core/dom/Element.idl

Issue 1660113002: Updated to Chrome 45 (2454) moved from SVN to git. Base URL: https://github.com/dart-lang/webcore.git@roll_45
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/dom/DocumentType.idl ('k') | core/dom/ElementFullscreen.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/dom/Element.idl
diff --git a/core/dom/Element.idl b/core/dom/Element.idl
index 688db840e6f3bac54291edda62a78a778c6c2918..2d0574cfa815845e8441d21b7fbdeb810a129890 100644
--- a/core/dom/Element.idl
+++ b/core/dom/Element.idl
@@ -18,103 +18,101 @@
* Boston, MA 02110-1301, USA.
*/
+// https://dom.spec.whatwg.org/#interface-element
+
[
- SpecialWrapFor=(HTMLElement,SVGElement),
+ TypeChecking=Interface,
] interface Element : Node {
+ readonly attribute DOMString? namespaceURI;
+ readonly attribute DOMString? prefix;
+ readonly attribute DOMString localName;
+ readonly attribute DOMString tagName;
- // DOM Level 1 Core
-
- readonly attribute DOMString? tagName;
-
- [DartNoAutoScope] DOMString? getAttribute(DOMString name);
- [RaisesException, CustomElementCallbacks, DartNoAutoScope] void setAttribute(DOMString name, DOMString value);
- [CustomElementCallbacks] void removeAttribute(DOMString name);
- [MeasureAs=ElementGetAttributeNode] Attr getAttributeNode([Default=Undefined] optional DOMString name); // Removed from DOM4.
- [RaisesException, CustomElementCallbacks, MeasureAs=ElementSetAttributeNode] Attr setAttributeNode([Default=Undefined] optional Attr newAttr); // Removed from DOM4.
- [RaisesException, CustomElementCallbacks, MeasureAs=ElementRemoveAttributeNode] Attr removeAttributeNode([Default=Undefined] optional Attr oldAttr); // Removed from DOM4.
- HTMLCollection getElementsByTagName(DOMString name);
+ [Reflect] attribute DOMString id;
+ [Reflect=class] attribute DOMString className;
+ [SameObject, PerWorldBindings] readonly attribute DOMTokenList classList;
- [PerWorldBindings, ImplementedAs=attributesForBindings] readonly attribute NamedNodeMap attributes;
[MeasureAs=HasAttributes] boolean hasAttributes();
-
- // DOM Level 2 Core
-
- [DartNoAutoScope] DOMString? getAttributeNS(DOMString? namespaceURI, DOMString localName);
- [RaisesException, CustomElementCallbacks, DartNoAutoScope] void setAttributeNS(DOMString? namespaceURI, DOMString qualifiedName, DOMString value);
+ [SameObject, PerWorldBindings, ImplementedAs=attributesForBindings] readonly attribute NamedNodeMap attributes;
+ DOMString? getAttribute(DOMString name);
+ DOMString? getAttributeNS(DOMString? namespaceURI, DOMString localName);
+ [RaisesException, CustomElementCallbacks] void setAttribute(DOMString name, DOMString value);
+ [RaisesException, CustomElementCallbacks] void setAttributeNS(DOMString? namespaceURI, DOMString name, DOMString value);
+ [CustomElementCallbacks] void removeAttribute(DOMString name);
[CustomElementCallbacks] void removeAttributeNS(DOMString? namespaceURI, DOMString localName);
- HTMLCollection getElementsByTagNameNS(DOMString? namespaceURI, DOMString localName);
- [MeasureAs=ElementGetAttributeNodeNS] Attr getAttributeNodeNS([Default=Undefined] optional DOMString? namespaceURI,
- [Default=Undefined] optional DOMString localName); // Removed from DOM4.
- [RaisesException, CustomElementCallbacks, DeprecateAs=ElementSetAttributeNodeNS] Attr setAttributeNodeNS([Default=Undefined] optional Attr newAttr); // Removed from DOM4.
boolean hasAttribute(DOMString name);
boolean hasAttributeNS(DOMString? namespaceURI, DOMString localName);
- [PerWorldBindings] readonly attribute CSSStyleDeclaration style;
-
- // DOM4
- [Reflect, DartNoAutoScope] attribute DOMString id;
- readonly attribute DOMString? namespaceURI;
- [RaisesException=Setter] attribute DOMString? prefix;
- [DartCustom] readonly attribute DOMString? localName;
+ [MeasureAs=ElementGetAttributeNode] Attr? getAttributeNode(DOMString name);
+ [MeasureAs=ElementGetAttributeNodeNS] Attr? getAttributeNodeNS(DOMString? namespaceURI, DOMString localName);
+ [RaisesException, CustomElementCallbacks, MeasureAs=ElementSetAttributeNode] Attr? setAttributeNode(Attr attr);
+ [RaisesException, CustomElementCallbacks, MeasureAs=ElementSetAttributeNodeNS] Attr? setAttributeNodeNS(Attr attr);
+ [RaisesException, CustomElementCallbacks, MeasureAs=ElementRemoveAttributeNode] Attr removeAttributeNode(Attr attr);
+ [RaisesException] Element? closest(DOMString selectors);
[RaisesException] boolean matches(DOMString selectors);
- // Common extensions
-
- readonly attribute long offsetLeft;
- readonly attribute long offsetTop;
- readonly attribute long offsetWidth;
- readonly attribute long offsetHeight;
- [ImplementedAs=offsetParentForBindings, PerWorldBindings] readonly attribute Element offsetParent;
- readonly attribute long clientLeft;
- readonly attribute long clientTop;
- readonly attribute long clientWidth;
- readonly attribute long clientHeight;
-
- // FIXME: should be:
- // attribute (Dictionary or double) scrollLeft;
- // attribute (Dictionary or double) scrollTop;
- // http://crbug.com/240176
- [Custom=Setter] attribute double scrollLeft;
- [Custom=Setter] attribute double scrollTop;
- readonly attribute long scrollWidth;
- readonly attribute long scrollHeight;
-
- void focus();
- void blur();
- void scrollIntoView(optional boolean alignWithTop);
-
- // WebKit extensions
-
- [MeasureAs=ElementScrollIntoViewIfNeeded] void scrollIntoViewIfNeeded(optional boolean centerIfNeeded);
-
- // HTML 5
+ HTMLCollection getElementsByTagName(DOMString localName);
+ HTMLCollection getElementsByTagNameNS(DOMString? namespaceURI, DOMString localName);
HTMLCollection getElementsByClassName(DOMString classNames);
+
+ // DOM Parsing and Serialization
+ // https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#extensions-to-the-element-interface
[TreatNullAs=NullString, CustomElementCallbacks, RaisesException=Setter] attribute DOMString innerHTML;
[TreatNullAs=NullString, CustomElementCallbacks, RaisesException=Setter] attribute DOMString outerHTML;
+ [CustomElementCallbacks, RaisesException, MeasureAs=InsertAdjacentHTML] void insertAdjacentHTML(DOMString position, DOMString text);
- [RaisesException, CustomElementCallbacks, MeasureAs=InsertAdjacentElement] Element insertAdjacentElement(DOMString where, Element element);
- [RaisesException, MeasureAs=InsertAdjacentText] void insertAdjacentText(DOMString where, DOMString text);
- [CustomElementCallbacks, RaisesException, MeasureAs=InsertAdjacentHTML] void insertAdjacentHTML(DOMString where, DOMString html);
-
- [Reflect=class] attribute DOMString className;
- [PerWorldBindings] readonly attribute DOMTokenList classList;
-
- [PerWorldBindings] readonly attribute DOMStringMap dataset;
-
- // WebKit extension
- [RaisesException, ImplementedAs=matches, MeasureAs=ElementPrefixedMatchesSelector] boolean webkitMatchesSelector(DOMString selectors);
-
- // Shadow DOM API
- [RaisesException, MeasureAs=ElementCreateShadowRoot] ShadowRoot createShadowRoot();
- [PerWorldBindings] readonly attribute ShadowRoot shadowRoot;
+ // Shadow DOM
+ // http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-element-interface
+ [RaisesException, CallWith=ScriptState, MeasureAs=ElementCreateShadowRoot] ShadowRoot createShadowRoot();
+ [RuntimeEnabled=CreateShadowRootWithParameter, RaisesException, CallWith=ScriptState, MeasureAs=ElementCreateShadowRoot] ShadowRoot createShadowRoot(ShadowRootInit shadowRootInitDict);
NodeList getDestinationInsertionPoints();
+ [PerWorldBindings] readonly attribute ShadowRoot? shadowRoot;
+
+ // Pointer Lock
+ // https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#extensions-to-the-element-interface
+ [MeasureAs=ElementRequestPointerLock] void requestPointerLock();
- // CSSOM View Module API
+ // CSSOM View Module
+ // http://dev.w3.org/csswg/cssom-view/#extension-to-the-element-interface
+ // FIXME: getClientRect() and getBoundingClientRect() should
+ // return DOMRectList and DOMRect respectively.
ClientRectList getClientRects();
ClientRect getBoundingClientRect();
+ // FIXME: scrollIntoView() should have a ScrollIntoViewOptions dictionary argument.
+ void scrollIntoView(optional boolean alignWithTop);
+ [RuntimeEnabled=CSSOMSmoothScroll, ImplementedAs=scrollTo] void scroll(optional ScrollToOptions options);
+ [RuntimeEnabled=CSSOMSmoothScroll, ImplementedAs=scrollTo] void scroll(unrestricted double x, unrestricted double y);
+ [RuntimeEnabled=CSSOMSmoothScroll] void scrollTo(optional ScrollToOptions options);
+ [RuntimeEnabled=CSSOMSmoothScroll] void scrollTo(unrestricted double x, unrestricted double y);
+ [RuntimeEnabled=CSSOMSmoothScroll] void scrollBy(optional ScrollToOptions options);
+ [RuntimeEnabled=CSSOMSmoothScroll] void scrollBy(unrestricted double x, unrestricted double y);
+ attribute unrestricted double scrollTop;
+ attribute unrestricted double scrollLeft;
+ readonly attribute long scrollWidth;
+ readonly attribute long scrollHeight;
+ readonly attribute long clientTop;
+ readonly attribute long clientLeft;
+ readonly attribute long clientWidth;
+ readonly attribute long clientHeight;
+ // http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface
+ // FIXME: offset* should only be on HTMLElement.
+ [MeasureAs=ElementOffsetParent, PerWorldBindings] readonly attribute Element? offsetParent;
+ [MeasureAs=ElementOffsetTop] readonly attribute long offsetTop;
+ [MeasureAs=ElementOffsetLeft] readonly attribute long offsetLeft;
+ [MeasureAs=ElementOffsetWidth] readonly attribute long offsetWidth;
+ [MeasureAs=ElementOffsetHeight] readonly attribute long offsetHeight;
+
+ // Non-standard APIs
+ // https://www.w3.org/Bugs/Public/show_bug.cgi?id=19962
+ [RaisesException, CustomElementCallbacks, MeasureAs=InsertAdjacentElement] Element insertAdjacentElement(DOMString where, Element element);
+ [RaisesException, MeasureAs=InsertAdjacentText] void insertAdjacentText(DOMString where, DOMString text);
+ [MeasureAs=ElementScrollIntoViewIfNeeded] void scrollIntoViewIfNeeded(optional boolean centerIfNeeded);
+ [RaisesException, ImplementedAs=matches, MeasureAs=ElementPrefixedMatchesSelector] boolean webkitMatchesSelector(DOMString selectors);
- [MeasureAs=ElementRequestPointerLock] void requestPointerLock();
+ // Experimental accessibility API
+ [RuntimeEnabled=ComputedAccessibilityInfo] readonly attribute DOMString? computedRole;
+ [RuntimeEnabled=ComputedAccessibilityInfo] readonly attribute DOMString? computedName;
// Event handler attributes
attribute EventHandler onbeforecopy;
@@ -134,3 +132,4 @@
Element implements ParentNode;
Element implements ChildNode;
+Element implements NonDocumentTypeChildNode;
« no previous file with comments | « core/dom/DocumentType.idl ('k') | core/dom/ElementFullscreen.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698