html5/spec Overview.html,1.1415,1.1416

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

Modified Files:
	Overview.html 
Log Message:
WF2: Revamp min/max/step, valueAsDate, valueAsNumber, stepUp, stepDown, and type=datetime. (whatwg r2243)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1415
retrieving revision 1.1416
diff -u -d -r1.1415 -r1.1416
--- Overview.html	26 Sep 2008 08:59:44 -0000	1.1415
+++ Overview.html	30 Sep 2008 03:14:34 -0000	1.1416
@@ -27,7 +27,7 @@
     for HTML and XHTML</h2>
 
    <h2 class="no-num no-toc" id=editors0><!-- "W3C Working Draft" -->
-    Editor's Draft <!--ZZZ-->26 September 2008</h2>
+    Editor's Draft <!--ZZZ-->30 September 2008</h2>
 
    <dl><!-- ZZZ: update the month/day
     <dt>This Version:</dt>
@@ -199,7 +199,7 @@
 
   <p>The W3C <a href="http://www.w3.org/html/wg/">HTML Working Group</a> is
    the W3C working group responsible for this specification's progress along
-   the W3C Recommendation track. <!--ZZZ:--> This specification is the 26
+   the W3C Recommendation track. <!--ZZZ:--> This specification is the 30
    September 2008 <!--ZZZ "Working Draft"-->Editor's Draft. <!--:ZZZ--></p>
   <!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST -->
   <!-- relationship to other work (required) -->
@@ -1148,8 +1148,12 @@
             </span>The <code title=attr-input-readonly>readonly</code>
             attribute</a>
 
-           <li><a href="#other0"><span class=secno>4.10.4.2.4. </span>Other
-            attributes</a>
+           <li><a href="#the-min"><span class=secno>4.10.4.2.4. </span>The
+            <code title=attr-input-min>min</code> and <code
+            title=attr-input-max>max</code> attributes</a>
+
+           <li><a href="#the-step"><span class=secno>4.10.4.2.5. </span>The
+            <code title=attr-input-step>step</code> attribute</a>
           </ul>
 
          <li><a href="#common5"><span class=secno>4.10.4.3. </span>Common
@@ -1771,7 +1775,7 @@
             </span>Link type "<code>prev</code>"</a>
           </ul>
 
-         <li><a href="#other1"><span class=secno>5.11.3.20. </span>Other link
+         <li><a href="#other0"><span class=secno>5.11.3.20. </span>Other link
           types</a>
         </ul>
       </ul>
@@ -3503,7 +3507,7 @@
   <p>The <dfn id=rules1>rules for parsing floating point number values</dfn>
    are as given in the following algorithm. As with the previous algorithms,
    when this one is invoked, the steps must be followed in the order given,
-   aborting at the first step that returns a value. This algorithm will
+   aborting at the first step that returns something. This algorithm will
    either return a number or an error. Leading spaces are ignored. Trailing
    spaces and garbage characters are ignored.
 
@@ -3560,8 +3564,7 @@
      title="">value</var> by that integer.
 
    <li>If <var title="">position</var> is past the end of <var
-    title="">input</var>, return <var title="">value</var> and abort these
-    steps.
+    title="">input</var>, return <var title="">value</var>.
 
    <li>
     <p>If the character indicated by <var title="">position</var> is a U+002E
@@ -3575,8 +3578,7 @@
       <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) .. U+0039
-       DIGIT NINE (9), then return <var title="">value</var> and abort these
-       steps.
+       DIGIT NINE (9), then return <var title="">value</var>.
 
      <li>
       <p><i>Fraction loop</i>: Multiply <var title="">divisor</var> by ten.
@@ -3590,8 +3592,7 @@
 
      <li>
       <p>If <var title="">position</var> is past the end of <var
-       title="">input</var>, then return <var title="">value</var> and abort
-       these steps.
+       title="">input</var>, then return <var title="">value</var>.
 
      <li>
       <p>If the character indicated by <var title="">position</var> is one of
@@ -3610,8 +3611,7 @@
 
      <li>
       <p>If <var title="">position</var> is past the end of <var
-       title="">input</var>, then return <var title="">value</var> and abort
-       these steps.
+       title="">input</var>, then return <var title="">value</var>.
 
      <li>
       <p>If the character indicated by <var title="">position</var> is a
@@ -3624,14 +3624,13 @@
 
        <li>
         <p>If <var title="">position</var> is past the end of <var
-         title="">input</var>, then return <var title="">value</var> and
-         abort these steps.
+         title="">input</var>, then return <var title="">value</var>.
       </ol>
 
      <li>
       <p>If the character indicated by <var title="">position</var> is not
        one of U+0030 DIGIT ZERO (0) .. U+0039 DIGIT NINE (9), then return
-       <var title="">value</var> and abort these steps.
+       <var title="">value</var>.
 
      <li>
       <p><a href="#collect">Collect a sequence of characters</a> in the range
@@ -29634,7 +29633,23 @@
   <p>Each <code><a href="#input0">input</a></code> element has a <a
    href="#value12" title=concept-fe-value>value</a>, which is exposed by the
    <code title=dom-input-value><a href="#value10">value</a></code> DOM
-   attribute.
+   attribute. Some states define an <dfn id=algorithm5
+   title=concept-input-value-string-number>algorithm to convert a string to a
+   number</dfn>, an <dfn id=algorithm6
+   title=concept-input-value-number-string>algorithm to convert a number to a
+   string</dfn>, an <dfn id=algorithm7
+   title=concept-input-value-string-date>algorithm to convert a string to a
+   <code>Date</code> object</dfn>, and an <dfn id=algorithm8
+   title=concept-input-value-date-string>algorithm to convert a
+   <code>Date</code> object to a string</dfn>, which are used by <code
+   title=attr-input-max><a href="#max4">max</a></code>, <code
+   title=attr-input-min><a href="#min2">min</a></code>, <code
+   title=attr-input-step><a href="#step0">step</a></code>, <code
+   title=dom-input-valueAsDate><a href="#valueasdate">valueAsDate</a></code>,
+   <code title=dom-input-valueAsNumber><a
+   href="#valueasnumber">valueAsNumber</a></code>, <code
+   title=dom-input-stepUp><a href="#stepup">stepUp()</a></code>, and <code
+   title=dom-input-stepDown><a href="#stepdown">stepDown()</a></code>.
 
   <p>Each <code><a href="#input0">input</a></code> element has a boolean <dfn
    id=mutability title=concept-input-mutability>mutability flag</dfn>. When
@@ -30059,60 +30074,74 @@
    href="#valid6">valid UTC date and time</a>, then set it to the empty
    string instead.
 
-  <p>The <dfn id=selected title=concept-input-value-datetime>selected UTC
-   date and time</dfn> is the result of <a href="#parse0" title="parse a UTC
-   date and time">parsing a UTC date and time</a> from the element's <a
-   href="#value12" title=concept-fe-value>value</a>, unless that fails, in
-   which case there is no <a href="#selected"
-   title=concept-input-value-datetime>selected UTC date and time</a>.
+  <p><strong>The <a href="#algorithm11"
+   title=concept-input-value-string-number>algorithm to convert a string to a
+   number</a>, given a string <var title="">input</var></strong>, is as
+   follows:
 
-  <p class=big-issue><strong>The <a href="#valueasdate1"><code
-   title=dom-input-valueAsDate>valueAsDate</code> setter algorithm</a> is as
-   follows:</strong> ...
+  <ol>
+   <li>
+    <p><a href="#parse0">Parse a UTC date and time</a> from <var
+     title="">input</var>.
 
-  <p class=big-issue><strong>The <a href="#valueasnumber1"><code
-   title=dom-input-valueAsNumber>valueAsNumber</code> setter algorithm</a> is
-   as follows:</strong> ...
+   <li>
+    <p>If that results in an error, return an error and abort these steps.
 
-  <p>The <code title=attr-input-min><a href="#min2">min</a></code> attribute,
-   if specified, must have a value that is a <a href="#valid6">valid UTC date
-   and time</a>. The <dfn id=minimum title=concept-input-min-datetime>minimum
-   UTC date and time</dfn> is the result of <a href="#parse0" title="parse a
-   UTC date and time">parsing a UTC date and time</a> from the element's
-   <code title=attr-input-min><a href="#min2">min</a></code> attribute,
-   unless that fails, in which case there is no <a href="#minimum"
-   title=concept-input-min-datetime>minimum UTC date and time</a>.
+   <li>
+    <p>Otherwise, return the number of milliseconds elapsed from midnight UTC
+     on the morning of 1970-01-01 (the time represented by the value "<code
+     title="">1970-01-01T00:00:00.0Z</code>") to the parsed date and time,
+     ignoring leap seconds.
+  </ol>
 
-  <p><strong>Constraint validation:</strong> When there is both a <a
-   href="#selected" title=concept-input-value-datetime>selected UTC date and
-   time</a> and a <a href="#minimum" title=concept-input-min-datetime>minimum
-   UTC date and time</a>, if the former is earlier than the latter, the
-   element is <a href="#suffering1">suffering from an underflow</a>.
+  <p><strong>The <a href="#algorithm13"
+   title=concept-input-value-number-string>algorithm to convert a number to a
+   string</a>, given a number <var title="">input</var></strong>, consists of
+   returning a <a href="#valid6">valid UTC date and time</a> that represents
+   the date and time in UTC that is <var title="">input</var> milliseconds
+   afer midnight UTC on the morning of 1970-01-01 (the time represented by
+   the value "<code title="">1970-01-01T00:00:00.0Z</code>").
 
-  <p>The <code title=attr-input-max><a href="#max4">max</a></code> attribute,
-   if specified, must have a value that is a <a href="#valid6">valid UTC date
-   and time</a>. The <dfn id=maximum title=concept-input-max-datetime>maximum
-   UTC date and time</dfn> is the result of <a href="#parse0" title="parse a
-   UTC date and time">parsing a UTC date and time</a> from the element's
-   <code title=attr-input-max><a href="#max4">max</a></code> attribute,
-   unless that fails, in which case there is no <a href="#maximum"
-   title=concept-input-max-datetime>maximum UTC date and time</a>.
+  <p><strong>The <a href="#algorithm9"
+   title=concept-input-value-string-date>algorithm to convert a string to a
+   <code>Date</code> object</a>, given a string <var
+   title="">input</var></strong>, is as follows:
 
-  <p><strong>Constraint validation:</strong> When there is both a <a
-   href="#selected" title=concept-input-value-datetime>selected UTC date and
-   time</a> and a <a href="#maximum" title=concept-input-max-datetime>maximum
-   UTC date and time</a>, if the former is later than the latter, the element
-   is <a href="#suffering2">suffering from an overflow</a>.
+  <ol>
+   <li>
+    <p><a href="#parse0">Parse a UTC date and time</a> from <var
+     title="">input</var>.
 
-  <p class=big-issue>The <code title=attr-input-step><a
-   href="#step0">step</a></code> attribute, if specified, must have a value
-   that is a ...</p>
-  <!-- values: positive non-zero floating point, or "any" -->
-  <!-- units: seconds -->
-  <!-- default: 60 -->
-  <!-- zero point: min, or 1970-01-01T00:00:00.0Z -->
-  <!-- allow rounding -->
-  <!-- <span>suffering from a step mismatch</span> -->
+   <li>
+    <p>If that results in an error, return an error and abort these steps.
+
+   <li>
+    <p>Otherwise, return a <code>Date</code> object representing the parsed
+     date and time.
+  </ol>
+
+  <p><strong>The <a href="#algorithm10"
+   title=concept-input-value-date-string>algorithm to convert a
+   <code>Date</code> object to a string</a>, given a <code>Date</code> object
+   <var title="">input</var></strong>, consists of returning a <a
+   href="#valid6">valid UTC date and time</a> that represents the date and
+   time in UTC that is represented by <var title="">input</var>.</p>
+  <!-- MIN AND MAX: -->
+
+  <p>The <code title=attr-input-min><a href="#min2">min</a></code> attribute,
+   if specified, must have a value that is a <a href="#valid6">valid UTC date
+   and time</a>. The <code title=attr-input-max><a
+   href="#max4">max</a></code> attribute, if specified, must have a value
+   that is a <a href="#valid6">valid UTC date and time</a>.</p>
+  <!-- STEP: -->
+
+  <p>The <code title=attr-input-step><a href="#step0">step</a></code>
+   attribute is expressed in seconds. The <a href="#step-"
+   title=concept-input-step-scale>step scale factor</a> is 1000 (which
+   converts the seconds to milliseconds, as used in the other algorithms).
+   The <a href="#default2" title=concept-input-step-default>default step</a>
+   is 60 seconds.</p>
+  <!-- XXX allow rounding -->
 
   <p>The following common <code><a href="#input0">input</a></code> element
    content attributes, DOM attributes, and methods apply to the element:
@@ -30290,7 +30319,7 @@
    matches for any of the other values (i.e. duplicates are not allowed).</p>
   <!-- XXX the selected file(s) must either have the given types or be of the given category -->
 
-  <p class=big-issue>... list of <dfn id=selected0
+  <p class=big-issue>... list of <dfn id=selected
    title=concept-input-type-file-selected>selected files</dfn>
 
   <h6 id=hidden><span class=secno>4.10.4.1.16. </span><dfn id=hidden1
@@ -30332,7 +30361,7 @@
 
   <p class=big-issue>...
 
-  <p class=big-issue>... image: <dfn id=selected1
+  <p class=big-issue>... image: <dfn id=selected0
    title=concept-input-type-image-coordinate>selected coordinate</dfn>
 
   <h6 id=reset><span class=secno>4.10.4.1.19. </span><dfn id=reset2
@@ -30465,30 +30494,30 @@
    href="#valid">valid non-negative integer</a>. If the attribute is
    specified and applying the <a href="#rules">rules for parsing non-negative
    integers</a> to its value results in a number, then that number is the
-   element's <dfn id=maximum0>maximum allowed value length</dfn>. If the
+   element's <dfn id=maximum>maximum allowed value length</dfn>. If the
    attribute is omitted or parsing its value results in an error, then there
-   is no <a href="#maximum0">maximum allowed value length</a>.
+   is no <a href="#maximum">maximum allowed value length</a>.
 
   <p>If the <code><a href="#input0">input</a></code> element has a <a
-   href="#maximum0">maximum allowed value length</a>, then the <a
+   href="#maximum">maximum allowed value length</a>, then the <a
    href="#codepoint">codepoint length</a> of the value of the element's <code
    title=attr-input-value><a href="#value9">value</a></code> attribute must
-   be equal to or less than the element's <a href="#maximum0">maximum allowed
+   be equal to or less than the element's <a href="#maximum">maximum allowed
    value length</a>.
 
   <p><strong>Constraint validation:</strong> If an <code><a
-   href="#input0">input</a></code> element has a <a href="#maximum0">maximum
+   href="#input0">input</a></code> element has a <a href="#maximum">maximum
    allowed value length</a>, and it is not <a href="#dirty0"
    title=concept-input-dirty>dirty</a>, and the <a
    href="#codepoint">codepoint length</a> of the element's <a href="#value12"
    title=concept-fe-value>value</a> is greater than the element's <a
-   href="#maximum0">maximum allowed value length</a>, then the element is <a
+   href="#maximum">maximum allowed value length</a>, then the element is <a
    href="#suffering0">suffering from being too long</a>.
 
   <p>User agents may prevent the user from setting the element's <a
    href="#value12" title=concept-fe-value>value</a> to a value whose <a
    href="#codepoint">codepoint length</a> is greater than the element's <a
-   href="#maximum0">maximum allowed value length</a>.
+   href="#maximum">maximum allowed value length</a>.
 
   <h6 id=the-readonly><span class=secno>4.10.4.2.3. </span>The <code
    title=attr-input-readonly><a href="#readonly0">readonly</a></code>
@@ -30505,18 +30534,120 @@
    element, the element is <a href="#barred">barred from constraint
    validation</a>.
 
-  <h6 id=other0><span class=secno>4.10.4.2.4. </span>Other attributes</h6>
+  <h6 id=the-min><span class=secno>4.10.4.2.4. </span>The <code
+   title=attr-input-min><a href="#min2">min</a></code> and <code
+   title=attr-input-max><a href="#max4">max</a></code> attributes</h6>
 
   <p>The <dfn id=min2 title=attr-input-min><code>min</code></dfn> and <dfn
-   id=max4 title=attr-input-max><code>max</code></dfn> attributes define a
-   range constraint on the value.
+   id=max4 title=attr-input-max><code>max</code></dfn> attributes indicate
+   the allowed range of values for the element.
+
+  <p>Their syntax is defined by the section that defines the <code
+   title=attr-input-type><a href="#type14">type</a></code> attribute's
+   current state.
+
+  <p><strong>Constraint validation:</strong> When the element has a <code
+   title=attr-input-min><a href="#min2">min</a></code> attribute, and the
+   result of applying the <a href="#algorithm11"
+   title=concept-input-value-string-number>algorithm to convert a string to a
+   number</a> to the string given by the element's <span
+   title=concept-input-value>value</span> is a number, and the result of
+   applying the <a href="#algorithm11"
+   title=concept-input-value-string-number>algorithm to convert a string to a
+   number</a> to the value of the <code title=attr-input-min><a
+   href="#min2">min</a></code> attribute is also a number, and the number
+   obtained from the former is less than the number obtained from the latter,
+   the element is <a href="#suffering1">suffering from an underflow</a>.
+
+  <p><strong>Constraint validation:</strong> When the element has a <code
+   title=attr-input-max><a href="#max4">max</a></code> attribute, and the
+   result of applying the <a href="#algorithm11"
+   title=concept-input-value-string-number>algorithm to convert a string to a
+   number</a> to the string given by the element's <span
+   title=concept-input-value>value</span> is a number, and the result of
+   applying the <a href="#algorithm11"
+   title=concept-input-value-string-number>algorithm to convert a string to a
+   number</a> to the value of the <code title=attr-input-max><a
+   href="#max4">max</a></code> attribute is also a number, and the number
+   obtained from the former is greater than the number obtained from the
+   latter, the element is <a href="#suffering2">suffering from an
+   overflow</a>.
+
+  <p>The <code title=attr-input-min><a href="#min2">min</a></code> attribute
+   also defines the <a href="#step-base" title=concept-input-min-zero>step
+   base</a>.
+
+  <h6 id=the-step><span class=secno>4.10.4.2.5. </span>The <code
+   title=attr-input-step><a href="#step0">step</a></code> attribute</h6>
 
   <p>The <dfn id=step0 title=attr-input-step><code>step</code></dfn>
-   attribute defines the increments between allowed values.
+   attribute indicates the granularity that is expected (and required) of the
+   <span title=concept-input-value>value</span>, by limiting the allowed
+   values. The section that defines the <code title=attr-input-type><a
+   href="#type14">type</a></code> attribute's current state also defines the
+   <dfn id=default2 title=concept-input-step-default>default step</dfn> and
+   the <dfn id=step- title=concept-input-step-scale>step scale factor</dfn>,
+   which are used in processing the attribute as described below.
 
-  <p>These attributes apply for a number of different states, but as their
-   behavior varies from state to state, they are not defined here but instead
-   in the states' own sections.
+  <p>The <code title=attr-input-step><a href="#step0">step</a></code>
+   attribute, if specified, must either have a value that is a <a
+   href="#valid1">valid floating point number</a> that <a href="#rules1"
+   title="rules for parsing floating point number values">parses</a> to a
+   number that is greater than zero, or must have a value that is an <a
+   href="#ascii">ASCII case-insensitive</a> match for the string "<code
+   title="">any</code>".
+
+  <p>The attribute provides the <dfn id=allowed
+   title=concept-input-step>allowed value step</dfn> for the element, as
+   follows:
+
+  <ol>
+   <li>If the attribute is absent, then the <a href="#allowed"
+    title=concept-input-step>allowed value step</a> is the <a
+    href="#default2" title=concept-input-step-default>default step</a>
+    multiplied by the <a href="#step-" title=concept-input-step-scale>step
+    scale factor</a>.
+
+   <li>Otherwise, if the attribute's value is an <a href="#ascii">ASCII
+    case-insensitive</a> match for the string "<code title="">any</code>",
+    then there is no <a href="#allowed" title=concept-input-step>allowed
+    value step</a>.
+
+   <li>Otherwise, if the <a href="#rules1">rules for parsing floating point
+    number values</a>, when they are applied to the attribute's value, return
+    an error, zero, or a number less than zero, then the <a href="#allowed"
+    title=concept-input-step>allowed value step</a> is the <a
+    href="#default2" title=concept-input-step-default>default step</a>
+    multiplied by the <a href="#step-" title=concept-input-step-scale>step
+    scale factor</a>.
+
+   <li>Otherwise, the <a href="#allowed" title=concept-input-step>allowed
+    value step</a> is the number returned by the <a href="#rules1">rules for
+    parsing floating point number values</a> when they are applied to the
+    attribute's value, multiplied by the <a href="#step-"
+    title=concept-input-step-scale>step scale factor</a>.
+  </ol>
+
+  <p>The <dfn id=step-base title=concept-input-min-zero>step base</dfn> is
+   the result of applying the <a href="#algorithm11"
+   title=concept-input-value-string-number>algorithm to convert a string to a
+   number</a> to the value of the <code title=attr-input-min><a
+   href="#min2">min</a></code> attribute, unless the element does not have a
+   <code title=attr-input-min><a href="#min2">min</a></code> attribute
+   specified or the result of applying that algorithm is an error, in which
+   case the <a href="#step-base" title=concept-input-min-zero>step base</a>
+   is zero.
+
+  <p><strong>Constraint validation:</strong> When the element has an <a
+   href="#allowed" title=concept-input-step>allowed value step</a>, and the
+   result of applying the <a href="#algorithm11"
+   title=concept-input-value-string-number>algorithm to convert a string to a
+   number</a> to the string given by the element's <span
+   title=concept-input-value>value</span> is a number, and that number
+   subtracted from the <a href="#step-base" title=concept-input-min-zero>step
+   base</a> is not an integral multiple of the <a href="#allowed"
+   title=concept-input-step>allowed value step</a>, the element is <a
+   href="#suffering3">suffering from a step mismatch</a>.
 
   <h5 id=common5><span class=secno>4.10.4.3. </span>Common <code><a
    href="#input0">input</a></code> element APIs</h5>
@@ -30542,20 +30673,27 @@
    element, interpreted as a date.
 
   <p>On getting, if the <code title=dom-input-valueAsDate><a
-   href="#valueasdate">valueAsDate</a></code> attribute applies, as defined
-   for the <code><a href="#input0">input</a></code> element's <code
+   href="#valueasdate">valueAsDate</a></code> attribute does not apply, as
+   defined for the <code><a href="#input0">input</a></code> element's <code
    title=attr-input-type><a href="#type14">type</a></code> attribute's
-   current state, then run the <dfn id=valueasdate0><code
-   title=dom-input-valueAsDate>valueAsDate</code> getter algorithm</dfn>
-   defined for that state. Otherwise, return a Not-a-Number (NaN) value.
+   current state, then return null. Otherwise, run the <dfn id=algorithm9
+   title=concept-input-value-string-date>algorithm to convert a string to a
+   <code>Date</code> object</dfn> defined for that state; if the algorithm
+   returned a <code>Date</code> object, then return it, otherwise, return
+   null.
 
   <p>On setting, if the <code title=dom-input-valueAsDate><a
-   href="#valueasdate">valueAsDate</a></code> attribute applies, as defined
-   for the <code><a href="#input0">input</a></code> element's <code
+   href="#valueasdate">valueAsDate</a></code> attribute does not apply, as
+   defined for the <code><a href="#input0">input</a></code> element's <code
    title=attr-input-type><a href="#type14">type</a></code> attribute's
-   current state, then run the <dfn id=valueasdate1><code
-   title=dom-input-valueAsDate>valueAsDate</code> setter algorithm</dfn>
-   defined for that state. Otherwise, do nothing.
+   current state, then throw an <code>INVALID_ACCESS_ERR</code> exception;
+   otherwise, if the new value is null, then set the <span
+   title=concept-input-value>value</span> of the element to the empty string;
+   otherwise, run the <dfn id=algorithm10
+   title=concept-input-value-date-string>algorithm to convert a
+   <code>Date</code> object to a string</dfn>, as defined for that state, on
+   the new value, and set the <span title=concept-input-value>value</span> of
+   the element to resulting string.
 
   <hr>
 
@@ -30565,25 +30703,77 @@
    title=concept-fe-value>value</a> of the element, interpreted as a number.
 
   <p>On getting, if the <code title=dom-input-valueAsNumber><a
-   href="#valueasnumber">valueAsNumber</a></code> attribute applies, as
-   defined for the <code><a href="#input0">input</a></code> element's <code
-   title=attr-input-type><a href="#type14">type</a></code> attribute's
-   current state, then run the <dfn id=valueasnumber0><code
-   title=dom-input-valueAsNumber>valueAsNumber</code> getter algorithm</dfn>
-   defined for that state. Otherwise, return the <a href="#value12"
-   title=concept-fe-value>value</a> of the element, cast to the type of the
-   DOM attribute.
+   href="#valueasnumber">valueAsNumber</a></code> attribute does not apply,
+   as defined for the <code><a href="#input0">input</a></code> element's
+   <code title=attr-input-type><a href="#type14">type</a></code> attribute's
+   current state, then return a Not-a-Number (NaN) value. Otherwise, run the
+   <dfn id=algorithm11 title=concept-input-value-string-number>algorithm to
+   convert a string to a number</dfn> defined for that state; if the
+   algorithm returned a number, then return it, otherwise, return a
+   Not-a-Number (NaN) value.
 
   <p>On setting, if the <code title=dom-input-valueAsNumber><a
-   href="#valueasnumber">valueAsNumber</a></code> attribute applies, as
-   defined for the <code><a href="#input0">input</a></code> element's <code
-   title=attr-input-type><a href="#type14">type</a></code> attribute's
-   current state, then run the <dfn id=valueasnumber1><code
-   title=dom-input-valueAsNumber>valueAsNumber</code> setter algorithm</dfn>
-   defined for that state. Otherwise, the <a href="#value12"
-   title=concept-fe-value>value</a> must be set to the shortest possible
-   representation of the given value that is a <a href="#valid1">valid
-   floating point number</a> in base ten.
+   href="#valueasnumber">valueAsNumber</a></code> attribute does not apply,
+   as defined for the <code><a href="#input0">input</a></code> element's
+   <code title=attr-input-type><a href="#type14">type</a></code> attribute's
+   current state, then throw an <code>INVALID_ACCESS_ERR</code> exception;
+   otherwise, run the <dfn id=algorithm12
+   title=concept-input-value-number-string>algorithm to convert a number to a
+   string</dfn>, as defined for that state, on the new value, and set the
+   <span title=concept-input-value>value</span> of the element to resulting
+   string.
+
+  <hr>
+
+  <p>The <dfn id=stepup title=dom-input-stepUp><code>stepUp()</code></dfn>
+   and <dfn id=stepdown
+   title=dom-input-stepDown><code>stepDown()</code></dfn> methods, when
+   invoked, must run the following algorithm:
+
+  <ol>
+   <li>
+    <p>If the <code title=dom-input-stepUp><a
+     href="#stepup">stepUp()</a></code> and <code title=dom-input-stepDown><a
+     href="#stepdown">stepDown()</a></code> methods do not apply, as defined
+     for the <code><a href="#input0">input</a></code> element's <code
+     title=attr-input-type><a href="#type14">type</a></code> attribute's
+     current state, then throw an <code>INVALID_ACCESS_ERR</code> exception,
+     and abort these steps.
+
+   <li>
+    <p>If the element has no <a href="#allowed"
+     title=concept-input-step>allowed value step</a>, then throw a
+     <code>INVALID_ACCESS_ERR</code> exception, and abort these steps.
+
+   <li>
+    <p>If applying the <a href="#algorithm11"
+     title=concept-input-value-string-number>algorithm to convert a string to
+     a number</a> to the string given by the element's <span
+     title=concept-input-value>value</span> results in an error, then throw
+     an <code>INVALID_ACCESS_ERR</code> exception, and abort these steps;
+     otherwise, let <var title="">value</var> be the result of that
+     algorithm.
+
+   <li>
+    <p>If the method invoked was the <code title=dom-input-stepDown><a
+     href="#stepdown">stepDown()</a></code> method, negate <var
+     title="">value</var>.
+
+   <li>
+    <p>Let <var title="">value</var> be the result of adding the <a
+     href="#allowed" title=concept-input-step>allowed value step</a> to <var
+     title="">value</var>.
+
+   <li>
+    <p>Run the <dfn id=algorithm13
+     title=concept-input-value-number-string>algorithm to convert a number to
+     a string</dfn>, as defined for the <code><a
+     href="#input0">input</a></code> element's <code title=attr-input-type><a
+     href="#type14">type</a></code> attribute's current state, on <var
+     title="">value</var>, and set the <span
+     title=concept-input-value>value</span> of the element to resulting
+     string.
+  </ol>
 
   <h6 id=others...><span class=secno>4.10.4.3.2. </span>Others...</h6>
 
@@ -30596,12 +30786,6 @@
   <p class=big-issue>... <dfn id=selectedoption
    title=dom-input-selectedOption><code>selectedOption</code></dfn>
 
-  <p class=big-issue>... <dfn id=stepup
-   title=dom-input-stepUp><code>stepUp()</code></dfn>
-
-  <p class=big-issue>... <dfn id=stepdown
-   title=dom-input-stepDown><code>stepDown()</code></dfn>
-
   <h4 id=the-button><span class=secno>4.10.5 </span>The <dfn
    id=button2><code>button</code></dfn> element</h4>
 
@@ -30916,7 +31100,7 @@
 
   <p class=big-issue>...
 
-  <p class=big-issue>... <dfn id=selected2
+  <p class=big-issue>... <dfn id=selected1
    title=concept-option-selected>selected</dfn>
 
   <p class=big-issue>... <dfn id=value11
@@ -31627,7 +31811,7 @@
        <li>
         <p>The <var title="">field</var> element is <var
          title="">submitter</var>, and before this algorithm was invoked the
-         user <a href="#selected1"
+         user <a href="#selected0"
          title=concept-input-type-image-coordinate>indicated a
          coordinate</a>. Let <var title="">x</var> be the x-component of the
          coordindate selected by the user, and let <var title="">y</var> be
@@ -31671,7 +31855,7 @@
       <p>If the <var title="">field</var> element is a <code><a
        href="#select">select</a></code> element, then for each <code><a
        href="#option">option</a></code> element in the <code><a
-       href="#select">select</a></code> element that is <a href="#selected2"
+       href="#select">select</a></code> element that is <a href="#selected1"
        title=concept-option-selected>selected</a>, append an entry in the
        <var title="">form data set</var> with the <var title="">name</var> as
        the name and the <a href="#value11"
@@ -31683,7 +31867,7 @@
        href="#input0">input</a></code> element whose <code
        title=attr-input-type><a href="#type14">type</a></code> attribute is
        in the <span title=attr-input-type-file-state>File Upload</span>
-       state, then for each file <a href="#selected0"
+       state, then for each file <a href="#selected"
        title=concept-input-type-file-selected>selected</a> in the <code><a
        href="#input0">input</a></code> element, append an entry in the <var
        title="">form data set</var> with the <var title="">name</var> as the
@@ -34369,7 +34553,7 @@
     href="#radiogroup">radiogroup</a></code>
 
    <dd><code title=attr-command-default><a
-    href="#default2">default</a></code>
+    href="#default3">default</a></code>
 
    <dd>Also, the <code title=attr-command-title><a
     href="#title6">title</a></code> attribute has special semantics on this
@@ -34386,7 +34570,7 @@
            attribute boolean <a href="#disabled10" title=dom-command-disabled>disabled</a>;
            attribute boolean <a href="#checked4" title=dom-command-checked>checked</a>;
            attribute DOMString <a href="#radiogroup0" title=dom-command-radiogroup>radiogroup</a>;
-           attribute boolean <a href="#default3" title=dom-command-default>default</a>;
+           attribute boolean <a href="#default4" title=dom-command-default>default</a>;
  void <a href="#click" title=dom-command-click>click</a>(); // shadows <code><a href="#htmlelement">HTMLElement</a></code>.<code title=dom-click><a href="#click1">click()</a></code>
 };</pre>
 
@@ -34451,12 +34635,12 @@
 
   <p>If the <code><a href="#command0">command</a></code> element is used when
    <span title="menu generation">generating</span> a <span>context
-   menu</span>, then the <dfn id=default2
+   menu</span>, then the <dfn id=default3
    title=attr-command-default><code>default</code></dfn> attribute indicates,
    if present, that the command is the one that would have been invoked if
    the user had directly activated the menu's subject instead of using its
    context menu. The <code title=attr-command-default><a
-   href="#default2">default</a></code> attribute is a <a
+   href="#default3">default</a></code> attribute is a <a
    href="#boolean0">boolean attribute</a>.
 
   <div class=example>
@@ -34472,7 +34656,7 @@
    title=dom-command-disabled><code>disabled</code></dfn>, <dfn id=checked4
    title=dom-command-checked><code>checked</code></dfn>, <dfn id=radiogroup0
    title=dom-command-radiogroup><code>radiogroup</code></dfn>, and <dfn
-   id=default3 title=dom-command-default><code>default</code></dfn> DOM
+   id=default4 title=dom-command-default><code>default</code></dfn> DOM
    attributes must <a href="#reflect">reflect</a> the content attributes of
    the same name.
 
@@ -34954,7 +35138,7 @@
    this means for each facet -->.
     If the element is a <code><a href="#command0">command</a></code> element
     with a <code title=attr-command-default><a
-    href="#default2">default</a></code> attribute, mark the command as being
+    href="#default3">default</a></code> attribute, mark the command as being
     a default command.</dd>
    <!-- XXX if there's an
    Icon URL for the command, it should be <span
@@ -36687,9 +36871,9 @@
    data mining tools are likely to never instantiate browsing contexts.
 
   <p>The main <a href="#view">view</a> through which a user primarily
-   interacts with a user agent is the <dfn id=default4>default view</dfn>.
+   interacts with a user agent is the <dfn id=default5>default view</dfn>.
 
-  <p class=note>The <a href="#default4">default view</a> of a
+  <p class=note>The <a href="#default5">default view</a> of a
    <code>Document</code> is given by the <code title="">defaultView</code>
    attribute on the <code>Document</code> object's <code>DocumentView</code>
    interface. <a href="#references">[DOM3VIEWS]</a>
@@ -36887,7 +37071,7 @@
   <h4 id=security2><span class=secno>5.1.4 </span>Security</h4>
 
   <p>A <a href="#browsing1">browsing context</a> <var title="">A</var> is
-   <dfn id=allowed>allowed to navigate</dfn> a second <a
+   <dfn id=allowed0>allowed to navigate</dfn> a second <a
    href="#browsing1">browsing context</a> <var title="">B</var> if one of the
    following conditions is true:
 
@@ -36905,7 +37089,7 @@
 
    <li>The browsing context <var title="">B</var> is an <a
     href="#auxiliary0">auxiliary browsing context</a> and <var
-    title="">A</var> is <a href="#allowed">allowed to navigate</a> <var
+    title="">A</var> is <a href="#allowed0">allowed to navigate</a> <var
     title="">B</var>'s <a href="#opener">opener browsing context</a>, or
 
    <li>The browsing context <var title="">B</var> is not a <a
@@ -37000,7 +37184,7 @@
      and there exists a browsing context whose <a href="#browsing3"
      title="browsing context name">name</a> is the same as the given browsing
      context name, and the current browsing context is <a
-     href="#allowed">allowed to navigate</a> that browsing context, and the
+     href="#allowed0">allowed to navigate</a> that browsing context, and the
      user agent determines that the two browsing contexts are related enough
      that it is ok if they reach each other, then that browsing context must
      be the chosen one. If there are multiple matching browsing contexts, the
@@ -37074,7 +37258,7 @@
 
   <h3 id=the-default0><span class=secno>5.2 </span>The default view</h3>
 
-  <p>The <code>AbstractView</code> object of <a href="#default4"
+  <p>The <code>AbstractView</code> object of <a href="#default5"
    title="default view">default views</a> must also implement the <code><a
    href="#window">Window</a></code> and <code>EventTarget</code> interfaces.
 
@@ -37176,7 +37360,7 @@
    href="#browsing1">browsing context</a> has an associated <dfn
    id=list-of2>list of added properties</dfn> that, when a document is <a
    href="#active" title="active document">active</a>, are available on the
-   <code>Document</code>'s <a href="#default4">default view</a>'s <code><a
+   <code>Document</code>'s <a href="#default5">default view</a>'s <code><a
    href="#window">Window</a></code> object. A <code>Document</code> object's
    <a href="#list-of2">list of added properties</a> must be empty when the
    <code>Document</code> object is created.
@@ -41474,7 +41658,7 @@
   <ul>
    <li>The <code title=dom-location-href><a href="#href5">href</a></code>
     setter, if the script is running in a <a href="#browsing1">browsing
-    context</a> that is <a href="#allowed">allowed to navigate</a> the
+    context</a> that is <a href="#allowed0">allowed to navigate</a> the
     browsing context with which the <code><a
     href="#location2">Location</a></code> object is associated
   </ul>
@@ -44832,7 +45016,7 @@
    treat the keyword "<code title="">previous</code>" like the <code
    title=rel-prev><a href="#prev">prev</a></code> keyword.
 
-  <h5 id=other1><span class=secno>5.11.3.20. </span>Other link types</h5>
+  <h5 id=other0><span class=secno>5.11.3.20. </span>Other link types</h5>
 
   <p>Other than the types defined above, only types defined as extensions in
    the <a href="http://wiki.whatwg.org/wiki/RelExtensions">WHATWG Wiki
@@ -49468,7 +49652,7 @@
      the <code title=dom-MessageEvent-source><a
      href="#source3">source</a></code> attribute must be set to the <code><a
      href="#window">Window</a></code> object of the <a
-     href="#default4">default view</a> of the <a href="#browsing1">browsing
+     href="#default5">default view</a> of the <a href="#browsing1">browsing
      context</a> for which the <code>Document</code> object with which the
      script is associated is the <a href="#active">active
      document</a><!--, if there is one, or null
@@ -49549,7 +49733,7 @@
      the <code title=dom-MessageEvent-source><a
      href="#source3">source</a></code> attribute must be set to the <code><a
      href="#window">Window</a></code> object of the <a
-     href="#default4">default view</a> of the <a href="#browsing1">browsing
+     href="#default5">default view</a> of the <a href="#browsing1">browsing
      context</a> for which the <code>Document</code> object with which the
      script is associated is the <a href="#active">active
      document</a><!--, if there is one, or null

Received on Tuesday, 30 September 2008 03:15:17 UTC