Skip to content

Commit 6bf4f3c

Browse files
annevkfoolip
authored andcommitted
Make attribute order not matter for <progress>
Fixes #3066.
1 parent 458347c commit 6bf4f3c

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

source

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -51373,47 +51373,49 @@ interface <dfn>HTMLProgressElement</dfn> : <span>HTMLElement</span> {
5137351373

5137451374
<p>If the progress bar is a determinate progress bar, user agents must parse the <code
5137551375
data-x="attr-progress-value">value</code> attribute's value according to the <span>rules for
51376-
parsing floating-point number values</span>. If this does not result in an error, and if the
51377-
parsed value is less than the <span data-x="concept-progress-maximum">maximum value</span> and
51378-
greater than zero, then the <dfn data-x="concept-progress-value">current value</dfn> of the
51379-
progress bar is that parsed value. Otherwise, if the parsed value was greater than or equal to the
51380-
<span data-x="concept-progress-maximum">maximum value</span>, then the <span
51381-
data-x="concept-progress-value">current value</span> of the progress bar is the <span
51382-
data-x="concept-progress-maximum">maximum value</span> of the progress bar. Otherwise, if parsing
51383-
the <code data-x="attr-progress-value">value</code> attribute's value resulted in an error, or a
51384-
number less than or equal to zero, then the <span data-x="concept-progress-value">current
51385-
value</span> of the progress bar is zero.</p>
51376+
parsing floating-point number values</span>. If this does not result in an error and the parsed
51377+
value is greater than zero, then the <dfn data-x="concept-progress-value">value</dfn> of the
51378+
progress bar is that parsed value. Otherwise, if parsing the <code
51379+
data-x="attr-progress-value">value</code> attribute's value resulted in an error or a number less
51380+
than or equal to zero, then the <span data-x="concept-progress-value">value</span> of the progress
51381+
bar is zero.</p>
51382+
51383+
<p>If the progress bar is a determinate progress bar, then the <dfn
51384+
data-x="concept-progress-current-value">current value</dfn> is the <span
51385+
data-x="concept-progress-maximum">maximum value</span>, if <span
51386+
data-x="concept-progress-value">value</span> is greater than the <span
51387+
data-x="concept-progress-maximum">maximum value</span>, and <span
51388+
data-x="concept-progress-value">value</span> otherwise.</p>
5138651389

5138751390
<p><strong>UA requirements for showing the progress bar</strong>: When representing a
5138851391
<code>progress</code> element to the user, the UA should indicate whether it is a determinate or
5138951392
indeterminate progress bar, and in the former case, should indicate the relative position of the
51390-
<span data-x="concept-progress-value">current value</span> relative to the <span
51393+
<span data-x="concept-progress-current-value">current value</span> relative to the <span
5139151394
data-x="concept-progress-maximum">maximum value</span>.</p>
5139251395

5139351396
</div>
5139451397

5139551398
<dl class="domintro">
51396-
5139751399
<dt><var>progress</var> . <code subdfn data-x="dom-progress-position">position</code></dt>
5139851400

5139951401
<dd>
51400-
5140151402
<p>For a determinate progress bar (one with known current and maximum values), returns the
5140251403
result of dividing the current value by the maximum value.</p>
5140351404

5140451405
<p>For an indeterminate progress bar, returns &#x2212;1.</p>
51405-
5140651406
</dd>
51407-
5140851407
</dl>
5140951408

5141051409
<div w-nodev>
5141151410

51412-
<p>If the progress bar is an indeterminate progress bar, then the <dfn><code data-x="dom-progress-position">position</code></dfn> IDL attribute must return &#x2212;1.
51413-
Otherwise, it must return the result of dividing the <span data-x="concept-progress-value">current
51414-
value</span> by the <span data-x="concept-progress-maximum">maximum value</span>.</p>
51411+
<p>If the progress bar is an indeterminate progress bar, then the <dfn><code
51412+
data-x="dom-progress-position">position</code></dfn> IDL attribute must return &#x2212;1.
51413+
Otherwise, it must return the result of dividing the <span
51414+
data-x="concept-progress-current-value">current value</span> by the <span
51415+
data-x="concept-progress-maximum">maximum value</span>.</p>
5141551416

51416-
<p>If the progress bar is an indeterminate progress bar, then the <dfn><code data-x="dom-progress-value">value</code></dfn> IDL attribute, on getting, must return 0.
51417+
<p>If the progress bar is an indeterminate progress bar, then the <dfn><code
51418+
data-x="dom-progress-value">value</code></dfn> IDL attribute, on getting, must return 0.
5141751419
Otherwise, it must return the <span data-x="concept-progress-value">current value</span>. On
5141851420
setting, the given value must be converted to the <span>best representation of the number as a
5141951421
floating-point number</span> and then the <code data-x="dom-progress-value">value</code> content
@@ -120311,6 +120313,7 @@ INSERT INTERFACES HERE
120311120313
Jim Ley,
120312120314
Jim Meehan,
120313120315
Jim Michaels,
120316+
Jinjiang (勾三股四), <!-- GitHub -->
120314120317
Jirka Kosek,
120315120318
Jjgod Jiang,
120316120319
Jo&atilde;o Eiras,

0 commit comments

Comments
 (0)