Short URL: http://html5.org/r/2247
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 2247 | WF2: stepUp/stepDown shouldn't go out of range. Allow rounding of datetime controls. | 2008-09-30 04:10 |
Index: source
===================================================================
--- source (revision 2246)
+++ source (revision 2247)
@@ -26561,7 +26561,11 @@
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>
@@ -26733,8 +26737,10 @@
<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
@@ -27038,39 +27044,61 @@
<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>
@@ -27239,7 +27267,7 @@
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>
@@ -27259,14 +27287,28 @@
<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>