[html5] r2213 - [] (0) WF2: Define input.value, especially for type=text; and related tweaks to [...]
whatwg at whatwg.org
whatwg at whatwg.org
Wed Sep 17 20:18:17 PDT 2008
Author: ianh
Date: 2008-09-17 20:18:16 -0700 (Wed, 17 Sep 2008)
New Revision: 2213
Modified:
index
source
Log:
[] (0) WF2: Define input.value, especially for type=text; and related tweaks to make things read better.
Modified: index
===================================================================
--- index 2008-09-18 00:42:00 UTC (rev 2212)
+++ index 2008-09-18 03:18:16 UTC (rev 2213)
@@ -28606,7 +28606,7 @@
state must be invoked.
<p>Each <code><a href="#input0">input</a></code> element has a <a
- href="#value11" title=concept-fe-value>value</a>, which is exposed by the
+ href="#value12" title=concept-fe-value>value</a>, which is exposed by the
<code title=dom-input-value><a href="#value9">value</a></code> DOM
attribute.
@@ -28617,7 +28617,11 @@
element is <dfn id=immutable
title=concept-input-immutable><i>immutable</i></dfn>. Unless otherwise
specified, an <code><a href="#input0">input</a></code> element is always
- <i title=concept-input-mutable><a href="#mutable">mutable</a></i>.
+ <i title=concept-input-mutable><a href="#mutable">mutable</a></i>. When an
+ <code><a href="#input0">input</a></code> element is <i
+ title=concept-input-immutable><a href="#immutable">immutable</a></i>, the
+ user agent should not allow the user to modify the <a href="#value12"
+ title=concept-fe-value>value</a>.
<p>When an <code><a href="#input0">input</a></code> element is <a
href="#disabled4" title=concept-fe-disabled>disabled</a>, it is <i
@@ -28637,10 +28641,10 @@
href="#dirty0">dirty</a></i>) when the element is created, and must be set
to true (<i title=concept-input-dirty><a href="#dirty0">dirty</a></i>)
whenever the user interacts with the control in a way that changes the <a
- href="#value11" title=concept-fe-value>value</a>.
+ href="#value12" title=concept-fe-value>value</a>.
<p>The <dfn id=value8 title=attr-input-value><code>value</code></dfn>
- content attribute gives the default <a href="#value11"
+ content attribute gives the default <a href="#value12"
title=concept-fe-value>value</a> of the <code><a
href="#input0">input</a></code> element. When the <code
title=attr-input-value><a href="#value8">value</a></code> content
@@ -28726,8 +28730,19 @@
<p>When an <code><a href="#input0">input</a></code> element's <code
title=attr-input-type><a href="#type12">type</a></code> attribute is in
the <a href="#text2" title=attr-input-type-text>Text</a> state, the
- element represents a text edit control for a single line of plain text.
+ element represents a one line plain text edit control for the element's <a
+ href="#value12" title=concept-fe-value>value</a>.
+ <p>If an <code><a href="#input0">input</a></code> element whose <code
+ title=attr-input-type><a href="#type12">type</a></code> attribute is in
+ the <a href="#text2" title=attr-input-type-text>Text</a> state is <i
+ title=concept-input-mutable><a href="#mutable">mutable</a></i>, its <a
+ href="#value12" title=concept-fe-value>value</a> should be editable by the
+ user. User agents must not allow users to insert U+000A LINE FEED (LF) or
+ U+000D CARRIAGE RETURN (CR) characters into the <a href="#value12"
+ title=concept-fe-value>value</a> of such <code><a
+ href="#input0">input</a></code> elements.
+
<p><strong>The <a href="#text2" title=attr-input-type-text>Text</a> state's
<a href="#control0">control initialization algorithm</a> is as
follows:</strong> <a href="#strip">Strip line breaks from the value</a>.</p>
@@ -28737,20 +28752,15 @@
<a href="#default2">default value change algorithm</a> is as
follows:</strong> If the <code><a href="#input0">input</a></code> element
is not <i title=concept-input-dirty><a href="#dirty0">dirty</a></i> then
- set the <a href="#value11" title=concept-fe-value>value</a> of the element
+ set the <a href="#value12" title=concept-fe-value>value</a> of the element
to the value of the <code title=attr-input-value><a
href="#value8">value</a></code> content attribute and <a
href="#strip">strip line breaks from the value</a>.
- <p>If an <code><a href="#input0">input</a></code> element whose <code
- title=attr-input-type><a href="#type12">type</a></code> attribute is in
- the <a href="#text2" title=attr-input-type-text>Text</a> state is <i
- title=concept-input-mutable><a href="#mutable">mutable</a></i>, its <a
- href="#value11" title=concept-fe-value>value</a> should be editable by the
- user. User agents must not allow users to insert U+000A LINE FEED (LF) or
- U+000D CARRIAGE RETURN (CR) characters into the <a href="#value11"
- title=concept-fe-value>value</a> of such <code><a
- href="#input0">input</a></code> elements.
+ <p><strong>The <a href="#value10"><code title=dom-input-value>value</code>
+ setter algorithm</a> is as follows:</strong> Set the <a href="#value12"
+ title=concept-fe-value>value</a> of the element to the new value and <a
+ href="#strip">strip line breaks from the value</a>.
<p>When an <code><a href="#input0">input</a></code> element's <code
title=attr-input-type><a href="#type12">type</a></code> attribute is in
@@ -29013,7 +29023,7 @@
<p>When a user agent is to <dfn id=strip>strip line breaks from the
value</dfn>, the user agent must remove any U+000A LINE FEED (LF) and
- U+000D CARRIAGE RETURN (CR) characters from <a href="#value11"
+ U+000D CARRIAGE RETURN (CR) characters from <a href="#value12"
title=concept-fe-value>value</a>.
<h5 id=common4><span class=secno>4.9.4.2. </span>Common <code><a
@@ -29093,8 +29103,15 @@
<h6 id=value><span class=secno>4.9.4.3.1. </span>Value manipulation</h6>
- <p class=big-issue>... <dfn id=value9
- title=dom-input-value><code>value</code></dfn>
+ <p>The <dfn id=value9 title=dom-input-value><code>value</code></dfn> DOM
+ attribute allows secripts to manipulate the <span
+ title=concept-input-value>value</span> of an <code><a
+ href="#input0">input</a></code> element. On getting, it must return the
+ current <span title=concept-input-value>value</span> of the element. On
+ setting, it must run the <dfn id=value10><code
+ title=dom-input-value>value</code> setter algorithm</dfn> defined for the
+ element's <code title=attr-input-type><a href="#type12">type</a></code>
+ attribute's current state.
<hr>
@@ -29475,7 +29492,7 @@
<p class=big-issue>... <dfn id=selected1
title=concept-option-selected>selected</dfn>
- <p class=big-issue>... <dfn id=value10
+ <p class=big-issue>... <dfn id=value11
title=concept-option-value>value</dfn>
<p class=big-issue> <dfn id=option0
@@ -29784,7 +29801,7 @@
<p class=big-issue>... <dfn id=disabled6
title=dom-fe-disabled>disabled</dfn> DOM attribute
- <p class=big-issue>... <dfn id=value11 title=concept-fe-value>value</dfn></p>
+ <p class=big-issue>... <dfn id=value12 title=concept-fe-value>value</dfn></p>
<!-- XXX autocomplete: define somewhere that the value may be set from a stored value -->
<h4 id=attributes2><span class=secno>4.9.14 </span><dfn
@@ -30131,7 +30148,7 @@
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="#value10"
+ the name and the <a href="#value11"
title=concept-option-value>value</a> of the <code><a
href="#option">option</a></code> element as the value.
@@ -30149,7 +30166,7 @@
<li>
<p>Otherwise, append an entry in the <var title="">form data set</var>
- with <var title="">name</var> as the name and the <a href="#value11"
+ with <var title="">name</var> as the name and the <a href="#value12"
title=concept-fe-value>value</a> of the <var title="">field</var>
element as the value.
</ol>
Modified: source
===================================================================
--- source 2008-09-18 00:42:00 UTC (rev 2212)
+++ source 2008-09-18 03:18:16 UTC (rev 2213)
@@ -25129,7 +25129,11 @@
false the element is <dfn
title="concept-input-immutable"><i>immutable</i></dfn>. Unless
otherwise specified, an <code>input</code> element is always <i
- title="concept-input-mutable">mutable</i>.</p>
+ title="concept-input-mutable">mutable</i>. When an
+ <code>input</code> element is <i
+ title="concept-input-immutable">immutable</i>, the user agent should
+ not allow the user to modify the <span
+ title="concept-fe-value">value</span>.</p>
<p>When an <code>input</code> element is <span
title="concept-fe-disabled">disabled</span>, it is <i
@@ -25229,8 +25233,19 @@
<p>When an <code>input</code> element's <code
title="attr-input-type">type</code> attribute is in the <span
title="attr-input-type-text">Text</span> state, the element
- represents a text edit control for a single line of plain text.</p>
+ represents a one line plain text edit control for the element's
+ <span title="concept-fe-value">value</span>.</p>
+ <p>If an <code>input</code> element whose <code
+ title="attr-input-type">type</code> attribute is in the <span
+ title="attr-input-type-text">Text</span> state is <i
+ title="concept-input-mutable">mutable</i>, its <span
+ title="concept-fe-value">value</span> should be editable by the
+ user. User agents must not allow users to insert U+000A LINE FEED
+ (LF) or U+000D CARRIAGE RETURN (CR) characters into the <span
+ title="concept-fe-value">value</span> of such <code>input</code>
+ elements.</p>
+
<p><strong>The <span title="attr-input-type-text">Text</span>
state's <span>control initialization algorithm</span> is as
follows:</strong> <span>Strip line breaks from the
@@ -25246,15 +25261,10 @@
the <code title="attr-input-value">value</code> content attribute
and <span>strip line breaks from the value</span>.</p>
- <p>If an <code>input</code> element whose <code
- title="attr-input-type">type</code> attribute is in the <span
- title="attr-input-type-text">Text</span> state is <i
- title="concept-input-mutable">mutable</i>, its <span
- title="concept-fe-value">value</span> should be editable by the
- user. User agents must not allow users to insert U+000A LINE FEED
- (LF) or U+000D CARRIAGE RETURN (CR) characters into the <span
- title="concept-fe-value">value</span> of such <code>input</code>
- elements.</p>
+ <p><strong>The <span><code title="dom-input-value">value</code>
+ setter algorithm</span> is as follows:</strong> Set the <span
+ title="concept-fe-value">value</span> of the element to the new
+ value and <span>strip line breaks from the value</span>.</p>
<p>When an <code>input</code> element's <code
title="attr-input-type">type</code> attribute is in the <span
@@ -25583,7 +25593,14 @@
<h6>Value manipulation</h6>
- <p class="big-issue">... <dfn title="dom-input-value"><code>value</code></dfn></p>
+ <p>The <dfn title="dom-input-value"><code>value</code></dfn> DOM
+ attribute allows secripts to manipulate the <span
+ title="concept-input-value">value</span> of an <code>input</code>
+ element. On getting, it must return the current <span
+ title="concept-input-value">value</span> of the element. On setting,
+ it must run the <dfn><code title="dom-input-value">value</code>
+ setter algorithm</dfn> defined for the element's <code
+ title="attr-input-type">type</code> attribute's current state.</p>
<hr>
More information about the Commit-Watchers
mailing list