[html5] r5591 - [agiow] (0) Make progress.value clamp to the maximum on getting. Fixing http://w [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Oct 7 13:56:15 PDT 2010


Author: ianh
Date: 2010-10-07 13:56:13 -0700 (Thu, 07 Oct 2010)
New Revision: 5591

Modified:
   complete.html
   index
   source
Log:
[agiow] (0) Make progress.value clamp to the maximum on getting.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10767

Modified: complete.html
===================================================================
--- complete.html	2010-10-07 19:52:19 UTC (rev 5590)
+++ complete.html	2010-10-07 20:56:13 UTC (rev 5591)
@@ -45050,20 +45050,17 @@
   </dl><p>The <code><a href=#the-progress-element>progress</a></code> element <a href=#represents>represents</a> the
   completion progress of a task. The progress is either indeterminate,
   indicating that progress is being made but that it is not clear how
-  much more work remains to be done before the task is complete
-  (e.g. because the task is waiting for a remote host to respond), or
-  the progress is a number in the range zero to a maximum, giving the
+  much more work remains to be done before the task is complete (e.g.
+  because the task is waiting for a remote host to respond), or the
+  progress is a number in the range zero to a maximum, giving the
   fraction of work that has so far been completed.</p>
 
   <p>There are two attributes that determine the current task
-  completion represented by the element.</p>
+  completion represented by the element. The <dfn id=attr-progress-value title=attr-progress-value><code>value</code></dfn> attribute
+  specifies how much of the task has been completed, and the <dfn id=attr-progress-max title=attr-progress-max><code>max</code></dfn> attribute specifies
+  how much work the task requires in total. The units are arbitrary
+  and not specified.</p>
 
-  <p>The <dfn id=attr-progress-value title=attr-progress-value><code>value</code></dfn>
-  attribute specifies how much of the task has been completed, and the
-  <dfn id=attr-progress-max title=attr-progress-max><code>max</code></dfn> attribute
-  specifies how much work the task requires in total. The units are
-  arbitrary and not specified.</p>
-
   <p>Authors are encouraged to also include the current value and the
   maximum value inline as text inside the element, so that the
   progress is made available to users of legacy user agents.</p>
@@ -45112,35 +45109,33 @@
   agent must parse the <code title=attr-progress-max><a href=#attr-progress-max>max</a></code>
   attribute's value according to the <a href=#rules-for-parsing-floating-point-number-values>rules for parsing floating
   point number values</a>. If this does not result in an error, and
-  if the parsed value is greater than zero, then the maximum value of
-  the progress bar is that value. Otherwise, if the element has no
-  <code title=attr-progress-max><a href=#attr-progress-max>max</a></code> attribute, or if it has
-  one but parsing it resulted in an error, or if the parsed value was
-  less than or equal to zero, then the maximum value of the progress
-  bar is 1.0.</p>
+  if the parsed value is greater than zero, then the <dfn id=concept-progress-maximum title=concept-progress-maximum>maximum value</dfn> of the progress
+  bar is that value. Otherwise, if the element has no <code title=attr-progress-max><a href=#attr-progress-max>max</a></code> attribute, or if it has one but
+  parsing it resulted in an error, or if the parsed value was less
+  than or equal to zero, then the <a href=#concept-progress-maximum title=concept-progress-maximum>maximum value</a> of the
+  progress bar is 1.0.</p>
 
   <p>If the progress bar is a determinate progress bar, user agents
   must parse the <code title=attr-progress-value><a href=#attr-progress-value>value</a></code>
   attribute's value according to the <a href=#rules-for-parsing-floating-point-number-values>rules for parsing floating
   point number values</a>. If this does not result in an error, and
-  if the parsed value is less than the maximum value and greater than
-  zero, then the current value of the progress bar is that parsed
-  value. Otherwise, if the parsed value was greater than or equal to
-  the maximum value, then the current value of the progress bar is the
-  maximum value of the progress bar. Otherwise, if parsing the <code title=attr-progress-value><a href=#attr-progress-value>value</a></code> attribute's value resulted
-  in an error, or a number less than or equal to zero, then the
-  current value of the progress bar is zero.</p>
+  if the parsed value is less than the <a href=#concept-progress-maximum title=concept-progress-maximum>maximum value</a> and greater
+  than zero, then the <dfn id=concept-progress-value title=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 <a href=#concept-progress-maximum title=concept-progress-maximum>maximum value</a>, then the
+  <a href=#concept-progress-value title=concept-progress-value>current value</a> of the
+  progress bar is the <a href=#concept-progress-maximum title=concept-progress-maximum>maximum
+  value</a> of the progress bar. Otherwise, if parsing the <code title=attr-progress-value><a href=#attr-progress-value>value</a></code> attribute's value resulted
+  in an error, or a number less than or equal to zero, then the <a href=#concept-progress-value title=concept-progress-value>current value</a> of the
+  progress bar is zero.</p>
 
   <p><strong>UA requirements for showing the progress bar</strong>:
   When representing a <code><a href=#the-progress-element>progress</a></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 current value relative to the maximum value.</p>
+  position of the <a href=#concept-progress-value title=concept-progress-value>current
+  value</a> relative to the <a href=#concept-progress-maximum title=concept-progress-maximum>maximum value</a>.</p>
 
-  <p>The <dfn id=dom-progress-max title=dom-progress-max><code>max</code></dfn> and <dfn id=dom-progress-value title=dom-progress-value><code>value</code></dfn> IDL attributes
-  must <a href=#reflect>reflect</a> the respective content attributes of the
-  same name. The default value for <code title=dom-progress-max><a href=#dom-progress-max>max</a></code> is 1.0.</p>
-
   <p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to
   explicitly associate the <code><a href=#the-progress-element>progress</a></code> element with its
   <a href=#form-owner>form owner</a>.</p>
@@ -45157,13 +45152,28 @@
 
     <p>For an indeterminate progress bar, returns −1.</p>
 
+   </dd>
+
   </dl><div class=impl>
 
   <p>If the progress bar is an indeterminate progress bar, then the
   <dfn id=dom-progress-position title=dom-progress-position><code>position</code></dfn> IDL
-  attribute must return −1. Otherwise, it must return the result of
-  dividing the current value by the maximum value.</p>
+  attribute must return −1. Otherwise, it must return the
+  result of dividing the <a href=#concept-progress-value title=concept-progress-value>current value</a> by the <a href=#concept-progress-maximum title=concept-progress-maximum>maximum value</a>.</p>
 
+  <p>Similarly, if the progress bar is an indeterminate progress bar,
+  then the <dfn id=dom-progress-value title=dom-progress-value><code>value</code></dfn>
+  IDL attribute, on getting, must −1. Otherwise, it must return
+  the <a href=#concept-progress-value title=concept-progress-value>current value</a>. On
+  setting, the given value must be converted to the <a href=#best-representation-of-the-number-as-a-floating-point-number>best
+  representation of the number as a floating point number</a> and
+  then the <code title=dom-progress-value><a href=#dom-progress-value>value</a></code> content
+  attribute must be set to that string.</p>
+
+  <p>The <dfn id=dom-progress-max title=dom-progress-max><code>max</code></dfn> IDL
+  attribute must <a href=#reflect>reflect</a> the content attribute of the
+  same name. The default value for <code title=dom-progress-max><a href=#dom-progress-max>max</a></code> is 1.0.</p>
+
   <p>The <code title=dom-lfe-labels><a href=#dom-lfe-labels>labels</a></code> attribute provides
   a list of the element's <code><a href=#the-label-element>label</a></code>s. The <code title=dom-fae-form><a href=#dom-fae-form>form</a></code> IDL attribute is part of the
   element's forms API.</p>

Modified: index
===================================================================
--- index	2010-10-07 19:52:19 UTC (rev 5590)
+++ index	2010-10-07 20:56:13 UTC (rev 5591)
@@ -45030,20 +45030,17 @@
   </dl><p>The <code><a href=#the-progress-element>progress</a></code> element <a href=#represents>represents</a> the
   completion progress of a task. The progress is either indeterminate,
   indicating that progress is being made but that it is not clear how
-  much more work remains to be done before the task is complete
-  (e.g. because the task is waiting for a remote host to respond), or
-  the progress is a number in the range zero to a maximum, giving the
+  much more work remains to be done before the task is complete (e.g.
+  because the task is waiting for a remote host to respond), or the
+  progress is a number in the range zero to a maximum, giving the
   fraction of work that has so far been completed.</p>
 
   <p>There are two attributes that determine the current task
-  completion represented by the element.</p>
+  completion represented by the element. The <dfn id=attr-progress-value title=attr-progress-value><code>value</code></dfn> attribute
+  specifies how much of the task has been completed, and the <dfn id=attr-progress-max title=attr-progress-max><code>max</code></dfn> attribute specifies
+  how much work the task requires in total. The units are arbitrary
+  and not specified.</p>
 
-  <p>The <dfn id=attr-progress-value title=attr-progress-value><code>value</code></dfn>
-  attribute specifies how much of the task has been completed, and the
-  <dfn id=attr-progress-max title=attr-progress-max><code>max</code></dfn> attribute
-  specifies how much work the task requires in total. The units are
-  arbitrary and not specified.</p>
-
   <p>Authors are encouraged to also include the current value and the
   maximum value inline as text inside the element, so that the
   progress is made available to users of legacy user agents.</p>
@@ -45092,35 +45089,33 @@
   agent must parse the <code title=attr-progress-max><a href=#attr-progress-max>max</a></code>
   attribute's value according to the <a href=#rules-for-parsing-floating-point-number-values>rules for parsing floating
   point number values</a>. If this does not result in an error, and
-  if the parsed value is greater than zero, then the maximum value of
-  the progress bar is that value. Otherwise, if the element has no
-  <code title=attr-progress-max><a href=#attr-progress-max>max</a></code> attribute, or if it has
-  one but parsing it resulted in an error, or if the parsed value was
-  less than or equal to zero, then the maximum value of the progress
-  bar is 1.0.</p>
+  if the parsed value is greater than zero, then the <dfn id=concept-progress-maximum title=concept-progress-maximum>maximum value</dfn> of the progress
+  bar is that value. Otherwise, if the element has no <code title=attr-progress-max><a href=#attr-progress-max>max</a></code> attribute, or if it has one but
+  parsing it resulted in an error, or if the parsed value was less
+  than or equal to zero, then the <a href=#concept-progress-maximum title=concept-progress-maximum>maximum value</a> of the
+  progress bar is 1.0.</p>
 
   <p>If the progress bar is a determinate progress bar, user agents
   must parse the <code title=attr-progress-value><a href=#attr-progress-value>value</a></code>
   attribute's value according to the <a href=#rules-for-parsing-floating-point-number-values>rules for parsing floating
   point number values</a>. If this does not result in an error, and
-  if the parsed value is less than the maximum value and greater than
-  zero, then the current value of the progress bar is that parsed
-  value. Otherwise, if the parsed value was greater than or equal to
-  the maximum value, then the current value of the progress bar is the
-  maximum value of the progress bar. Otherwise, if parsing the <code title=attr-progress-value><a href=#attr-progress-value>value</a></code> attribute's value resulted
-  in an error, or a number less than or equal to zero, then the
-  current value of the progress bar is zero.</p>
+  if the parsed value is less than the <a href=#concept-progress-maximum title=concept-progress-maximum>maximum value</a> and greater
+  than zero, then the <dfn id=concept-progress-value title=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 <a href=#concept-progress-maximum title=concept-progress-maximum>maximum value</a>, then the
+  <a href=#concept-progress-value title=concept-progress-value>current value</a> of the
+  progress bar is the <a href=#concept-progress-maximum title=concept-progress-maximum>maximum
+  value</a> of the progress bar. Otherwise, if parsing the <code title=attr-progress-value><a href=#attr-progress-value>value</a></code> attribute's value resulted
+  in an error, or a number less than or equal to zero, then the <a href=#concept-progress-value title=concept-progress-value>current value</a> of the
+  progress bar is zero.</p>
 
   <p><strong>UA requirements for showing the progress bar</strong>:
   When representing a <code><a href=#the-progress-element>progress</a></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 current value relative to the maximum value.</p>
+  position of the <a href=#concept-progress-value title=concept-progress-value>current
+  value</a> relative to the <a href=#concept-progress-maximum title=concept-progress-maximum>maximum value</a>.</p>
 
-  <p>The <dfn id=dom-progress-max title=dom-progress-max><code>max</code></dfn> and <dfn id=dom-progress-value title=dom-progress-value><code>value</code></dfn> IDL attributes
-  must <a href=#reflect>reflect</a> the respective content attributes of the
-  same name. The default value for <code title=dom-progress-max><a href=#dom-progress-max>max</a></code> is 1.0.</p>
-
   <p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to
   explicitly associate the <code><a href=#the-progress-element>progress</a></code> element with its
   <a href=#form-owner>form owner</a>.</p>
@@ -45137,13 +45132,28 @@
 
     <p>For an indeterminate progress bar, returns −1.</p>
 
+   </dd>
+
   </dl><div class=impl>
 
   <p>If the progress bar is an indeterminate progress bar, then the
   <dfn id=dom-progress-position title=dom-progress-position><code>position</code></dfn> IDL
-  attribute must return −1. Otherwise, it must return the result of
-  dividing the current value by the maximum value.</p>
+  attribute must return −1. Otherwise, it must return the
+  result of dividing the <a href=#concept-progress-value title=concept-progress-value>current value</a> by the <a href=#concept-progress-maximum title=concept-progress-maximum>maximum value</a>.</p>
 
+  <p>Similarly, if the progress bar is an indeterminate progress bar,
+  then the <dfn id=dom-progress-value title=dom-progress-value><code>value</code></dfn>
+  IDL attribute, on getting, must −1. Otherwise, it must return
+  the <a href=#concept-progress-value title=concept-progress-value>current value</a>. On
+  setting, the given value must be converted to the <a href=#best-representation-of-the-number-as-a-floating-point-number>best
+  representation of the number as a floating point number</a> and
+  then the <code title=dom-progress-value><a href=#dom-progress-value>value</a></code> content
+  attribute must be set to that string.</p>
+
+  <p>The <dfn id=dom-progress-max title=dom-progress-max><code>max</code></dfn> IDL
+  attribute must <a href=#reflect>reflect</a> the content attribute of the
+  same name. The default value for <code title=dom-progress-max><a href=#dom-progress-max>max</a></code> is 1.0.</p>
+
   <p>The <code title=dom-lfe-labels><a href=#dom-lfe-labels>labels</a></code> attribute provides
   a list of the element's <code><a href=#the-label-element>label</a></code>s. The <code title=dom-fae-form><a href=#dom-fae-form>form</a></code> IDL attribute is part of the
   element's forms API.</p>

Modified: source
===================================================================
--- source	2010-10-07 19:52:19 UTC (rev 5590)
+++ source	2010-10-07 20:56:13 UTC (rev 5591)
@@ -50511,20 +50511,19 @@
   <p>The <code>progress</code> element <span>represents</span> the
   completion progress of a task. The progress is either indeterminate,
   indicating that progress is being made but that it is not clear how
-  much more work remains to be done before the task is complete
-  (e.g. because the task is waiting for a remote host to respond), or
-  the progress is a number in the range zero to a maximum, giving the
+  much more work remains to be done before the task is complete (e.g.
+  because the task is waiting for a remote host to respond), or the
+  progress is a number in the range zero to a maximum, giving the
   fraction of work that has so far been completed.</p>
 
   <p>There are two attributes that determine the current task
-  completion represented by the element.</p>
+  completion represented by the element. The <dfn
+  title="attr-progress-value"><code>value</code></dfn> attribute
+  specifies how much of the task has been completed, and the <dfn
+  title="attr-progress-max"><code>max</code></dfn> attribute specifies
+  how much work the task requires in total. The units are arbitrary
+  and not specified.</p>
 
-  <p>The <dfn title="attr-progress-value"><code>value</code></dfn>
-  attribute specifies how much of the task has been completed, and the
-  <dfn title="attr-progress-max"><code>max</code></dfn> attribute
-  specifies how much work the task requires in total. The units are
-  arbitrary and not specified.</p>
-
   <p>Authors are encouraged to also include the current value and the
   maximum value inline as text inside the element, so that the
   progress is made available to users of legacy user agents.</p>
@@ -50577,38 +50576,41 @@
   agent must parse the <code title="attr-progress-max">max</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 greater than zero, then the maximum value of
-  the progress bar is that value. Otherwise, if the element has no
-  <code title="attr-progress-max">max</code> attribute, or if it has
-  one but parsing it resulted in an error, or if the parsed value was
-  less than or equal to zero, then the maximum value of the progress
-  bar is 1.0.</p>
+  if the parsed value is greater than zero, then the <dfn
+  title="concept-progress-maximum">maximum value</dfn> of the progress
+  bar is that value. Otherwise, if the element has no <code
+  title="attr-progress-max">max</code> attribute, or if it has one but
+  parsing it resulted in an error, or if the parsed value was less
+  than or equal to zero, then the <span
+  title="concept-progress-maximum">maximum value</span> of the
+  progress bar is 1.0.</p>
 
   <p>If the progress bar is a determinate progress bar, user agents
   must parse the <code title="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 maximum value and greater than
-  zero, then the current value of the progress bar is that parsed
-  value. Otherwise, if the parsed value was greater than or equal to
-  the maximum value, then the current value of the progress bar is the
-  maximum value of the progress bar. Otherwise, if parsing the <code
+  if the parsed value is less than the <span
+  title="concept-progress-maximum">maximum value</span> and greater
+  than zero, then the <dfn title="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
+  title="concept-progress-maximum">maximum value</span>, then the
+  <span title="concept-progress-value">current value</span> of the
+  progress bar is the <span title="concept-progress-maximum">maximum
+  value</span> of the progress bar. Otherwise, if parsing the <code
   title="attr-progress-value">value</code> attribute's value resulted
-  in an error, or a number less than or equal to zero, then the
-  current value of the progress bar is zero.</p>
+  in an error, or a number less than or equal to zero, then the <span
+  title="concept-progress-value">current value</span> of the
+  progress bar is zero.</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 current value relative to the maximum value.</p>
+  position of the <span title="concept-progress-value">current
+  value</span> relative to the <span
+  title="concept-progress-maximum">maximum value</span>.</p>
 
-  <p>The <dfn title="dom-progress-max"><code>max</code></dfn> and <dfn
-  title="dom-progress-value"><code>value</code></dfn> IDL attributes
-  must <span>reflect</span> the respective content attributes of the
-  same name. The default value for <code
-  title="dom-progress-max">max</code> is 1.0.</p>
-
   <p>The <code title="attr-fae-form">form</code> attribute is used to
   explicitly associate the <code>progress</code> element with its
   <span>form owner</span>.</p>
@@ -50627,15 +50629,33 @@
 
     <p>For an indeterminate progress bar, returns &#x2212;1.</p>
 
+   </dd>
+
   </dl>
 
   <div class="impl">
 
   <p>If the progress bar is an indeterminate progress bar, then the
   <dfn title="dom-progress-position"><code>position</code></dfn> IDL
-  attribute must return &#x2212;1. Otherwise, it must return the result of
-  dividing the current value by the maximum value.</p>
+  attribute must return &#x2212;1. Otherwise, it must return the
+  result of dividing the <span
+  title="concept-progress-value">current value</span> by the <span
+  title="concept-progress-maximum">maximum value</span>.</p>
 
+  <p>Similarly, if the progress bar is an indeterminate progress bar,
+  then the <dfn title="dom-progress-value"><code>value</code></dfn>
+  IDL attribute, on getting, must &#x2212;1. Otherwise, it must return
+  the <span title="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 title="dom-progress-value">value</code> content
+  attribute must be set to that string.</p>
+
+  <p>The <dfn title="dom-progress-max"><code>max</code></dfn> IDL
+  attribute must <span>reflect</span> the content attribute of the
+  same name. The default value for <code
+  title="dom-progress-max">max</code> is 1.0.</p>
+
   <p>The <code title="dom-lfe-labels">labels</code> attribute provides
   a list of the element's <code>label</code>s. The <code
   title="dom-fae-form">form</code> IDL attribute is part of the




More information about the Commit-Watchers mailing list