Skip to content

Commit 91aca93

Browse files
romandevtabatkins
authored andcommitted
Use Web IDL's new-ish interface mixins concept
WebIDL recently introduced dedicated syntax for mixins [1]. This replaces the existing [NoInterfaceObject] and "implements" syntax with "interface mixin" and "includes" in the appropriate places. This fixes #1931, #1932 issues. [1] whatwg/webidl@45e8173
1 parent ce8e44b commit 91aca93

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

cssom-1/Overview.bs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,9 +1200,7 @@ The <dfn>associated CSS style sheet</dfn> of a node is the <a>CSS style sheet</a
12001200
interface.
12011201

12021202
<pre class=idl>
1203-
[Exposed=Window,
1204-
NoInterfaceObject]
1205-
interface LinkStyle {
1203+
interface mixin LinkStyle {
12061204
readonly attribute StyleSheet? sheet;
12071205
};
12081206
</pre>
@@ -1247,7 +1245,7 @@ must also define when a <a>CSS style sheet</a> is
12471245

12481246
<!-- XXX load/error events -->
12491247

1250-
<pre class="idl">ProcessingInstruction implements LinkStyle;</pre>
1248+
<pre class="idl">ProcessingInstruction includes LinkStyle;</pre>
12511249

12521250
The <dfn>prolog</dfn> refers to <a>nodes</a> that are children of the
12531251
<a>document</a> and are not <a>following</a> the
@@ -2718,9 +2716,7 @@ The {{ElementCSSInlineStyle}} Interface {#the-elementcssinlinestyle-interface}
27182716
The <code>ElementCSSInlineStyle</code> interface provides access to inline style properties of an element.
27192717

27202718
<pre class=idl>
2721-
[Exposed=Window,
2722-
NoInterfaceObject]
2723-
interface ElementCSSInlineStyle {
2719+
interface mixin ElementCSSInlineStyle {
27242720
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
27252721
};
27262722
</pre>
@@ -2732,13 +2728,13 @@ whose <a for="CSSStyleDeclaration">owner node</a> is the <a>context object</a>.
27322728
If the user agent supports HTML, the following IDL applies: [[HTML]]
27332729

27342730
<pre class=idl>
2735-
HTMLElement implements ElementCSSInlineStyle;
2731+
HTMLElement includes ElementCSSInlineStyle;
27362732
</pre>
27372733

27382734
If the user agent supports SVG, the following IDL applies: [[SVG11]]
27392735

27402736
<pre class=idl>
2741-
SVGElement implements ElementCSSInlineStyle;
2737+
SVGElement includes ElementCSSInlineStyle;
27422738
</pre>
27432739

27442740

cssom-view-1/Overview.bs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,19 +1592,17 @@ dictionary ConvertCoordinateOptions {
15921592
CSSBoxType toBox = "border";
15931593
};
15941594

1595-
[Exposed=Window,
1596-
NoInterfaceObject]
1597-
interface GeometryUtils {
1595+
interface mixin GeometryUtils {
15981596
sequence&lt;DOMQuad> getBoxQuads(optional BoxQuadOptions options);
15991597
DOMQuad convertQuadFromNode(DOMQuadInit quad, GeometryNode from, optional ConvertCoordinateOptions options);
16001598
DOMQuad convertRectFromNode(DOMRectReadOnly rect, GeometryNode from, optional ConvertCoordinateOptions options);
16011599
DOMPoint convertPointFromNode(DOMPointInit point, GeometryNode from, optional ConvertCoordinateOptions options); // XXX z,w turns into 0
16021600
};
16031601

1604-
Text implements GeometryUtils; // like Range
1605-
Element implements GeometryUtils;
1606-
CSSPseudoElement implements GeometryUtils;
1607-
Document implements GeometryUtils;
1602+
Text includes GeometryUtils; // like Range
1603+
Element includes GeometryUtils;
1604+
CSSPseudoElement includes GeometryUtils;
1605+
Document includes GeometryUtils;
16081606

16091607
typedef (Text or Element or CSSPseudoElement or Document) GeometryNode;
16101608
</pre>

0 commit comments

Comments
 (0)