Skip to content

Commit

Permalink
[cgiowt] (0) Fix an error in the way <meter> and <progress> handle '0…
Browse files Browse the repository at this point in the history
….' in the input.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8013

git-svn-id: http://svn.whatwg.org/webapps@4302 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 23, 2009
1 parent dc06ce3 commit 8cab543
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 52 deletions.
37 changes: 19 additions & 18 deletions complete.html
Expand Up @@ -3155,10 +3155,9 @@ <h5 id=ratios><span class=secno>2.4.4.4 </span>Ratios</h5>
DIGIT NINE (9), and assign this string of one or more characters to
<var title="">string</var>.</li>

<li>If the first character of <var title="">string</var> is a
U+002E FULL STOP character, or if <var title="">string</var>
contains more than one U+002E FULL STOP character, then return an
error condition and abort these steps.</li>
<li>If the first character or the last character of <var title="">string</var> is a U+002E FULL STOP character, or if <var title="">string</var> contains more than one U+002E FULL STOP
character, then return an error condition and abort these
steps.</li>

<li>Parse <var title="">string</var> according to the <a href=#rules-for-parsing-floating-point-number-values>rules
for parsing floating point number values</a>, to obtain <var title="">number</var>. This step cannot fail (<var title="">string</var> is guaranteed to be a <a href=#valid-floating-point-number>valid floating
Expand Down Expand Up @@ -17372,15 +17371,15 @@ <h4 id=the-progress-element><span class=secno>4.6.18 </span>The <dfn><code>progr
and the <code title=attr-progress-max><a href=#attr-progress-max>max</a></code> attribute are
both specified. (The contents of the element are ignored.)</li>

</ul><p>For the purposes of these requirements, a number is a sequence of
</ul><!-- next three paragraphs are also in the <meter> section --><p>For the purposes of these requirements, a number is a sequence of
characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
(9), optionally including a single U+002E FULL STOP character (.) in
some position after the first digit, interpreted as a base ten
number. Numbers must be separated from other numbers by at least one
character that isn't any of the aforementioned. In addition, if the
element is required to contain numbers, then the contents of the
element must not contain any U+002E FULL STOP characters (.) that
aren't part of numbers.</p>
some position after the first digit and before the last digit,
interpreted as a base ten number. Numbers must be separated from
other numbers by at least one character that isn't any of the
aforementioned. In addition, if the element is required to contain
numbers, then the contents of the element must not contain any
U+002E FULL STOP characters (.) that aren't part of numbers.</p>

<p>A number if said to be followed by a <a href=#valid-denominator-punctuation-character title="valid
denominator punctuation character">denominator punctuation
Expand All @@ -17391,6 +17390,7 @@ <h4 id=the-progress-element><span class=secno>4.6.18 </span>The <dfn><code>progr
<p>The contents of the element consist of the concatenation of
the <a href=#text-node title="text node">text nodes</a> of all the descendants
of the element, in <a href=#tree-order>tree order</a>.</p>
<!-- previous three paragraphs are also in the <meter> section -->

<p>The <code title=attr-progress-value><a href=#attr-progress-value>value</a></code> and <code title=attr-progress-max><a href=#attr-progress-max>max</a></code> attributes, when present, must
have values that are <a href=#valid-floating-point-number title="valid floating point number">valid
Expand Down Expand Up @@ -17684,15 +17684,15 @@ <h4 id=the-meter-element><span class=secno>4.6.19 </span>The <dfn><code>meter</c

</dd>

</dl><p>For the purposes of these requirements, a number is a sequence of
</dl><!-- next three paragraphs are also in the <progress> section --><p>For the purposes of these requirements, a number is a sequence of
characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
(9), optionally including a single U+002E FULL STOP character (.) in
some position after the first digit, interpreted as a base ten
number. Numbers must be separated from other numbers by at least one
character that isn't any of the aforementioned. In addition, if the
element is required to contain numbers, then the contents of the
element must not contain any U+002E FULL STOP characters (.) that
aren't part of numbers.</p>
some position after the first digit and before the last digit,
interpreted as a base ten number. Numbers must be separated from
other numbers by at least one character that isn't any of the
aforementioned. In addition, if the element is required to contain
numbers, then the contents of the element must not contain any
U+002E FULL STOP characters (.) that aren't part of numbers.</p>

<p>A number if said to be followed by a <a href=#valid-denominator-punctuation-character title="valid
denominator punctuation character">denominator punctuation
Expand All @@ -17703,6 +17703,7 @@ <h4 id=the-meter-element><span class=secno>4.6.19 </span>The <dfn><code>meter</c
<p>The contents of the element consist of the concatenation of
the <a href=#text-node title="text node">text nodes</a> of all the descendants
of the element, in <a href=#tree-order>tree order</a>.</p>
<!-- previous three paragraphs are also in the <progress> section -->

<p>The <code title=attr-meter-value><a href=#attr-meter-value>value</a></code>, <code title=attr-meter-min><a href=#attr-meter-min>min</a></code>, <code title=attr-meter-low><a href=#attr-meter-low>low</a></code>, <code title=attr-meter-high><a href=#attr-meter-high>high</a></code>, <code title=attr-meter-max><a href=#attr-meter-max>max</a></code>, and <code title=attr-meter-optimum><a href=#attr-meter-optimum>optimum</a></code> attributes, when present,
must have values that are <a href=#valid-floating-point-number title="valid floating point
Expand Down
37 changes: 19 additions & 18 deletions index
Expand Up @@ -2965,10 +2965,9 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
DIGIT NINE (9), and assign this string of one or more characters to
<var title="">string</var>.</li>

<li>If the first character of <var title="">string</var> is a
U+002E FULL STOP character, or if <var title="">string</var>
contains more than one U+002E FULL STOP character, then return an
error condition and abort these steps.</li>
<li>If the first character or the last character of <var title="">string</var> is a U+002E FULL STOP character, or if <var title="">string</var> contains more than one U+002E FULL STOP
character, then return an error condition and abort these
steps.</li>

<li>Parse <var title="">string</var> according to the <a href=#rules-for-parsing-floating-point-number-values>rules
for parsing floating point number values</a>, to obtain <var title="">number</var>. This step cannot fail (<var title="">string</var> is guaranteed to be a <a href=#valid-floating-point-number>valid floating
Expand Down Expand Up @@ -17182,15 +17181,15 @@ wormhole connection.&lt;/mark&gt;&lt;/p&gt;</pre>
and the <code title=attr-progress-max><a href=#attr-progress-max>max</a></code> attribute are
both specified. (The contents of the element are ignored.)</li>

</ul><p>For the purposes of these requirements, a number is a sequence of
</ul><!-- next three paragraphs are also in the <meter> section --><p>For the purposes of these requirements, a number is a sequence of
characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
(9), optionally including a single U+002E FULL STOP character (.) in
some position after the first digit, interpreted as a base ten
number. Numbers must be separated from other numbers by at least one
character that isn't any of the aforementioned. In addition, if the
element is required to contain numbers, then the contents of the
element must not contain any U+002E FULL STOP characters (.) that
aren't part of numbers.</p>
some position after the first digit and before the last digit,
interpreted as a base ten number. Numbers must be separated from
other numbers by at least one character that isn't any of the
aforementioned. In addition, if the element is required to contain
numbers, then the contents of the element must not contain any
U+002E FULL STOP characters (.) that aren't part of numbers.</p>

<p>A number if said to be followed by a <a href=#valid-denominator-punctuation-character title="valid
denominator punctuation character">denominator punctuation
Expand All @@ -17201,6 +17200,7 @@ wormhole connection.&lt;/mark&gt;&lt;/p&gt;</pre>
<p>The contents of the element consist of the concatenation of
the <a href=#text-node title="text node">text nodes</a> of all the descendants
of the element, in <a href=#tree-order>tree order</a>.</p>
<!-- previous three paragraphs are also in the <meter> section -->

<p>The <code title=attr-progress-value><a href=#attr-progress-value>value</a></code> and <code title=attr-progress-max><a href=#attr-progress-max>max</a></code> attributes, when present, must
have values that are <a href=#valid-floating-point-number title="valid floating point number">valid
Expand Down Expand Up @@ -17494,15 +17494,15 @@ wormhole connection.&lt;/mark&gt;&lt;/p&gt;</pre>

</dd>

</dl><p>For the purposes of these requirements, a number is a sequence of
</dl><!-- next three paragraphs are also in the <progress> section --><p>For the purposes of these requirements, a number is a sequence of
characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
(9), optionally including a single U+002E FULL STOP character (.) in
some position after the first digit, interpreted as a base ten
number. Numbers must be separated from other numbers by at least one
character that isn't any of the aforementioned. In addition, if the
element is required to contain numbers, then the contents of the
element must not contain any U+002E FULL STOP characters (.) that
aren't part of numbers.</p>
some position after the first digit and before the last digit,
interpreted as a base ten number. Numbers must be separated from
other numbers by at least one character that isn't any of the
aforementioned. In addition, if the element is required to contain
numbers, then the contents of the element must not contain any
U+002E FULL STOP characters (.) that aren't part of numbers.</p>

<p>A number if said to be followed by a <a href=#valid-denominator-punctuation-character title="valid
denominator punctuation character">denominator punctuation
Expand All @@ -17513,6 +17513,7 @@ wormhole connection.&lt;/mark&gt;&lt;/p&gt;</pre>
<p>The contents of the element consist of the concatenation of
the <a href=#text-node title="text node">text nodes</a> of all the descendants
of the element, in <a href=#tree-order>tree order</a>.</p>
<!-- previous three paragraphs are also in the <progress> section -->

<p>The <code title=attr-meter-value><a href=#attr-meter-value>value</a></code>, <code title=attr-meter-min><a href=#attr-meter-min>min</a></code>, <code title=attr-meter-low><a href=#attr-meter-low>low</a></code>, <code title=attr-meter-high><a href=#attr-meter-high>high</a></code>, <code title=attr-meter-max><a href=#attr-meter-max>max</a></code>, and <code title=attr-meter-optimum><a href=#attr-meter-optimum>optimum</a></code> attributes, when present,
must have values that are <a href=#valid-floating-point-number title="valid floating point
Expand Down
37 changes: 21 additions & 16 deletions source
Expand Up @@ -2141,10 +2141,11 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
DIGIT NINE (9), and assign this string of one or more characters to
<var title="">string</var>.</li>

<li>If the first character of <var title="">string</var> is a
U+002E FULL STOP character, or if <var title="">string</var>
contains more than one U+002E FULL STOP character, then return an
error condition and abort these steps.</li>
<li>If the first character or the last character of <var
title="">string</var> is a U+002E FULL STOP character, or if <var
title="">string</var> contains more than one U+002E FULL STOP
character, then return an error condition and abort these
steps.</li>

<li>Parse <var title="">string</var> according to the <span>rules
for parsing floating point number values</span>, to obtain <var
Expand Down Expand Up @@ -18356,15 +18357,16 @@ wormhole connection.&lt;/mark>&lt;/p></pre>

</ul>

<!-- next three paragraphs are also in the <meter> section -->
<p>For the purposes of these requirements, a number is a sequence of
characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
(9), optionally including a single U+002E FULL STOP character (.) in
some position after the first digit, interpreted as a base ten
number. Numbers must be separated from other numbers by at least one
character that isn't any of the aforementioned. In addition, if the
element is required to contain numbers, then the contents of the
element must not contain any U+002E FULL STOP characters (.) that
aren't part of numbers.</p>
some position after the first digit and before the last digit,
interpreted as a base ten number. Numbers must be separated from
other numbers by at least one character that isn't any of the
aforementioned. In addition, if the element is required to contain
numbers, then the contents of the element must not contain any
U+002E FULL STOP characters (.) that aren't part of numbers.</p>

<p>A number if said to be followed by a <span title="valid
denominator punctuation character">denominator punctuation
Expand All @@ -18375,6 +18377,7 @@ wormhole connection.&lt;/mark>&lt;/p></pre>
<p>The contents of the element consist of the concatenation of
the <span title="text node">text nodes</span> of all the descendants
of the element, in <span>tree order</span>.</p>
<!-- previous three paragraphs are also in the <meter> section -->

<p>The <code title="attr-progress-value">value</code> and <code
title="attr-progress-max">max</code> attributes, when present, must
Expand Down Expand Up @@ -18714,15 +18717,16 @@ wormhole connection.&lt;/mark>&lt;/p></pre>

</dl>

<!-- next three paragraphs are also in the <progress> section -->
<p>For the purposes of these requirements, a number is a sequence of
characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
(9), optionally including a single U+002E FULL STOP character (.) in
some position after the first digit, interpreted as a base ten
number. Numbers must be separated from other numbers by at least one
character that isn't any of the aforementioned. In addition, if the
element is required to contain numbers, then the contents of the
element must not contain any U+002E FULL STOP characters (.) that
aren't part of numbers.</p>
some position after the first digit and before the last digit,
interpreted as a base ten number. Numbers must be separated from
other numbers by at least one character that isn't any of the
aforementioned. In addition, if the element is required to contain
numbers, then the contents of the element must not contain any
U+002E FULL STOP characters (.) that aren't part of numbers.</p>

<p>A number if said to be followed by a <span title="valid
denominator punctuation character">denominator punctuation
Expand All @@ -18733,6 +18737,7 @@ wormhole connection.&lt;/mark>&lt;/p></pre>
<p>The contents of the element consist of the concatenation of
the <span title="text node">text nodes</span> of all the descendants
of the element, in <span>tree order</span>.</p>
<!-- previous three paragraphs are also in the <progress> section -->

<p>The <code title="attr-meter-value">value</code>, <code
title="attr-meter-min">min</code>, <code
Expand Down

0 comments on commit 8cab543

Please sign in to comment.