Skip to content
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

Make attribute order not matter for <progress> #3067

Merged
merged 1 commit into from
Oct 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 22 additions & 19 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -51433,47 +51433,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 @@ -120358,6 +120360,7 @@ INSERT INTERFACES HERE
Jim Ley,
Jim Meehan,
Jim Michaels,
Jinjiang (勾三股四), <!-- GitHub -->
Jirka Kosek,
Jjgod Jiang,
Jo&atilde;o Eiras,
Expand Down