-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Imply [Reflect] when [ReflectRange] or [ReflectDefault] are used. #11518
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
Open
lukewarlow
wants to merge
1
commit into
whatwg:main
Choose a base branch
from
lukewarlow:implicit-reflect
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8864,17 +8864,20 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute | |
|
||
<hr> | ||
|
||
<p>To supplement the above <span data-x="extended attribute">extended attributes</span> we also | ||
introduce <dfn extended-attribute data-lt="ReflectRange" | ||
<p>To supplement the above <span data-x="extended attribute">extended attributes</span> <dfn | ||
extended-attribute data-lt="ReflectRange" | ||
data-x="xattr-ReflectRange"><code>[ReflectRange]</code></dfn>, and <dfn extended-attribute | ||
data-lt="ReflectDefault" data-x="xattr-ReflectDefault"><code>[ReflectDefault]</code></dfn>. These | ||
augment how <span data-x="reflect">reflection</span> works and also must only appear on interface | ||
member attributes.</p> | ||
data-lt="ReflectDefault" data-x="xattr-ReflectDefault"><code>[ReflectDefault]</code></dfn> can be | ||
used. These augment how <span data-x="reflect">reflection</span> works and also must only appear | ||
on interface member attributes.</p> | ||
|
||
<p>The <code data-x="xattr-ReflectRange">[ReflectRange]</code> <span>extended attribute</span> | ||
must take an integer list limited to two values. It must only be used on attributes with a type of | ||
<code data-x="idl-unsigned-long">unsigned long</code>. Additionally, it must also only appear | ||
alongside <code data-x="xattr-Reflect">[Reflect]</code>.</p> | ||
<code data-x="idl-unsigned-long">unsigned long</code>. Additionally, it must not appear alongside | ||
any primary <span data-x="reflect">reflection</span> <span>extended attribute</span> except <code | ||
data-x="xattr-Reflect">[Reflect]</code>. If there is no primary <span | ||
data-x="reflect">reflection</span> <span>extended attribute</span> then, <code | ||
data-x="xattr-Reflect">[Reflect]</code> with no argument is implied.</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps we can constrain it even further to only allow Reflect when its identifier is present? |
||
|
||
<p>IDL attributes with the <code data-x="xattr-ReflectRange">[ReflectRange]</code> <span>extended | ||
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 | |
must only be used on attributes with a type of <code data-x="idl-double">double</code>, <code | ||
data-x="idl-long">long</code>, or <code data-x="idl-unsigned-long">unsigned long</code>. When used | ||
on an attribute of type <code data-x="idl-double">double</code>, it must take a decimal; otherwise | ||
it must take an integer. Additionally, it must also only appear alongside <code | ||
it must take an integer. Additionally, it must not appear alongside any primary <span | ||
data-x="reflect">reflection</span> <span>extended attribute</span> except <code | ||
data-x="xattr-Reflect">[Reflect]</code>, <code | ||
data-x="xattr-ReflectNonNegative">[ReflectNonNegative]</code>, <code | ||
data-x="xattr-ReflectPositive">[ReflectPositive]</code>, or <code | ||
data-x="xattr-ReflectPositiveWithFallback">[ReflectPositiveWithFallback]</code>.</p> | ||
data-x="xattr-ReflectPositiveWithFallback">[ReflectPositiveWithFallback]</code>. If there is no | ||
primary <span data-x="reflect">reflection</span> <span>extended attribute</span> then, <code | ||
data-x="xattr-Reflect">[Reflect]</code> with no argument is implied.</p> | ||
|
||
<p>IDL attributes with the <code data-x="xattr-ReflectDefault">[ReflectDefault]</code> | ||
<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> { | |
[<span>HTMLConstructor</span>] constructor(); | ||
|
||
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute boolean <dfn attribute for="HTMLOListElement" data-x="dom-ol-reversed">reversed</dfn>; | ||
[<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>; | ||
[<span>CEReactions</span>, <span data-x="xattr-ReflectDefault">ReflectDefault=1</span>] attribute long <dfn attribute for="HTMLOListElement" data-x="dom-ol-start">start</dfn>; | ||
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLOListElement" data-x="dom-ol-type">type</dfn>; | ||
|
||
// <a href="#HTMLOListElement-partial">also has obsolete members</a> | ||
|
@@ -43429,7 +43435,7 @@ the cell that corresponds to the values of the two dice. | |
interface <dfn interface>HTMLTableColElement</dfn> : <span>HTMLElement</span> { | ||
[<span>HTMLConstructor</span>] constructor(); | ||
|
||
[<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>; | ||
[<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>; | ||
|
||
// <a href="#HTMLTableColElement-partial">also has obsolete members</a> | ||
};</code></pre> | ||
|
@@ -43931,8 +43937,8 @@ interface <dfn interface>HTMLTableRowElement</dfn> : <span>HTMLElement</span> { | |
interface <dfn interface>HTMLTableCellElement</dfn> : <span>HTMLElement</span> { | ||
[<span>HTMLConstructor</span>] constructor(); | ||
|
||
[<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>; | ||
[<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>; | ||
[<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>; | ||
[<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>; | ||
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn data-x="dom-tdth-headers">headers</dfn>; | ||
readonly attribute long <span data-x="dom-tdth-cellIndex">cellIndex</span>; | ||
|
||
|
@@ -53906,7 +53912,7 @@ interface <dfn interface>HTMLSelectElement</dfn> : <span>HTMLElement</span> { | |
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute boolean <dfn attribute for="HTMLSelectElement" data-x="dom-select-multiple">multiple</dfn>; | ||
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLSelectElement" data-x="dom-select-name">name</dfn>; | ||
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute boolean <dfn attribute for="HTMLSelectElement" data-x="dom-select-required">required</dfn>; | ||
[<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>; | ||
[<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>; | ||
<!-- see https://www.w3.org/Bugs/Public/show_bug.cgi?id=12288 for compat reasons why .size allows | ||
0 (it's not limited to values greater than zero) even though that value really makes no sense | ||
--> | ||
|
@@ -140835,8 +140841,8 @@ interface <dfn interface>HTMLMarqueeElement</dfn> : <span>HTMLElement</span> { | |
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLMarqueeElement" data-x="dom-marquee-height">height</dfn>; | ||
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute unsigned long <dfn attribute for="HTMLMarqueeElement" data-x="dom-marquee-hspace">hspace</dfn>; | ||
[<span>CEReactions</span>] attribute long <span data-x="dom-marquee-loop">loop</span>; | ||
[<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>; | ||
[<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>; | ||
[<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>; | ||
[<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>; | ||
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute boolean <dfn attribute for="HTMLMarqueeElement" data-x="dom-marquee-trueSpeed">trueSpeed</dfn>; | ||
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute unsigned long <dfn attribute for="HTMLMarqueeElement" data-x="dom-marquee-vspace">vspace</dfn>; | ||
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute DOMString <dfn attribute for="HTMLMarqueeElement" data-x="dom-marquee-width">width</dfn>; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop the comma here as there's only two alternatives.