Skip to content

Commit

Permalink
[agiow] (0) Make meter.value clamp to the specified range on getting.
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10767

git-svn-id: http://svn.whatwg.org/webapps@5592 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 7, 2010
1 parent 2d8a1a2 commit 9edf517
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 39 deletions.
32 changes: 19 additions & 13 deletions complete.html
Expand Up @@ -45163,12 +45163,12 @@ <h4 id=the-progress-element><span class=secno>4.10.16 </span>The <dfn><code>prog

<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>
IDL attribute, on getting, must return &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
Expand Down Expand Up @@ -45339,15 +45339,15 @@ <h4 id=the-meter-element><span class=secno>4.10.17 </span>The <dfn><code>meter</
evaluated is important, as some of the values refer to earlier
ones.)</p>

<dl><dt>The minimum value</dt>
<dl><dt>The <dfn id=concept-meter-minimum title=concept-meter-minimum>minimum value</dfn></dt>

<dd>
<p>If the <code title=attr-meter-min><a href=#attr-meter-min>min</a></code> attribute is
specified and a value could be parsed out of it, then the minimum
value is that value. Otherwise, the minimum value is zero.</p>
</dd>

<dt>The maximum value</dt>
<dt>The <dfn id=concept-meter-maximum title=concept-meter-maximum>maximum value</dfn></dt>

<dd>

Expand All @@ -45360,7 +45360,7 @@ <h4 id=the-meter-element><span class=secno>4.10.17 </span>The <dfn><code>meter</

</dd>

<dt>The actual value</dt>
<dt>The <dfn id=concept-meter-actual title=concept-meter-actual>actual value</dfn></dt>

<dd>

Expand All @@ -45376,7 +45376,7 @@ <h4 id=the-meter-element><span class=secno>4.10.17 </span>The <dfn><code>meter</

</dd>

<dt>The low boundary</dt>
<dt>The <dfn id=concept-meter-low title=concept-meter-low>low boundary</dfn></dt>

<dd>

Expand All @@ -45392,7 +45392,7 @@ <h4 id=the-meter-element><span class=secno>4.10.17 </span>The <dfn><code>meter</

</dd>

<dt>The high boundary</dt>
<dt>The <dfn id=concept-meter-high title=concept-meter-high>high boundary</dfn></dt>

<dd>

Expand All @@ -45408,7 +45408,7 @@ <h4 id=the-meter-element><span class=secno>4.10.17 </span>The <dfn><code>meter</

</dd>

<dt>The optimum point</dt>
<dt>The <dfn id=concept-meter-optimum title=concept-meter-optimum>optimum point</dfn></dt>

<dd>

Expand Down Expand Up @@ -45505,7 +45505,13 @@ <h4 id=the-meter-element><span class=secno>4.10.17 </span>The <dfn><code>meter</

<div class=impl>

<p>The <dfn id=dom-meter-min title=dom-meter-min><code>min</code></dfn>, <dfn id=dom-meter-max title=dom-meter-max><code>max</code></dfn>, <dfn id=dom-meter-value title=dom-meter-value><code>value</code></dfn>, <dfn id=dom-meter-low title=dom-meter-low><code>low</code></dfn>, <dfn id=dom-meter-high title=dom-meter-high><code>high</code></dfn>, and <dfn id=dom-meter-optimum title=dom-meter-optimum><code>optimum</code></dfn> IDL attributes
<p>The <dfn id=dom-meter-value title=dom-meter-value><code>value</code></dfn> IDL
attribute, on getting, must return the <a href=#concept-meter-actual title=concept-meter-actual>actual 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-meter-value><a href=#dom-meter-value>value</a></code> content attribute must be set
to that string.</p>

<p>The <dfn id=dom-meter-min title=dom-meter-min><code>min</code></dfn>, <dfn id=dom-meter-max title=dom-meter-max><code>max</code></dfn>, <dfn id=dom-meter-low title=dom-meter-low><code>low</code></dfn>, <dfn id=dom-meter-high title=dom-meter-high><code>high</code></dfn>, and <dfn id=dom-meter-optimum title=dom-meter-optimum><code>optimum</code></dfn> IDL attributes
must <a href=#reflect>reflect</a> the respective content attributes of the
same name.</p>

Expand Down
32 changes: 19 additions & 13 deletions index
Expand Up @@ -45143,12 +45143,12 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme

<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>
IDL attribute, on getting, must return &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
Expand Down Expand Up @@ -45319,15 +45319,15 @@ and a height of &lt;meter value=2&gt;2cm&lt;/meter&gt;.&lt;/p&gt; &lt;!-- <stron
evaluated is important, as some of the values refer to earlier
ones.)</p>

<dl><dt>The minimum value</dt>
<dl><dt>The <dfn id=concept-meter-minimum title=concept-meter-minimum>minimum value</dfn></dt>

<dd>
<p>If the <code title=attr-meter-min><a href=#attr-meter-min>min</a></code> attribute is
specified and a value could be parsed out of it, then the minimum
value is that value. Otherwise, the minimum value is zero.</p>
</dd>

<dt>The maximum value</dt>
<dt>The <dfn id=concept-meter-maximum title=concept-meter-maximum>maximum value</dfn></dt>

<dd>

Expand All @@ -45340,7 +45340,7 @@ and a height of &lt;meter value=2&gt;2cm&lt;/meter&gt;.&lt;/p&gt; &lt;!-- <stron

</dd>

<dt>The actual value</dt>
<dt>The <dfn id=concept-meter-actual title=concept-meter-actual>actual value</dfn></dt>

<dd>

Expand All @@ -45356,7 +45356,7 @@ and a height of &lt;meter value=2&gt;2cm&lt;/meter&gt;.&lt;/p&gt; &lt;!-- <stron

</dd>

<dt>The low boundary</dt>
<dt>The <dfn id=concept-meter-low title=concept-meter-low>low boundary</dfn></dt>

<dd>

Expand All @@ -45372,7 +45372,7 @@ and a height of &lt;meter value=2&gt;2cm&lt;/meter&gt;.&lt;/p&gt; &lt;!-- <stron

</dd>

<dt>The high boundary</dt>
<dt>The <dfn id=concept-meter-high title=concept-meter-high>high boundary</dfn></dt>

<dd>

Expand All @@ -45388,7 +45388,7 @@ and a height of &lt;meter value=2&gt;2cm&lt;/meter&gt;.&lt;/p&gt; &lt;!-- <stron

</dd>

<dt>The optimum point</dt>
<dt>The <dfn id=concept-meter-optimum title=concept-meter-optimum>optimum point</dfn></dt>

<dd>

Expand Down Expand Up @@ -45485,7 +45485,13 @@ and a height of &lt;meter value=2&gt;2cm&lt;/meter&gt;.&lt;/p&gt; &lt;!-- <stron

<div class=impl>

<p>The <dfn id=dom-meter-min title=dom-meter-min><code>min</code></dfn>, <dfn id=dom-meter-max title=dom-meter-max><code>max</code></dfn>, <dfn id=dom-meter-value title=dom-meter-value><code>value</code></dfn>, <dfn id=dom-meter-low title=dom-meter-low><code>low</code></dfn>, <dfn id=dom-meter-high title=dom-meter-high><code>high</code></dfn>, and <dfn id=dom-meter-optimum title=dom-meter-optimum><code>optimum</code></dfn> IDL attributes
<p>The <dfn id=dom-meter-value title=dom-meter-value><code>value</code></dfn> IDL
attribute, on getting, must return the <a href=#concept-meter-actual title=concept-meter-actual>actual 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-meter-value><a href=#dom-meter-value>value</a></code> content attribute must be set
to that string.</p>

<p>The <dfn id=dom-meter-min title=dom-meter-min><code>min</code></dfn>, <dfn id=dom-meter-max title=dom-meter-max><code>max</code></dfn>, <dfn id=dom-meter-low title=dom-meter-low><code>low</code></dfn>, <dfn id=dom-meter-high title=dom-meter-high><code>high</code></dfn>, and <dfn id=dom-meter-optimum title=dom-meter-optimum><code>optimum</code></dfn> IDL attributes
must <a href=#reflect>reflect</a> the respective content attributes of the
same name.</p>

Expand Down
34 changes: 21 additions & 13 deletions source
Expand Up @@ -50644,12 +50644,13 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {

<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>
IDL attribute, on getting, must return &#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
Expand Down Expand Up @@ -50847,15 +50848,15 @@ and a height of &lt;meter value=2>2cm&lt;/meter>.&lt;/p> &lt;!-- <strong>BAD!</s

<dl>

<dt>The minimum value</dt>
<dt>The <dfn title="concept-meter-minimum">minimum value</dfn></dt>

<dd>
<p>If the <code title="attr-meter-min">min</code> attribute is
specified and a value could be parsed out of it, then the minimum
value is that value. Otherwise, the minimum value is zero.</p>
</dd>

<dt>The maximum value</dt>
<dt>The <dfn title="concept-meter-maximum">maximum value</dfn></dt>

<dd>

Expand All @@ -50868,7 +50869,7 @@ and a height of &lt;meter value=2>2cm&lt;/meter>.&lt;/p> &lt;!-- <strong>BAD!</s

</dd>

<dt>The actual value</dt>
<dt>The <dfn title="concept-meter-actual">actual value</dfn></dt>

<dd>

Expand All @@ -50884,7 +50885,7 @@ and a height of &lt;meter value=2>2cm&lt;/meter>.&lt;/p> &lt;!-- <strong>BAD!</s

</dd>

<dt>The low boundary</dt>
<dt>The <dfn title="concept-meter-low">low boundary</dfn></dt>

<dd>

Expand All @@ -50900,7 +50901,7 @@ and a height of &lt;meter value=2>2cm&lt;/meter>.&lt;/p> &lt;!-- <strong>BAD!</s

</dd>

<dt>The high boundary</dt>
<dt>The <dfn title="concept-meter-high">high boundary</dfn></dt>

<dd>

Expand All @@ -50916,7 +50917,7 @@ and a height of &lt;meter value=2>2cm&lt;/meter>.&lt;/p> &lt;!-- <strong>BAD!</s

</dd>

<dt>The optimum point</dt>
<dt>The <dfn title="concept-meter-optimum">optimum point</dfn></dt>

<dd>

Expand Down Expand Up @@ -51020,9 +51021,16 @@ and a height of &lt;meter value=2>2cm&lt;/meter>.&lt;/p> &lt;!-- <strong>BAD!</s

<div class="impl">

<p>The <dfn title="dom-meter-value"><code>value</code></dfn> IDL
attribute, on getting, must return the <span
title="concept-meter-actual">actual 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-meter-value">value</code> content attribute must be set
to that string.</p>

<p>The <dfn title="dom-meter-min"><code>min</code></dfn>, <dfn
title="dom-meter-max"><code>max</code></dfn>, <dfn
title="dom-meter-value"><code>value</code></dfn>, <dfn
title="dom-meter-low"><code>low</code></dfn>, <dfn
title="dom-meter-high"><code>high</code></dfn>, and <dfn
title="dom-meter-optimum"><code>optimum</code></dfn> IDL attributes
Expand Down

0 comments on commit 9edf517

Please sign in to comment.