Browse files

[] (0) WF2: <input type=number>

git-svn-id: http://svn.whatwg.org/webapps@2254 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent a4b76ea commit 858115ba383bec487ec86d7ef7839cb723713474 @Hixie Hixie committed Oct 1, 2008
Showing with 198 additions and 20 deletions.
  1. +105 −13 index
  2. +93 −7 source
View
118 index
@@ -30163,8 +30163,8 @@ function AddCloud(data, x, y) { ... }</pre>
is 60 seconds.
<p>When the element is <a href="#suffering3">suffering from a step
- mismatch</a>, the user agent may round the element's <span
- title=concept-input-value>value</span> to the nearest <a href="#utc-date"
+ mismatch</a>, the user agent may round the element's <a href="#value12"
+ title=concept-fe-value>value</a> to the nearest <a href="#utc-date"
title=concept-datetime>UTC date and time</a> for which the element would
not <a href="#suffering3" title="suffering from a step mismatch">suffer
from a step mismatch</a>.
@@ -30293,8 +30293,8 @@ function AddCloud(data, x, y) { ... }</pre>
day.
<p>When the element is <a href="#suffering3">suffering from a step
- mismatch</a>, the user agent may round the element's <span
- title=concept-input-value>value</span> to the nearest <a href="#date"
+ mismatch</a>, the user agent may round the element's <a href="#value12"
+ title=concept-fe-value>value</a> to the nearest <a href="#date"
title=concept-date>date</a> for which the element would not <a
href="#suffering3" title="suffering from a step mismatch">suffer from a
step mismatch</a>.
@@ -30421,8 +30421,8 @@ function AddCloud(data, x, y) { ... }</pre>
title=concept-input-step-default>default step</a> is 1 month.
<p>When the element is <a href="#suffering3">suffering from a step
- mismatch</a>, the user agent may round the element's <span
- title=concept-input-value>value</span> to the nearest <a href="#month0"
+ mismatch</a>, the user agent may round the element's <a href="#value12"
+ title=concept-fe-value>value</a> to the nearest <a href="#month0"
title=concept-month>month</a> for which the element would not <a
href="#suffering3" title="suffering from a step mismatch">suffer from a
step mismatch</a>.
@@ -30549,8 +30549,8 @@ function AddCloud(data, x, y) { ... }</pre>
week.
<p>When the element is <a href="#suffering3">suffering from a step
- mismatch</a>, the user agent may round the element's <span
- title=concept-input-value>value</span> to the nearest <a href="#week"
+ mismatch</a>, the user agent may round the element's <a href="#value12"
+ title=concept-fe-value>value</a> to the nearest <a href="#week"
title=concept-week>week</a> for which the element would not <a
href="#suffering3" title="suffering from a step mismatch">suffer from a
step mismatch</a>.
@@ -30678,8 +30678,8 @@ function AddCloud(data, x, y) { ... }</pre>
is 60 seconds.
<p>When the element is <a href="#suffering3">suffering from a step
- mismatch</a>, the user agent may round the element's <span
- title=concept-input-value>value</span> to the nearest <a href="#time"
+ mismatch</a>, the user agent may round the element's <a href="#value12"
+ title=concept-fe-value>value</a> to the nearest <a href="#time"
title=concept-time>time</a> for which the element would not <a
href="#suffering3" title="suffering from a step mismatch">suffer from a
step mismatch</a>.
@@ -30806,8 +30806,8 @@ function AddCloud(data, x, y) { ... }</pre>
is 60 seconds.
<p>When the element is <a href="#suffering3">suffering from a step
- mismatch</a>, the user agent may round the element's <span
- title=concept-input-value>value</span> to the nearest <a href="#local1"
+ mismatch</a>, the user agent may round the element's <a href="#value12"
+ title=concept-fe-value>value</a> to the nearest <a href="#local1"
title=concept-datetime-local>local date and time</a> for which the element
would not <a href="#suffering3" title="suffering from a step
mismatch">suffer from a step mismatch</a>.
@@ -30879,7 +30879,99 @@ function AddCloud(data, x, y) { ... }</pre>
the <a href="#number2" title=attr-input-type-number>Number</a> state, the
rules in this section apply.
- <p class=big-issue>...
+ <p>The <code><a href="#input0">input</a></code> element represents a
+ control for setting the element's <a href="#value12"
+ title=concept-fe-value>value</a> to a string representing a number.
+
+ <p>If the element is <i title=concept-input-mutable><a
+ href="#mutable">mutable</a></i>, the user should allow the user to change
+ the number represented by its <a href="#value12"
+ title=concept-fe-value>value</a>, as obtained from applying the <a
+ href="#rules1">rules for parsing floating point number values</a> to it.
+ User agents must not allow the user to set the <a href="#value12"
+ title=concept-fe-value>value</a> to a string that is not a <a
+ href="#valid1">valid floating point number</a>. If the user agent provides
+ a user interface for selecting a number, then the <a href="#value12"
+ title=concept-fe-value>value</a> must be set to a <a href="#valid1">valid
+ floating point number</a> representing the user's selection. User agents
+ should allow the user to set the <a href="#value12"
+ title=concept-fe-value>value</a> to the empty string.
+
+ <p><strong>The <a href="#value8">value sanitization algorithm</a> is as
+ follows:</strong> If the <a href="#value12"
+ title=concept-fe-value>value</a> of the element is not a <a
+ href="#valid1">valid floating point number</a>, then set it to the empty
+ string instead.
+
+ <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="#valid1">valid floating
+ point number</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="#valid1">valid floating point number</a>.
+
+ <p>The <a href="#step-" title=concept-input-step-scale>step scale
+ factor</a> is 1. The <a href="#default2"
+ title=concept-input-step-default>default step</a> is 1 (allowing only
+ integers, unless the <code title=attr-input-min><a
+ href="#min2">min</a></code> attribute has a non-integer value).
+
+ <p>When the element is <a href="#suffering3">suffering from a step
+ mismatch</a>, the user agent may round the element's <a href="#value12"
+ title=concept-fe-value>value</a> to the nearest number for which the
+ element would not <a href="#suffering3" title="suffering from a step
+ mismatch">suffer from a step mismatch</a>.
+
+ <p><strong>The <a href="#algorithm5"
+ title=concept-input-value-string-number>algorithm to convert a string to a
+ number</a>, given a string <var title="">input</var>, is as
+ follows:</strong> If applying the <a href="#rules1">rules for parsing
+ floating point number values</a> to <var title="">input</var> results in
+ an error, then return an error; otherwise, return the resulting number.
+
+ <p><strong>The <a href="#algorithm6"
+ title=concept-input-value-number-string>algorithm to convert a number to a
+ string</a>, given a number <var title="">input</var>, is as
+ follows:</strong> Return a <a href="#valid1">valid floating point
+ number</a> that represents <var title="">input</var>.
+
+ <p>The following common <code><a href="#input0">input</a></code> element
+ content attributes, DOM attributes, and methods apply to the element:
+ <code title=attr-input-autocomplete><a
+ href="#autocomplete0">autocomplete</a></code>, <code
+ title=attr-input-list>list</code>, <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-readonly><a
+ href="#readonly0">readonly</a></code>, <code
+ title=attr-input-required>required</code>, and <code
+ title=attr-input-step><a href="#step0">step</a></code> content attributes;
+ <code title=dom-input-list><a href="#list">list</a></code>, <code
+ title=dom-input-valueAsNumber><a
+ href="#valueasnumber">valueAsNumber</a></code>, <code
+ title=dom-input-selectedOption><a
+ href="#selectedoption">selectedOption</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> DOM
+ attributes.
+
+ <p>The following content attributes must not be specified and do not apply
+ to the element: <code class=no-backref title=attr-input-accept><a
+ href="#accept0">accept</a></code>, <code class=no-backref
+ title=attr-input-alt>alt</code>, <code class=no-backref
+ title=attr-input-checked>checked</code>, <code class=no-backref
+ title=attr-input-maxlength><a href="#maxlength0">maxlength</a></code>,
+ <code class=no-backref title=attr-input-pattern>pattern</code>, <code
+ class=no-backref title=attr-input-size>size</code>, <code class=no-backref
+ title=attr-input-src>src</code>, <code class=no-backref
+ title=attr-fs-target><a href="#target3">target</a></code>, <code
+ class=no-backref title=attr-fs-method><a href="#method">method</a></code>,
+ <code class=no-backref title=attr-fs-enctype><a
+ href="#enctype">enctype</a></code>, and <code class=no-backref
+ title=attr-fs-action><a href="#action">action</a></code>.
+
+ <p>The following DOM attributes do not apply to the element: <code
+ class=no-backref title=dom-input-valueAsDate><a
+ href="#valueasdate">valueAsDate</a></code> and <code class=no-backref
+ title=dom-input-checked><a href="#checked1">checked</a></code>.
<h6 id=range><span class=secno>4.10.4.1.12. </span><dfn id=range1
title=attr-input-type-range>Range</dfn> state</h6>
View
100 source
@@ -26638,7 +26638,7 @@ function AddCloud(data, x, y) { ... }</pre>
<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 <span
+ title="concept-fe-value">value</span> to the nearest <span
title="concept-datetime">UTC date and time</span> for which the
element would not <span title="suffering from a step
mismatch">suffer from a step mismatch</span>.</p>
@@ -26764,7 +26764,7 @@ function AddCloud(data, x, y) { ... }</pre>
<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 <span
+ title="concept-fe-value">value</span> to the nearest <span
title="concept-date">date</span> for which the element would not
<span title="suffering from a step mismatch">suffer from a step
mismatch</span>.</p>
@@ -26890,7 +26890,7 @@ function AddCloud(data, x, y) { ... }</pre>
<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 <span
+ title="concept-fe-value">value</span> to the nearest <span
title="concept-month">month</span> for which the element would not
<span title="suffering from a step mismatch">suffer from a step
mismatch</span>.</p>
@@ -27017,7 +27017,7 @@ function AddCloud(data, x, y) { ... }</pre>
<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 <span
+ title="concept-fe-value">value</span> to the nearest <span
title="concept-week">week</span> for which the element would not
<span title="suffering from a step mismatch">suffer from a step
mismatch</span>.</p>
@@ -27143,7 +27143,7 @@ function AddCloud(data, x, y) { ... }</pre>
<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 <span
+ title="concept-fe-value">value</span> to the nearest <span
title="concept-time">time</span> for which the element would not
<span title="suffering from a step mismatch">suffer from a step
mismatch</span>.</p>
@@ -27265,7 +27265,7 @@ function AddCloud(data, x, y) { ... }</pre>
<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 <span
+ title="concept-fe-value">value</span> to the nearest <span
title="concept-datetime-local">local date and time</span> for which
the element would not <span title="suffering from a step
mismatch">suffer from a step mismatch</span>.</p>
@@ -27333,7 +27333,93 @@ function AddCloud(data, x, y) { ... }</pre>
title="attr-input-type-number">Number</span> state, the rules in
this section apply.</p>
- <p class="big-issue">...</p>
+ <p>The <code>input</code> element represents a control for setting
+ the element's <span title="concept-fe-value">value</span> to a
+ string representing a number.</p>
+
+ <p>If the element is <i title="concept-input-mutable">mutable</i>,
+ the user should allow the user to change the number represented by
+ its <span title="concept-fe-value">value</span>, as obtained from
+ applying the <span>rules for parsing floating point number
+ values</span> to it. User agents must not allow the user to set the
+ <span title="concept-fe-value">value</span> to a string that is not
+ a <span>valid floating point number</span>. If the user agent
+ provides a user interface for selecting a number, then the <span
+ title="concept-fe-value">value</span> must be set to a <span>valid
+ floating point number</span> representing the user's selection. User
+ agents should allow the user to set the <span
+ title="concept-fe-value">value</span> to the empty string.</p>
+
+ <p><strong>The <span>value sanitization algorithm</span> is as
+ follows:</strong> If the <span title="concept-fe-value">value</span>
+ of the element is not a <span>valid floating point number</span>,
+ then set it to the empty string instead.</p>
+
+ <p>The <code title="attr-input-min">min</code> attribute, if
+ specified, must have a value that is a <span>valid floating point
+ number</span>. The <code title="attr-input-max">max</code>
+ attribute, if specified, must have a value that is a <span>valid
+ floating point number</span>.</p>
+
+ <p>The <span title="concept-input-step-scale">step scale
+ factor</span> is 1. The <span
+ title="concept-input-step-default">default step</span> is 1
+ (allowing only integers, unless the <code
+ title="attr-input-min">min</code> attribute has a non-integer
+ value).</p>
+
+ <p>When the element is <span>suffering from a step mismatch</span>,
+ the user agent may round the element's <span
+ title="concept-fe-value">value</span> to the nearest number for
+ which the element would not <span title="suffering from a step
+ mismatch">suffer from a step mismatch</span>.</p>
+
+ <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> If applying the <span>rules for parsing
+ floating point number values</span> to <var title="">input</var>
+ results in an error, then return an error; otherwise, return the
+ resulting number.</p>
+
+ <p><strong>The <span
+ title="concept-input-value-number-string">algorithm to convert a
+ number to a string</span>, given a number <var title="">input</var>,
+ is as follows:</strong> Return a <span>valid floating point
+ number</span> that represents <var title="">input</var>.</p>
+
+ <p>The following common <code>input</code> element content
+ attributes, DOM attributes, and methods apply to the element:
+ <code title="attr-input-autocomplete">autocomplete</code>,
+ <code title="attr-input-list">list</code>,
+ <code title="attr-input-max">max</code>,
+ <code title="attr-input-min">min</code>,
+ <code title="attr-input-readonly">readonly</code>,
+ <code title="attr-input-required">required</code>, and
+ <code title="attr-input-step">step</code> content attributes;
+ <code title="dom-input-list">list</code>,
+ <code title="dom-input-valueAsNumber">valueAsNumber</code>,
+ <code title="dom-input-selectedOption">selectedOption</code>,
+ <code title="dom-input-stepUp">stepUp()</code>, and
+ <code title="dom-input-stepDown">stepDown()</code> DOM attributes.</p>
+
+ <p>The following content attributes must not be specified and do not
+ apply to the element:
+ <code class="no-backref" title="attr-input-accept">accept</code>,
+ <code class="no-backref" title="attr-input-alt">alt</code>,
+ <code class="no-backref" title="attr-input-checked">checked</code>,
+ <code class="no-backref" title="attr-input-maxlength">maxlength</code>,
+ <code class="no-backref" title="attr-input-pattern">pattern</code>,
+ <code class="no-backref" title="attr-input-size">size</code>,
+ <code class="no-backref" title="attr-input-src">src</code>,
+ <code class="no-backref" title="attr-fs-target">target</code>,
+ <code class="no-backref" title="attr-fs-method">method</code>,
+ <code class="no-backref" title="attr-fs-enctype">enctype</code>, and
+ <code class="no-backref" title="attr-fs-action">action</code>.</p>
+
+ <p>The following DOM attributes do not apply to the element:
+ <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code> and
+ <code class="no-backref" title="dom-input-checked">checked</code>.</p>

0 comments on commit 858115b

Please sign in to comment.