Skip to content

Commit 5c5bfa1

Browse files
committed
Imply [Reflect] when [ReflectRange] or [ReflectDefault] are used.
This allows reducing noise in the IDL for the common case that no argument needs passing to [Reflect].
1 parent ce84350 commit 5c5bfa1

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

source

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8864,17 +8864,20 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
88648864

88658865
<hr>
88668866

8867-
<p>To supplement the above <span data-x="extended attribute">extended attributes</span> we also
8868-
introduce <dfn extended-attribute data-lt="ReflectRange"
8867+
<p>To supplement the above <span data-x="extended attribute">extended attributes</span> <dfn
8868+
extended-attribute data-lt="ReflectRange"
88698869
data-x="xattr-ReflectRange"><code>[ReflectRange]</code></dfn>, and <dfn extended-attribute
8870-
data-lt="ReflectDefault" data-x="xattr-ReflectDefault"><code>[ReflectDefault]</code></dfn>. These
8871-
augment how <span data-x="reflect">reflection</span> works and also must only appear on interface
8872-
member attributes.</p>
8870+
data-lt="ReflectDefault" data-x="xattr-ReflectDefault"><code>[ReflectDefault]</code></dfn> can be
8871+
used. These augment how <span data-x="reflect">reflection</span> works and also must only appear
8872+
on interface member attributes.</p>
88738873

88748874
<p>The <code data-x="xattr-ReflectRange">[ReflectRange]</code> <span>extended attribute</span>
88758875
must take an integer list limited to two values. It must only be used on attributes with a type of
8876-
<code data-x="idl-unsigned-long">unsigned long</code>. Additionally, it must also only appear
8877-
alongside <code data-x="xattr-Reflect">[Reflect]</code>.</p>
8876+
<code data-x="idl-unsigned-long">unsigned long</code>. Additionally, it must not appear alongside
8877+
any primary <span data-x="reflect">reflection</span> <span>extended attribute</span> except <code
8878+
data-x="xattr-Reflect">[Reflect]</code>. If there is no primary <span
8879+
data-x="reflect">reflection</span> <span>extended attribute</span> then, <code
8880+
data-x="xattr-Reflect">[Reflect]</code> with no argument is implied.</p>
88788881

88798882
<p>IDL attributes with the <code data-x="xattr-ReflectRange">[ReflectRange]</code> <span>extended
88808883
attribute</span> are <span>clamped to the range</span> [<var>clampedMin</var>,
@@ -8886,11 +8889,14 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
88868889
must only be used on attributes with a type of <code data-x="idl-double">double</code>, <code
88878890
data-x="idl-long">long</code>, or <code data-x="idl-unsigned-long">unsigned long</code>. When used
88888891
on an attribute of type <code data-x="idl-double">double</code>, it must take a decimal; otherwise
8889-
it must take an integer. Additionally, it must also only appear alongside <code
8892+
it must take an integer. Additionally, it must not appear alongside any primary <span
8893+
data-x="reflect">reflection</span> <span>extended attribute</span> except
88908894
data-x="xattr-Reflect">[Reflect]</code>, <code
88918895
data-x="xattr-ReflectNonNegative">[ReflectNonNegative]</code>, <code
88928896
data-x="xattr-ReflectPositive">[ReflectPositive]</code>, or <code
8893-
data-x="xattr-ReflectPositiveWithFallback">[ReflectPositiveWithFallback]</code>.</p>
8897+
data-x="xattr-ReflectPositiveWithFallback">[ReflectPositiveWithFallback]</code>. If there is no
8898+
primary <span data-x="reflect">reflection</span> <span>extended attribute</span> then, <code
8899+
data-x="xattr-Reflect">[Reflect]</code> with no argument is implied.</p></p>
88948900

88958901
<p>IDL attributes with the <code data-x="xattr-ReflectDefault">[ReflectDefault]</code>
88968902
<span>extended attribute</span> have a <span>default value</span> provided by the argument
@@ -20524,7 +20530,7 @@ interface <dfn interface>HTMLOListElement</dfn> : <span>HTMLElement</span> {
2052420530
[<span>HTMLConstructor</span>] constructor();
2052520531

2052620532
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute boolean <dfn attribute for="HTMLOListElement" data-x="dom-ol-reversed">reversed</dfn>;
20527-
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>, <span data-x="xattr-ReflectDefault">ReflectDefault=1</span>] attribute long <dfn attribute for="HTMLOListElement" data-x="dom-ol-start">start</dfn>;
20533+
[<span>CEReactions</span>, <span data-x="xattr-ReflectDefault">ReflectDefault=1</span>] attribute long <dfn attribute for="HTMLOListElement" data-x="dom-ol-start">start</dfn>;
2052820534
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLOListElement" data-x="dom-ol-type">type</dfn>;
2052920535

2053020536
// <a href="#HTMLOListElement-partial">also has obsolete members</a>
@@ -43429,7 +43435,7 @@ the cell that corresponds to the values of the two dice.
4342943435
interface <dfn interface>HTMLTableColElement</dfn> : <span>HTMLElement</span> {
4343043436
[<span>HTMLConstructor</span>] constructor();
4343143437

43432-
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>, <span data-x="xattr-ReflectDefault">ReflectDefault=1</span>, <span data-x="xattr-ReflectRange">ReflectRange=(1, 1000)</span>] attribute unsigned long <dfn attribute for="HTMLTableColElement" data-x="dom-colgroup-span">span</dfn>;
43438+
[<span>CEReactions</span>, <span data-x="xattr-ReflectDefault">ReflectDefault=1</span>, <span data-x="xattr-ReflectRange">ReflectRange=(1, 1000)</span>] attribute unsigned long <dfn attribute for="HTMLTableColElement" data-x="dom-colgroup-span">span</dfn>;
4343343439

4343443440
// <a href="#HTMLTableColElement-partial">also has obsolete members</a>
4343543441
};</code></pre>
@@ -43931,8 +43937,8 @@ interface <dfn interface>HTMLTableRowElement</dfn> : <span>HTMLElement</span> {
4393143937
interface <dfn interface>HTMLTableCellElement</dfn> : <span>HTMLElement</span> {
4393243938
[<span>HTMLConstructor</span>] constructor();
4393343939

43934-
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>, <span data-x="xattr-ReflectDefault">ReflectDefault=1</span>, <span data-x="xattr-ReflectRange">ReflectRange=(1, 1000)</span>] attribute unsigned long <dfn attribute for="HTMLTableCellElement" data-x="dom-tdth-colSpan">colSpan</dfn>;
43935-
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>, <span data-x="xattr-ReflectDefault">ReflectDefault=1</span>, <span data-x="xattr-ReflectRange">ReflectRange=(0, 65534)</span>] attribute unsigned long <dfn attribute for="HTMLTableCellElement" data-x="dom-tdth-rowSpan">rowSpan</dfn>;
43940+
[<span>CEReactions</span>, <span data-x="xattr-ReflectDefault">ReflectDefault=1</span>, <span data-x="xattr-ReflectRange">ReflectRange=(1, 1000)</span>] attribute unsigned long <dfn attribute for="HTMLTableCellElement" data-x="dom-tdth-colSpan">colSpan</dfn>;
43941+
[<span>CEReactions</span>, <span data-x="xattr-ReflectDefault">ReflectDefault=1</span>, <span data-x="xattr-ReflectRange">ReflectRange=(0, 65534)</span>] attribute unsigned long <dfn attribute for="HTMLTableCellElement" data-x="dom-tdth-rowSpan">rowSpan</dfn>;
4393643942
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn data-x="dom-tdth-headers">headers</dfn>;
4393743943
readonly attribute long <span data-x="dom-tdth-cellIndex">cellIndex</span>;
4393843944

@@ -53906,7 +53912,7 @@ interface <dfn interface>HTMLSelectElement</dfn> : <span>HTMLElement</span> {
5390653912
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute boolean <dfn attribute for="HTMLSelectElement" data-x="dom-select-multiple">multiple</dfn>;
5390753913
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLSelectElement" data-x="dom-select-name">name</dfn>;
5390853914
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute boolean <dfn attribute for="HTMLSelectElement" data-x="dom-select-required">required</dfn>;
53909-
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>, <span data-x="xattr-ReflectDefault">ReflectDefault=0</span>] attribute unsigned long <dfn attribute for="HTMLSelectElement" data-x="dom-select-size">size</dfn>;
53915+
[<span>CEReactions</span>, <span data-x="xattr-ReflectDefault">ReflectDefault=0</span>] attribute unsigned long <dfn attribute for="HTMLSelectElement" data-x="dom-select-size">size</dfn>;
5391053916
<!-- see https://www.w3.org/Bugs/Public/show_bug.cgi?id=12288 for compat reasons why .size allows
5391153917
0 (it's not limited to values greater than zero) even though that value really makes no sense
5391253918
-->
@@ -140835,8 +140841,8 @@ interface <dfn interface>HTMLMarqueeElement</dfn> : <span>HTMLElement</span> {
140835140841
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLMarqueeElement" data-x="dom-marquee-height">height</dfn>;
140836140842
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute unsigned long <dfn attribute for="HTMLMarqueeElement" data-x="dom-marquee-hspace">hspace</dfn>;
140837140843
[<span>CEReactions</span>] attribute long <span data-x="dom-marquee-loop">loop</span>;
140838-
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>, <span data-x="xattr-ReflectDefault">ReflectDefault=6</span>] attribute unsigned long <dfn attribute for="HTMLMarqueeElement" data-x="dom-marquee-scrollamount">scrollAmount</dfn>;
140839-
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>, <span data-x="xattr-ReflectDefault">ReflectDefault=85</span>] attribute unsigned long <dfn attribute for="HTMLMarqueeElement" data-x="dom-marquee-scrollDelay">scrollDelay</dfn>;
140844+
[<span>CEReactions</span>, <span data-x="xattr-ReflectDefault">ReflectDefault=6</span>] attribute unsigned long <dfn attribute for="HTMLMarqueeElement" data-x="dom-marquee-scrollamount">scrollAmount</dfn>;
140845+
[<span>CEReactions</span>, <span data-x="xattr-ReflectDefault">ReflectDefault=85</span>] attribute unsigned long <dfn attribute for="HTMLMarqueeElement" data-x="dom-marquee-scrollDelay">scrollDelay</dfn>;
140840140846
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute boolean <dfn attribute for="HTMLMarqueeElement" data-x="dom-marquee-trueSpeed">trueSpeed</dfn>;
140841140847
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute unsigned long <dfn attribute for="HTMLMarqueeElement" data-x="dom-marquee-vspace">vspace</dfn>;
140842140848
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLMarqueeElement" data-x="dom-marquee-width">width</dfn>;

0 commit comments

Comments
 (0)