Skip to content

Commit

Permalink
Make attribute order not matter for <progress>
Browse files Browse the repository at this point in the history
Fixes #3066.
  • Loading branch information
annevk authored and foolip committed Oct 3, 2017
1 parent 458347c commit 6bf4f3c
Showing 1 changed file with 22 additions and 19 deletions.
41 changes: 22 additions & 19 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -51373,47 +51373,49 @@ interface <dfn>HTMLProgressElement</dfn> : <span>HTMLElement</span> {

<p>If the progress bar is a determinate progress bar, user agents must parse the <code
data-x="attr-progress-value">value</code> attribute's value according to the <span>rules for
parsing floating-point number values</span>. If this does not result in an error, and if the
parsed value is less than the <span data-x="concept-progress-maximum">maximum value</span> and
greater than zero, then the <dfn data-x="concept-progress-value">current value</dfn> of the
progress bar is that parsed value. Otherwise, if the parsed value was greater than or equal to the
<span data-x="concept-progress-maximum">maximum value</span>, then the <span
data-x="concept-progress-value">current value</span> of the progress bar is the <span
data-x="concept-progress-maximum">maximum value</span> of the progress bar. Otherwise, if parsing
the <code data-x="attr-progress-value">value</code> attribute's value resulted in an error, or a
number less than or equal to zero, then the <span data-x="concept-progress-value">current
value</span> of the progress bar is zero.</p>
parsing floating-point number values</span>. If this does not result in an error and the parsed
value is greater than zero, then the <dfn data-x="concept-progress-value">value</dfn> of the
progress bar is that parsed value. Otherwise, if parsing the <code
data-x="attr-progress-value">value</code> attribute's value resulted in an error or a number less
than or equal to zero, then the <span data-x="concept-progress-value">value</span> of the progress
bar is zero.</p>

<p>If the progress bar is a determinate progress bar, then the <dfn
data-x="concept-progress-current-value">current value</dfn> is the <span
data-x="concept-progress-maximum">maximum value</span>, if <span
data-x="concept-progress-value">value</span> is greater than the <span
data-x="concept-progress-maximum">maximum value</span>, and <span
data-x="concept-progress-value">value</span> otherwise.</p>

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

</div>

<dl class="domintro">

<dt><var>progress</var> . <code subdfn data-x="dom-progress-position">position</code></dt>

<dd>

<p>For a determinate progress bar (one with known current and maximum values), returns the
result of dividing the current value by the maximum value.</p>

<p>For an indeterminate progress bar, returns &#x2212;1.</p>

</dd>

</dl>

<div w-nodev>

<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.
Otherwise, it must return the result of dividing the <span data-x="concept-progress-value">current
value</span> by the <span data-x="concept-progress-maximum">maximum value</span>.</p>
<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.
Otherwise, it must return the result of dividing the <span
data-x="concept-progress-current-value">current value</span> by the <span
data-x="concept-progress-maximum">maximum value</span>.</p>

<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.
<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.
Otherwise, it must return the <span data-x="concept-progress-value">current value</span>. On
setting, the given value must be converted to the <span>best representation of the number as a
floating-point number</span> and then the <code data-x="dom-progress-value">value</code> content
Expand Down Expand Up @@ -120311,6 +120313,7 @@ INSERT INTERFACES HERE
Jim Ley,
Jim Meehan,
Jim Michaels,
Jinjiang (勾三股四), <!-- GitHub -->
Jirka Kosek,
Jjgod Jiang,
Jo&atilde;o Eiras,
Expand Down

0 comments on commit 6bf4f3c

Please sign in to comment.