Skip to content

Use Web IDL's new-ish interface mixins concept #2123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions cssom-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1201,9 +1201,7 @@ The <dfn>associated CSS style sheet</dfn> of a node is the <a>CSS style sheet</a
interface.

<pre class=idl>
[Exposed=Window,
NoInterfaceObject]
interface LinkStyle {
interface mixin LinkStyle {
readonly attribute StyleSheet? sheet;
};
</pre>
Expand Down Expand Up @@ -1248,7 +1246,7 @@ must also define when a <a>CSS style sheet</a> is

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

<pre class="idl">ProcessingInstruction implements LinkStyle;</pre>
<pre class="idl">ProcessingInstruction includes LinkStyle;</pre>

The <dfn>prolog</dfn> refers to <a>nodes</a> that are children of the
<a>document</a> and are not <a>following</a> the
Expand Down Expand Up @@ -2671,9 +2669,7 @@ The {{ElementCSSInlineStyle}} Interface {#the-elementcssinlinestyle-interface}
The <code>ElementCSSInlineStyle</code> interface provides access to inline style properties of an element.

<pre class=idl>
[Exposed=Window,
NoInterfaceObject]
interface ElementCSSInlineStyle {
interface mixin ElementCSSInlineStyle {
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
};
</pre>
Expand All @@ -2700,13 +2696,13 @@ properties:
If the user agent supports HTML, the following IDL applies: [[HTML]]

<pre class=idl>
HTMLElement implements ElementCSSInlineStyle;
HTMLElement includes ElementCSSInlineStyle;
</pre>

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

<pre class=idl>
SVGElement implements ElementCSSInlineStyle;
SVGElement includes ElementCSSInlineStyle;
</pre>


Expand Down
12 changes: 5 additions & 7 deletions cssom-view-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1592,19 +1592,17 @@ dictionary ConvertCoordinateOptions {
CSSBoxType toBox = "border";
};

[Exposed=Window,
NoInterfaceObject]
interface GeometryUtils {
interface mixin GeometryUtils {
sequence&lt;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;
</pre>
Expand Down