html5/spec Overview.html,1.4468,1.4469

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv10897

Modified Files:
	Overview.html 
Log Message:
Make progress.value clamp to the maximum on getting. (whatwg r5591)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.4468
retrieving revision 1.4469
diff -u -d -r1.4468 -r1.4469
--- Overview.html	7 Oct 2010 19:52:25 -0000	1.4468
+++ Overview.html	7 Oct 2010 20:56:22 -0000	1.4469
@@ -34072,15 +34072,14 @@
   </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>There are two attributes that determine the current task
-  completion represented by the element.<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>Authors are encouraged to also include the current value and the
+  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>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.<div class="example">
    <p>Here is a snippet of a Web application that shows the progress
@@ -34120,34 +34119,32 @@
   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>
-
-  <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>
+  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 <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
@@ -34163,12 +34160,27 @@
 
     <p>For an indeterminate progress bar, returns &minus;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 &minus;1. Otherwise, it must return the result of
-  dividing the current value by the maximum value.</p>
+  attribute must return &minus;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 &minus;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

Received on Thursday, 7 October 2010 20:56:27 UTC