From 85ed4b224886ffb258c45e9d65c763317f11d4b4 Mon Sep 17 00:00:00 2001 From: Jinho Bang Date: Thu, 21 Dec 2017 15:56:40 +0900 Subject: [PATCH] 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] https://github.com/heycam/webidl/commit/45e8173d40ddff8dcf81697326e094bcf8b92920 --- cssom-1/Overview.bs | 14 +++++--------- cssom-view-1/Overview.bs | 12 +++++------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/cssom-1/Overview.bs b/cssom-1/Overview.bs index cdb2b172006..60d61b74c80 100644 --- a/cssom-1/Overview.bs +++ b/cssom-1/Overview.bs @@ -1201,9 +1201,7 @@ The associated CSS style sheet of a node is the CSS style sheet -[Exposed=Window, - NoInterfaceObject] -interface LinkStyle { +interface mixin LinkStyle { readonly attribute StyleSheet? sheet; }; @@ -1248,7 +1246,7 @@ must also define when a CSS style sheet is -
ProcessingInstruction implements LinkStyle;
+
ProcessingInstruction includes LinkStyle;
The prolog refers to nodes that are children of the document and are not following the @@ -2671,9 +2669,7 @@ The {{ElementCSSInlineStyle}} Interface {#the-elementcssinlinestyle-interface} The ElementCSSInlineStyle interface provides access to inline style properties of an element.
-[Exposed=Window,
- NoInterfaceObject]
-interface ElementCSSInlineStyle {
+interface mixin ElementCSSInlineStyle {
   [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
 };
 
@@ -2700,13 +2696,13 @@ properties: If the user agent supports HTML, the following IDL applies: [[HTML]]
-HTMLElement implements ElementCSSInlineStyle;
+HTMLElement includes ElementCSSInlineStyle;
 
If the user agent supports SVG, the following IDL applies: [[SVG11]]
-SVGElement implements ElementCSSInlineStyle;
+SVGElement includes ElementCSSInlineStyle;
 
diff --git a/cssom-view-1/Overview.bs b/cssom-view-1/Overview.bs index 8b632f91575..c98d7b1d608 100644 --- a/cssom-view-1/Overview.bs +++ b/cssom-view-1/Overview.bs @@ -1592,19 +1592,17 @@ dictionary ConvertCoordinateOptions { CSSBoxType toBox = "border"; }; -[Exposed=Window, - NoInterfaceObject] -interface GeometryUtils { +interface mixin GeometryUtils { sequence<DOMQuad> getBoxQuads(optional BoxQuadOptions options); DOMQuad convertQuadFromNode(DOMQuadInit quad, GeometryNode from, optional ConvertCoordinateOptions options); DOMQuad convertRectFromNode(DOMRectReadOnly rect, GeometryNode from, optional ConvertCoordinateOptions options); DOMPoint convertPointFromNode(DOMPointInit point, GeometryNode from, optional ConvertCoordinateOptions options); // XXX z,w turns into 0 }; -Text implements GeometryUtils; // like Range -Element implements GeometryUtils; -CSSPseudoElement implements GeometryUtils; -Document implements GeometryUtils; +Text includes GeometryUtils; // like Range +Element includes GeometryUtils; +CSSPseudoElement includes GeometryUtils; +Document includes GeometryUtils; typedef (Text or Element or CSSPseudoElement or Document) GeometryNode;