HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2247WF2: stepUp/stepDown shouldn't go out of range. Allow rounding of datetime controls.2008-09-30 04:10
@@ -26554,21 +26554,25 @@ function AddCloud(data, x, y) { ... }</pre>
 
   <!-- STEP: -->
 
   <p>The <code title="attr-input-step">step</code> attribute is
   expressed in seconds. The <span
   title="concept-input-step-scale">step scale factor</span> is 1000
   (which converts the seconds to milliseconds, as used in the other
   algorithms). The <span title="concept-input-step-default">default
   step</span> is 60 seconds.</p>
 
-  <!-- XXX allow rounding -->
+  <p>When the element is <span>suffering from a step mismatch</span>,
+  the user agent may round the element's <span
+  title="concept-input-value">value</span> to the nearest date and
+  time for which the element would not <span title="suffering from a
+  step mismatch">suffer from a step mismatch</span>.</p>
 
   <hr>
 
   <p><strong>The <span
   title="concept-input-value-string-number">algorithm to convert a
   string to a number</span>, given a string <var
   title="">input</var>, is as follows:</strong></p>
 
   <ol>
 
@@ -26726,20 +26730,22 @@ function AddCloud(data, x, y) { ... }</pre>
 
   <h6><dfn title="attr-input-type-range">Range</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code
   title="attr-input-type">type</code> attribute is in the <span
   title="attr-input-type-range">Range</span> state, the rules in this
   section apply.</p>
 
   <p class="big-issue">...</p>
 
+  <!-- XXX default min/max, calling valueAsNumber with out-of-range values -->
+
 
 
   <h6><dfn title="attr-input-type-checkbox">Checkbox</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code
   title="attr-input-type">type</code> attribute is in the <span
   title="attr-input-type-checkbox">Checkbox</span> state, the rules in
   this section apply.</p>
 
   <p class="big-issue">...</p>
@@ -27031,52 +27037,74 @@ rel="" on submit buttons?
   <h6>The <code title="attr-input-min">min</code> and <code
   title="attr-input-max">max</code> attributes</h6>
 
   <p>The <dfn title="attr-input-min"><code>min</code></dfn> and <dfn
   title="attr-input-max"><code>max</code></dfn> attributes indicate
   the allowed range of values for the element.</p>
 
   <p>Their syntax is defined by the section that defines the <code
   title="attr-input-type">type</code> attribute's current state.</p>
 
+  <p>If the element has a <code title="attr-input-min">min</code>
+  attribute, and the result of applying the <span
+  title="concept-input-value-string-number">algorithm to convert a
+  string to a number</span> to the value of the <code
+  title="attr-input-min">min</code> attribute is a a number, then that
+  number is the element's <dfn
+  title="concept-input-min">minimum</dfn>. (Otherwise, the element has
+  no <span title="concept-input-min">minimum</span>.)</p>
+
   <p><strong>Constraint validation:</strong> When the element has a
-  <code title="attr-input-min">min</code> attribute, and the result of
+  <span title="attr-input-min">minimum</span>, and the result of
   applying the <span
   title="concept-input-value-string-number">algorithm to convert a
   string to a number</span> to the string given by the element's <span
-  title="concept-fe-value">value</span> is a number, and the result
-  of applying the <span
+  title="concept-fe-value">value</span> is a number, and the number
+  obtained from that algorithm is less than the <span
+  title="attr-input-min">minimum</span>, the element is
+  <span>suffering from an underflow</span>.</p>
+
+  <p>The <code title="attr-input-min">min</code> attribute also
+  defines the <span title="concept-input-min-zero">step
+  base</span>.</p>
+
+  <p>If the element has a <code title="attr-input-max">max</code>
+  attribute, and the result of applying the <span
   title="concept-input-value-string-number">algorithm to convert a
   string to a number</span> to the value of the <code
-  title="attr-input-min">min</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 <span>suffering from an
-  underflow</span>.</p>
+  title="attr-input-max">max</code> attribute is a a number, then that
+  number is the element's <dfn
+  title="concept-input-max">maximum</dfn>. (Otherwise, the element has
+  no <span title="concept-input-max">maximum</span>.)</p>
 
   <p><strong>Constraint validation:</strong> When the element has a
-  <code title="attr-input-max">max</code> attribute, and the result of
+  <span title="attr-input-max">maximum</span>, and the result of
   applying the <span
   title="concept-input-value-string-number">algorithm to convert a
   string to a number</span> to the string given by the element's <span
-  title="concept-fe-value">value</span> is a number, and the result
-  of applying the <span
-  title="concept-input-value-string-number">algorithm to convert a
-  string to a number</span> to the value of the <code
-  title="attr-input-max">max</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 <span>suffering from an
+  title="concept-fe-value">value</span> is a number, and the number
+  obtained from that algorithm is more than the <span
+  title="attr-input-max">maximum</span>, the element is
+  <span>suffering from an overflow</span>.</p>
+
+  <p>The <code title="attr-input-max">max</code> attribute's value
+  (the <span title="concept-input-max">maximum</span>) must not be
+  less than the <code title="attr-input-min">min</code> attribute's
+  value (its <span title="concept-input-min">minimum</span>).</p>
+
+  <p class="note">If an element has a <span
+  title="attr-input-max">maximum</span> that is less than its <span
+  title="attr-input-min">minimum</span>, then so long as the element
+  has a <span title="concept-fe-value">value</span>, it will either be
+  <span>suffering from an underflow</span> or <span>suffering from an
   overflow</span>.</p>
 
-  <p>The <code title="attr-input-min">min</code> attribute also
-  defines the <span title="concept-input-min-zero">step
-  base</span>.</p>
-
 
   <h6>The <code title="attr-input-step">step</code> attribute</h6>
 
   <p>The <dfn title="attr-input-step"><code>step</code></dfn>
   attribute indicates the granularity that is expected (and required)
   of the <span title="concept-fe-value">value</span>, by limiting
   the allowed values. The section that defines the <code
   title="attr-input-type">type</code> attribute's current state also
   defines the <dfn title="concept-input-step-default">default
   step</dfn> and the <dfn title="concept-input-step-scale">step
@@ -27232,47 +27260,61 @@ rel="" on submit buttons?
   <ol>
 
    <li><p>If the <code title="dom-input-stepUp">stepUp()</code> and
    <code title="dom-input-stepDown">stepDown()</code> methods do not
    apply, as defined for the <code>input</code> element's <code
    title="attr-input-type">type</code> attribute's current state, then
    throw an <code>INVALID_ACCESS_ERR</code> exception, and abort these
    steps.</p></li>
 
    <li><p>If the element has no <span
-   title="concept-input-step">allowed value step</span>, then throw a
+   title="concept-input-step">allowed value step</span>, then throw an
    <code>INVALID_ACCESS_ERR</code> exception, and abort these
    steps.</p></li>
 
    <li><p>If applying the <span
    title="concept-input-value-string-number">algorithm to convert a
    string to a number</span> to the string given by the element's
    <span title="concept-fe-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.</p></li>
 
    <li><p>If the method invoked was the <code
    title="dom-input-stepDown">stepDown()</code> method, negate <var
    title="">value</var>.</p></li>
 
    <li><p>Let <var title="">value</var> be the result of adding the
    <span title="concept-input-step">allowed value step</span> to <var
    title="">value</var>.</p></li>
 
-   <li><p>Run the <span
+   <li><p>Let <var title="">value as string</var> be the result of
+   running the <span
    title="concept-input-value-number-string">algorithm to convert a
    number to a string</span>, as defined for the <code>input</code>
    element's <code title="attr-input-type">type</code> attribute's
-   current state, on <var title="">value</var>, and set the <span
-   title="concept-fe-value">value</span> of the element to the
-   resulting string.</p></li>
+   current state, on <var title="">value</var>.</p></li>
+
+   <li><p>If the element has a <span
+   title="concept-input-min">minimum</span>, and the <var
+   title="">value</var> is less than that <span
+   title="concept-input-min">minimum</span>, then throw a
+   <code>INVALID_ACCESS_ERR</code> exception.</p></li>
+
+   <li><p>If the element has a <span
+   title="concept-input-max">maximum</span>, and the <var
+   title="">value</var> is greater than that <span
+   title="concept-input-max">maximum</span>, then throw a
+   <code>INVALID_ACCESS_ERR</code> exception.</p></li>
+
+   <li><p>Set the <span title="concept-fe-value">value</span> of the
+   element to <var title="">value as string</var>.</p></li>
 
   </ol>
 
 
   <h6>Others...</h6>
 
   <p class="big-issue">... <dfn title="dom-input-checked"><code>checked</code></dfn></p>
   <p class="big-issue">... <dfn title="dom-input-list"><code>list</code></dfn></p>
   <p class="big-issue">... <dfn title="dom-input-selectedOption"><code>selectedOption</code></dfn></p>
 

|