[html5] r4313 - [giowt] (0) Correct the 'rules for parsing dimension values' to handle end-of-st [...]

whatwg at whatwg.org whatwg at whatwg.org
Sat Oct 24 15:51:28 PDT 2009


Author: ianh
Date: 2009-10-24 15:51:24 -0700 (Sat, 24 Oct 2009)
New Revision: 4313

Modified:
   complete.html
   index
   source
Log:
[giowt] (0) Correct the 'rules for parsing dimension values' to handle end-of-string properly in the fraction bit.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8021

Modified: complete.html
===================================================================
--- complete.html	2009-10-24 22:42:08 UTC (rev 4312)
+++ complete.html	2009-10-24 22:51:24 UTC (rev 4313)
@@ -3215,23 +3215,34 @@
     <p>If the character indicated by <var title="">position</var> is a
     U+002E FULL STOP character (.):</p>
 
-    <ol><li><p>Advance <var title="">position</var> to the next
+    <ol><ol><li><p>Advance <var title="">position</var> to the next
      character.</li>
 
-     <li><p>If the character indicated by <var title="">position</var>
-     is not one of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9),
-     then return <var title="">value</var> as a length.</li>
+     <li><p>If <var title="">position</var> is past the end of <var title="">input</var>, or if the character indicated by <var title="">position</var> is not one of U+0030 DIGIT ZERO (0) to
+     U+0039 DIGIT NINE (9), then return <var title="">value</var> as a
+     length.</li>
 
-     <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
-     U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). Let <var title="">length</var> be the number of characters collected. Let
-     <var title="">fraction</var> be the result of interpreting the
-     collected characters as a base-ten integer, and then dividing
-     that number by <span title="">10<sup title=""><var title="">length</var></sup></span>.</li>
+     <li><p>Let <var title="">divisor</var> have the value 1.</li>
 
-     <li><p>Increment <var title="">value</var> by <var title="">fraction</var>.</li>
+     <li><p><i>Fraction loop</i>: Multiply <var title="">divisor</var>
+     by ten.</li>
 
-    </ol></li>
+     <li>Add the value of the character indicated by <var title="">position</var>, interpreted as a base-ten digit (0..9)
+     and divided by <var title="">divisor</var>, to <var title="">value</var>.</li>
 
+     <li><p>Advance <var title="">position</var> to the next
+     character.</li>
+
+     <li><p>If <var title="">position</var> is past the end of <var title="">input</var>, then return <var title="">value</var> as a
+     length.</li>
+
+     <li><p>If the character indicated by <var title="">position</var>
+     is one of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), return
+     to the step labeled <i>fraction loop</i> in these
+     substeps.</li>
+
+    </ol></ol></li>
+
    <li><p>If <var title="">position</var> is past the end of <var title="">input</var>, return <var title="">value</var> as a
    length.</li>
 

Modified: index
===================================================================
--- index	2009-10-24 22:42:08 UTC (rev 4312)
+++ index	2009-10-24 22:51:24 UTC (rev 4313)
@@ -3025,23 +3025,34 @@
     <p>If the character indicated by <var title="">position</var> is a
     U+002E FULL STOP character (.):</p>
 
-    <ol><li><p>Advance <var title="">position</var> to the next
+    <ol><ol><li><p>Advance <var title="">position</var> to the next
      character.</li>
 
-     <li><p>If the character indicated by <var title="">position</var>
-     is not one of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9),
-     then return <var title="">value</var> as a length.</li>
+     <li><p>If <var title="">position</var> is past the end of <var title="">input</var>, or if the character indicated by <var title="">position</var> is not one of U+0030 DIGIT ZERO (0) to
+     U+0039 DIGIT NINE (9), then return <var title="">value</var> as a
+     length.</li>
 
-     <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
-     U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). Let <var title="">length</var> be the number of characters collected. Let
-     <var title="">fraction</var> be the result of interpreting the
-     collected characters as a base-ten integer, and then dividing
-     that number by <span title="">10<sup title=""><var title="">length</var></sup></span>.</li>
+     <li><p>Let <var title="">divisor</var> have the value 1.</li>
 
-     <li><p>Increment <var title="">value</var> by <var title="">fraction</var>.</li>
+     <li><p><i>Fraction loop</i>: Multiply <var title="">divisor</var>
+     by ten.</li>
 
-    </ol></li>
+     <li>Add the value of the character indicated by <var title="">position</var>, interpreted as a base-ten digit (0..9)
+     and divided by <var title="">divisor</var>, to <var title="">value</var>.</li>
 
+     <li><p>Advance <var title="">position</var> to the next
+     character.</li>
+
+     <li><p>If <var title="">position</var> is past the end of <var title="">input</var>, then return <var title="">value</var> as a
+     length.</li>
+
+     <li><p>If the character indicated by <var title="">position</var>
+     is one of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), return
+     to the step labeled <i>fraction loop</i> in these
+     substeps.</li>
+
+    </ol></ol></li>
+
    <li><p>If <var title="">position</var> is past the end of <var title="">input</var>, return <var title="">value</var> as a
    length.</li>
 

Modified: source
===================================================================
--- source	2009-10-24 22:42:08 UTC (rev 4312)
+++ source	2009-10-24 22:51:24 UTC (rev 4313)
@@ -2218,24 +2218,39 @@
 
     <ol>
 
+    <ol>
+
      <li><p>Advance <var title="">position</var> to the next
      character.</p></li>
 
-     <li><p>If the character indicated by <var title="">position</var>
-     is not one of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9),
-     then return <var title="">value</var> as a length.</p></li>
+     <li><p>If <var title="">position</var> is past the end of <var
+     title="">input</var>, or if the character indicated by <var
+     title="">position</var> is not one of U+0030 DIGIT ZERO (0) to
+     U+0039 DIGIT NINE (9), then return <var title="">value</var> as a
+     length.</li>
 
-     <li><p><span>Collect a sequence of characters</span> in the range
-     U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). Let <var
-     title="">length</var> be the number of characters collected. Let
-     <var title="">fraction</var> be the result of interpreting the
-     collected characters as a base-ten integer, and then dividing
-     that number by <span title="">10<sup title=""><var
-     title="">length</var></sup></span>.</li>
+     <li><p>Let <var title="">divisor</var> have the value 1.</p></li>
 
-     <li><p>Increment <var title="">value</var> by <var
-     title="">fraction</var>.</p></li>
+     <li><p><i>Fraction loop</i>: Multiply <var title="">divisor</var>
+     by ten.</p></li>
 
+     <li>Add the value of the character indicated by <var
+     title="">position</var>, interpreted as a base-ten digit (0..9)
+     and divided by <var title="">divisor</var>, to <var
+     title="">value</var>.</li>
+
+     <li><p>Advance <var title="">position</var> to the next
+     character.</p></li>
+
+     <li><p>If <var title="">position</var> is past the end of <var
+     title="">input</var>, then return <var title="">value</var> as a
+     length.</li>
+
+     <li><p>If the character indicated by <var title="">position</var>
+     is one of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), return
+     to the step labeled <i>fraction loop</i> in these
+     substeps.</p></li>
+
     </ol>
 
    </li>




More information about the Commit-Watchers mailing list