Commit c4308a50 authored by lunalu's avatar lunalu Committed by Commit bot

Made Text#assignedSlot and Element#assignedSlot nullable.

Also changed the order of the attributes/methods under Shadow DOM to match the spec.

BUG=662005

Review-Url: https://codereview.chromium.org/2562343002
Cr-Commit-Position: refs/heads/master@{#437873}
parent 6d88a9de
...@@ -34,6 +34,7 @@ interface Element : Node { ...@@ -34,6 +34,7 @@ interface Element : Node {
[CEReactions, Reflect] attribute DOMString id; [CEReactions, Reflect] attribute DOMString id;
[CEReactions, Reflect=class] attribute DOMString className; [CEReactions, Reflect=class] attribute DOMString className;
[SameObject, CEReactions, PerWorldBindings, PutForwards=value] readonly attribute DOMTokenList classList; [SameObject, CEReactions, PerWorldBindings, PutForwards=value] readonly attribute DOMTokenList classList;
[Unscopable, CEReactions, Reflect] attribute DOMString slot;
// PointerEvent // PointerEvent
//https://www.w3.org/TR/pointerevents/#extensions-to-the-element-interface //https://www.w3.org/TR/pointerevents/#extensions-to-the-element-interface
...@@ -67,6 +68,9 @@ interface Element : Node { ...@@ -67,6 +68,9 @@ interface Element : Node {
[RaisesException] boolean matches(DOMString selectors); [RaisesException] boolean matches(DOMString selectors);
[RaisesException, ImplementedAs=matches, MeasureAs=ElementPrefixedMatchesSelector] boolean webkitMatchesSelector(DOMString selectors); // historical alias of .matches [RaisesException, ImplementedAs=matches, MeasureAs=ElementPrefixedMatchesSelector] boolean webkitMatchesSelector(DOMString selectors); // historical alias of .matches
[RaisesException, CallWith=ScriptState, MeasureAs=ElementAttachShadow] ShadowRoot attachShadow(ShadowRootInit shadowRootInitDict);
[PerWorldBindings, ImplementedAs=openShadowRoot] readonly attribute ShadowRoot? shadowRoot;
HTMLCollection getElementsByTagName(DOMString localName); HTMLCollection getElementsByTagName(DOMString localName);
HTMLCollection getElementsByTagNameNS(DOMString? namespaceURI, DOMString localName); HTMLCollection getElementsByTagNameNS(DOMString? namespaceURI, DOMString localName);
HTMLCollection getElementsByClassName(DOMString classNames); HTMLCollection getElementsByClassName(DOMString classNames);
...@@ -74,21 +78,16 @@ interface Element : Node { ...@@ -74,21 +78,16 @@ interface Element : Node {
[RaisesException, CEReactions, CustomElementCallbacks] Element? insertAdjacentElement(DOMString where, Element element); [RaisesException, CEReactions, CustomElementCallbacks] Element? insertAdjacentElement(DOMString where, Element element);
[RaisesException] void insertAdjacentText(DOMString where, DOMString data); [RaisesException] void insertAdjacentText(DOMString where, DOMString data);
// Mixin Slotable
// https://dom.spec.whatwg.org/#mixin-slotable
[ImplementedAs=assignedSlotForBinding] readonly attribute HTMLSlotElement? assignedSlot;
// DOM Parsing and Serialization // DOM Parsing and Serialization
// https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#extensions-to-the-element-interface // https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#extensions-to-the-element-interface
[TreatNullAs=NullString, CEReactions, CustomElementCallbacks, RaisesException=Setter] attribute DOMString innerHTML; [TreatNullAs=NullString, CEReactions, CustomElementCallbacks, RaisesException=Setter] attribute DOMString innerHTML;
[TreatNullAs=NullString, CEReactions, CustomElementCallbacks, RaisesException=Setter] attribute DOMString outerHTML; [TreatNullAs=NullString, CEReactions, CustomElementCallbacks, RaisesException=Setter] attribute DOMString outerHTML;
[CEReactions, CustomElementCallbacks, RaisesException] void insertAdjacentHTML(DOMString position, DOMString text); [CEReactions, CustomElementCallbacks, RaisesException] void insertAdjacentHTML(DOMString position, DOMString text);
// Shadow DOM
// https://w3c.github.io/webcomponents/spec/shadow/#extensions-to-element-interface
[RaisesException, CallWith=ScriptState, MeasureAs=ElementCreateShadowRoot] ShadowRoot createShadowRoot();
[RaisesException, CallWith=ScriptState, MeasureAs=ElementAttachShadow] ShadowRoot attachShadow(ShadowRootInit shadowRootInitDict);
NodeList getDestinationInsertionPoints();
[PerWorldBindings, ImplementedAs=openShadowRoot] readonly attribute ShadowRoot? shadowRoot;
[Unscopable, CEReactions, Reflect] attribute DOMString slot;
[ImplementedAs=assignedSlotForBinding] readonly attribute HTMLSlotElement assignedSlot;
// Pointer Lock // Pointer Lock
// https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#extensions-to-the-element-interface // https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#extensions-to-the-element-interface
[MeasureAs=ElementRequestPointerLock] void requestPointerLock(); [MeasureAs=ElementRequestPointerLock] void requestPointerLock();
...@@ -122,6 +121,8 @@ interface Element : Node { ...@@ -122,6 +121,8 @@ interface Element : Node {
// Non-standard API // Non-standard API
[MeasureAs=ElementScrollIntoViewIfNeeded] void scrollIntoViewIfNeeded(optional boolean centerIfNeeded); [MeasureAs=ElementScrollIntoViewIfNeeded] void scrollIntoViewIfNeeded(optional boolean centerIfNeeded);
[RaisesException, CallWith=ScriptState, MeasureAs=ElementCreateShadowRoot] ShadowRoot createShadowRoot();
NodeList getDestinationInsertionPoints();
// Experimental accessibility API // Experimental accessibility API
[RuntimeEnabled=ComputedAccessibilityInfo] readonly attribute DOMString? computedRole; [RuntimeEnabled=ComputedAccessibilityInfo] readonly attribute DOMString? computedRole;
......
...@@ -26,8 +26,10 @@ ...@@ -26,8 +26,10 @@
[NewObject, DoNotTestNewObject, RaisesException] Text splitText(unsigned long offset); [NewObject, DoNotTestNewObject, RaisesException] Text splitText(unsigned long offset);
[MeasureAs=TextWholeText] readonly attribute DOMString wholeText; [MeasureAs=TextWholeText] readonly attribute DOMString wholeText;
// Shadow DOM // Mixin Slotable
// https://w3c.github.io/webcomponents/spec/shadow/#extensions-to-text-interface // https://dom.spec.whatwg.org/#mixin-slotable
[ImplementedAs=assignedSlotForBinding] readonly attribute HTMLSlotElement? assignedSlot;
// Non-standard API:
NodeList getDestinationInsertionPoints(); NodeList getDestinationInsertionPoints();
[ImplementedAs=assignedSlotForBinding] readonly attribute HTMLSlotElement assignedSlot;
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment