Skip to content

Commit c2541c8

Browse files
authored
[css-animations][css-conditional][css-font-loading][cssom-view][cssom][mediaqueries] IDL: Use [Exposed] consistently
This is necessary for whatwg/webidl#365.
1 parent c30b0c0 commit c2541c8

File tree

7 files changed

+45
-13
lines changed

7 files changed

+45
-13
lines changed

css-animations/Overview.bs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,8 @@ The <code>AnimationEvent</code> Interface</h3>
906906
IDL Definition</h4>
907907

908908
<pre class="idl">
909-
[Constructor(CSSOMString type, optional AnimationEventInit animationEventInitDict)]
909+
[Exposed=Window,
910+
Constructor(CSSOMString type, optional AnimationEventInit animationEventInitDict)]
910911
interface AnimationEvent : Event {
911912
readonly attribute CSSOMString animationName;
912913
readonly attribute float elapsedTime;
@@ -1087,6 +1088,7 @@ The <code>CSSKeyframeRule</code> Interface</h3>
10871088
IDL Definition</h4>
10881089

10891090
<pre class="idl">
1091+
[Exposed=Window]
10901092
interface CSSKeyframeRule : CSSRule {
10911093
attribute CSSOMString keyText;
10921094
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
@@ -1139,6 +1141,7 @@ The <code>CSSKeyframesRule</code> Interface</h3>
11391141
IDL Definition</h4>
11401142

11411143
<pre class="idl">
1144+
[Exposed=Window]
11421145
interface CSSKeyframesRule : CSSRule {
11431146
attribute CSSOMString name;
11441147
readonly attribute CSSRuleList cssRules;

css-conditional/Overview.bs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,7 @@ The <code>CSSGroupingRule</code> interface</h3>
832832
<p>The {{CSSGroupingRule}} interface represents an at-rule that contains other rules nested inside itself.
833833

834834
<pre class='idl'>
835+
[Exposed=Window]
835836
interface CSSGroupingRule : CSSRule {
836837
readonly attribute <a href="https://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRuleList">CSSRuleList</a> cssRules;
837838
unsigned long insertRule (CSSOMString rule, unsigned long index);
@@ -889,6 +890,7 @@ all the &ldquo;conditional&rdquo; at-rules,
889890
which consist of a condition and a statement block.
890891

891892
<pre class='idl' export>
893+
[Exposed=Window]
892894
interface CSSConditionRule : CSSGroupingRule {
893895
attribute CSSOMString conditionText;
894896
};
@@ -930,6 +932,7 @@ The <code>CSSMediaRule</code> interface</h3>
930932
<p>The {{CSSMediaRule}} interface represents a ''@media'' at-rule:
931933

932934
<pre class='idl'>
935+
[Exposed=Window]
933936
interface CSSMediaRule : CSSConditionRule {
934937
[SameObject, PutForwards=mediaText] readonly attribute MediaList media;
935938
};
@@ -955,6 +958,7 @@ The <code>CSSSupportsRule</code> interface</h3>
955958
<p>The {{CSSSupportsRule}} interface represents a ''@supports'' rule.</p>
956959

957960
<pre class='idl'>
961+
[Exposed=Window]
958962
interface CSSSupportsRule : CSSConditionRule {
959963
};
960964
</pre>
@@ -985,6 +989,7 @@ The <code>CSSDocumentRule</code> interface</h3>
985989
<p>The {{CSSDocumentRule}} interface represents a ''@document'' rule.</p>
986990

987991
<pre class='idl'>
992+
[Exposed=Window]
988993
interface CSSDocumentRule : CSSConditionRule {
989994
};
990995
</pre>

css-font-loading/Overview.bs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ The <code>FontFace</code> Interface</h2>
9393

9494
[Constructor(CSSOMString family, (CSSOMString or BinaryData) source,
9595
optional FontFaceDescriptors descriptors),
96-
Exposed=Window,Worker]
96+
Exposed=(Window,Worker)]
9797
interface FontFace {
9898
attribute CSSOMString family;
9999
attribute CSSOMString style;
@@ -444,7 +444,7 @@ The <code>FontFaceSet</code> Interface</h2>
444444
};
445445

446446
[Constructor(CSSOMString type, optional FontFaceSetLoadEventInit eventInitDict),
447-
Exposed=Window,Worker]
447+
Exposed=(Window,Worker)]
448448
interface FontFaceSetLoadEvent : Event {
449449
[SameObject] readonly attribute FrozenArray&lt;FontFace> fontfaces;
450450
};
@@ -453,7 +453,7 @@ The <code>FontFaceSet</code> Interface</h2>
453453

454454
callback ForEachCallback = void (FontFace font, long index, FontFaceSet self);
455455

456-
[Exposed=Window,Worker,
456+
[Exposed=(Window,Worker),
457457
Constructor(sequence&lt;FontFace> initialFaces)]
458458
interface FontFaceSet : EventTarget {
459459
// FontFaceSet is Set-like!
@@ -1001,7 +1001,8 @@ Interaction with CSS Font Loading and Matching</h3>
10011001
The <code>FontFaceSource</code> interface</h2>
10021002

10031003
<pre class='idl'>
1004-
[NoInterfaceObject]
1004+
[Exposed=(Window,Worker)
1005+
NoInterfaceObject]
10051006
interface FontFaceSource {
10061007
readonly attribute FontFaceSet fonts;
10071008
};

css-regions/Overview.bs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,8 @@ The Region interface</h3>
12241224
such as <a href="https://drafts.csswg.org/css3-page-template/#templates-and-slots">slots</a>) in an implementation which can be <a>CSS Regions</a>.
12251225

12261226
<pre class="idl">
1227-
[NoInterfaceObject]
1227+
[Exposed=Window,
1228+
NoInterfaceObject]
12281229
interface Region {
12291230
readonly attribute CSSOMString regionOverset;
12301231
sequence&lt;Range&gt;? getRegionFlowRanges();

cssom-view/Overview.bs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,7 @@ When asked to <dfn>evaluate media queries and report changes</dfn> for a {{Docum
782782
</div>
783783

784784
<pre class=idl>
785+
[Exposed=Window]
785786
interface MediaQueryList : EventTarget {
786787
readonly attribute CSSOMString media;
787788
readonly attribute boolean matches;
@@ -837,7 +838,8 @@ as <a>event handler IDL attributes</a>, by all objects implementing the {{MediaQ
837838
</table>
838839

839840
<pre class=idl>
840-
[Constructor(CSSOMString type, optional MediaQueryListEventInit eventInitDict)]
841+
[Exposed=Window,
842+
Constructor(CSSOMString type, optional MediaQueryListEventInit eventInitDict)]
841843
interface MediaQueryListEvent : Event {
842844
readonly attribute CSSOMString media;
843845
readonly attribute boolean matches;
@@ -878,6 +880,7 @@ The <dfn attribute for=MediaQueryListEvent>matches</dfn> attribute must return t
878880
As its name suggests, the {{Screen}} interface represents information about the screen of the output device.
879881

880882
<pre class=idl>
883+
[Exposed=Window]
881884
interface Screen {
882885
readonly attribute long availWidth;
883886
readonly attribute long availHeight;
@@ -1044,6 +1047,7 @@ A <dfn>caret position</dfn> gives the position of a text insertion point indicat
10441047
<dfn>caret node</dfn>, <dfn>caret offset</dfn>, and <dfn>caret range</dfn>. It is represented by a {{CaretPosition}} object.
10451048

10461049
<pre class=idl>
1050+
[Exposed=Window]
10471051
interface CaretPosition {
10481052
readonly attribute Node offsetNode;
10491053
readonly attribute unsigned long offset;
@@ -1588,7 +1592,8 @@ dictionary ConvertCoordinateOptions {
15881592
CSSBoxType toBox = "border";
15891593
};
15901594

1591-
[NoInterfaceObject]
1595+
[Exposed=Window,
1596+
NoInterfaceObject]
15921597
interface GeometryUtils {
15931598
sequence&lt;DOMQuad> getBoxQuads(optional BoxQuadOptions options);
15941599
DOMQuad convertQuadFromNode(DOMQuadInit quad, GeometryNode from, optional ConvertCoordinateOptions options);

cssom/Overview.bs

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,8 @@ The {{MediaList}} Interface {#the-medialist-interface}
501501
An object that implements the <code>MediaList</code> interface has an associated <dfn export for=MediaList>collection of media queries</dfn>.
502502

503503
<pre class=idl>
504-
[LegacyArrayClass]
504+
[Exposed=Window,
505+
LegacyArrayClass]
505506
interface MediaList {
506507
stringifier attribute [TreatNullAs=EmptyString] CSSOMString mediaText;
507508
readonly attribute unsigned long length;
@@ -856,6 +857,7 @@ represents a style sheet as defined by the CSS specification. In the CSSOM a
856857
The {{StyleSheet}} interface represents an abstract, base style sheet.
857858

858859
<pre class=idl>
860+
[Exposed=Window]
859861
interface StyleSheet {
860862
readonly attribute CSSOMString type;
861863
readonly attribute USVString? href;
@@ -893,6 +895,7 @@ is set, or false otherwise. On setting, the {{StyleSheet/disabled}} attribute mu
893895
The {{CSSStyleSheet}} interface represents a <a>CSS style sheet</a>.
894896

895897
<pre class=idl>
898+
[Exposed=Window]
896899
interface CSSStyleSheet : StyleSheet {
897900
readonly attribute CSSRule? ownerRule;
898901
[SameObject] readonly attribute CSSRuleList cssRules;
@@ -1118,7 +1121,8 @@ value of the header.
11181121
The {{StyleSheetList}} interface represents an ordered collection of <a>CSS style sheets</a>.
11191122

11201123
<pre class=idl>
1121-
[LegacyArrayClass]
1124+
[Exposed=Window,
1125+
LegacyArrayClass]
11221126
interface StyleSheetList {
11231127
getter StyleSheet? item(unsigned long index);
11241128
readonly attribute unsigned long length;
@@ -1197,7 +1201,8 @@ The <dfn>associated CSS style sheet</dfn> of a node is the <a>CSS style sheet</a
11971201
interface.
11981202

11991203
<pre class=idl>
1200-
[NoInterfaceObject]
1204+
[Exposed=Window,
1205+
NoInterfaceObject]
12011206
interface LinkStyle {
12021207
readonly attribute StyleSheet? sheet;
12031208
};
@@ -1635,7 +1640,8 @@ To <dfn export>remove a CSS rule</dfn> from a CSS rule list <var>list</var> at i
16351640
The {{CSSRuleList}} interface represents an ordered collection of CSS style rules.
16361641

16371642
<pre class=idl>
1638-
[LegacyArrayClass]
1643+
[Exposed=Window,
1644+
LegacyArrayClass]
16391645
interface CSSRuleList {
16401646
getter CSSRule? item(unsigned long index);
16411647
readonly attribute unsigned long length;
@@ -1659,6 +1665,7 @@ distinct CSS style rule type is represented by a distinct interface that
16591665
inherits from this interface.
16601666

16611667
<pre class=idl>
1668+
[Exposed=Window]
16621669
interface CSSRule {
16631670
const unsigned short STYLE_RULE = 1;
16641671
const unsigned short CHARSET_RULE = 2; // historical
@@ -1724,6 +1731,7 @@ unreachable.
17241731
The <code>CSSStyleRule</code> interface represents a style rule.
17251732

17261733
<pre class=idl>
1734+
[Exposed=Window]
17271735
interface CSSStyleRule : CSSRule {
17281736
attribute CSSOMString selectorText;
17291737
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
@@ -1762,6 +1770,7 @@ one with greatest cascading order must be represented, at the same relative posi
17621770
The <code>CSSImportRule</code> interface represents an <code>@import</code> at-rule.
17631771

17641772
<pre class=idl>
1773+
[Exposed=Window]
17651774
interface CSSImportRule : CSSRule {
17661775
readonly attribute USVString href;
17671776
[SameObject, PutForwards=mediaText] readonly attribute MediaList media;
@@ -1789,6 +1798,7 @@ list is simply empty, i.e., an <code>@import</code> at-rule always has an associ
17891798
The <code>CSSGroupingRule</code> interface represents an at-rule that contains other rules nested inside itself.
17901799

17911800
<pre class=idl>
1801+
[Exposed=Window]
17921802
interface CSSGroupingRule : CSSRule {
17931803
[SameObject] readonly attribute CSSRuleList cssRules;
17941804
unsigned long insertRule(CSSOMString rule, optional unsigned long index = 0);
@@ -1822,6 +1832,7 @@ Issue: Need to define the rules for
18221832
<dfn>serialize a list of CSS page selectors</dfn>.
18231833

18241834
<pre class=idl>
1835+
[Exposed=Window]
18251836
interface CSSPageRule : CSSGroupingRule {
18261837
attribute CSSOMString selectorText;
18271838
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
@@ -1857,6 +1868,7 @@ The <code>CSSMarginRule</code> interface represents a margin at-rule (e.g. <code
18571868
[[!CSS3PAGE]]
18581869

18591870
<pre class=idl>
1871+
[Exposed=Window]
18601872
interface CSSMarginRule : CSSRule {
18611873
readonly attribute CSSOMString name;
18621874
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
@@ -1885,6 +1897,7 @@ margin at-rule, with the following properties:
18851897
The <code>CSSNamespaceRule</code> interface represents an <code>@namespace</code> at-rule.
18861898

18871899
<pre class=idl>
1900+
[Exposed=Window]
18881901
interface CSSNamespaceRule : CSSRule {
18891902
readonly attribute CSSOMString namespaceURI;
18901903
readonly attribute CSSOMString prefix;
@@ -2037,6 +2050,7 @@ The <code>CSSStyleDeclaration</code> interface represents a <a>CSS declaration b
20372050
underlying state depends upon the source of the <code>CSSStyleDeclaration</Code> instance.
20382051

20392052
<pre class=idl>
2053+
[Exposed=Window]
20402054
interface CSSStyleDeclaration {
20412055
[CEReactions] attribute CSSOMString cssText;
20422056
readonly attribute unsigned long length;
@@ -2657,7 +2671,8 @@ The {{ElementCSSInlineStyle}} Interface {#the-elementcssinlinestyle-interface}
26572671
The <code>ElementCSSInlineStyle</code> interface provides access to inline style properties of an element.
26582672

26592673
<pre class=idl>
2660-
[NoInterfaceObject]
2674+
[Exposed=Window,
2675+
NoInterfaceObject]
26612676
interface ElementCSSInlineStyle {
26622677
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
26632678
};
@@ -2756,6 +2771,7 @@ The <code>CSS.escape()</code> Method {#the-css.escape()-method}
27562771
The <code>CSS</code> interface holds useful CSS-related functions that do not belong elsewhere.
27572772

27582773
<pre class=idl>
2774+
[Exposed=Window]
27592775
interface CSS {
27602776
static CSSOMString escape(CSSOMString ident);
27612777
};

mediaqueries-5/Overview.bs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ CSSOM</h2>
359359
The <a interface>CSSCustomMediaRule</a> interface represents a ''@custom-media'' rule.
360360

361361
<pre class="idl">
362+
[Exposed=Window]
362363
interface CSSCustomMediaRule : CSSRule {
363364
attribute CSSOMString name;
364365
[SameObject, PutForwards=mediaText] readonly attribute MediaList media;

0 commit comments

Comments
 (0)