[html5] r2314 - [] (0) WF2: required='' only applies to mutable text controls; <output> .value, [...]
whatwg at whatwg.org
whatwg at whatwg.org
Thu Oct 9 17:26:02 PDT 2008
Author: ianh
Date: 2008-10-09 17:26:01 -0700 (Thu, 09 Oct 2008)
New Revision: 2314
Modified:
index
source
Log:
[] (0) WF2: required='' only applies to mutable text controls; <output> .value, .defaultValue
Modified: index
===================================================================
--- index 2008-10-10 00:00:33 UTC (rev 2313)
+++ index 2008-10-10 00:26:01 UTC (rev 2314)
@@ -25911,6 +25911,7 @@
<a href=#limited-to-only-positive-non-zero-numbers>limited to only positive non-zero numbers</a>.</p>
+
<h6 id=the-required-attribute><span class=secno>4.10.4.2.5 </span>The <code title=attr-input-required><a href=#attr-input-required>required</a></code> attribute</h6>
<p>The <dfn id=attr-input-required title=attr-input-required><code>required</code></dfn>
@@ -25919,6 +25920,7 @@
<p><strong>Constraint validation:</strong> If the element is <i title=concept-input-required><a href=#concept-input-required>required</a></i>, and its <code title=dom-input-value><a href=#dom-input-value>value</a></code> DOM attribute applies and is in
the mode <a href=#dom-input-value-value title=dom-input-value-value>value</a>, and the
+ element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>, and the
element's <a href=#concept-fe-value title=concept-fe-value>value</a> is the empty
string, then the element is <a href=#suffering-from-being-missing>suffering from being
missing</a>.</p>
@@ -26965,8 +26967,9 @@
<p><strong>Constraint validation:</strong> If the element has its
<code title=attr-textarea-required><a href=#attr-textarea-required>required</a></code> attribute
- specified, and the element's <a href=#concept-fe-value title=concept-fe-value>value</a> is the empty string, then the
- element is <a href=#suffering-from-being-missing>suffering from being missing</a>.</p>
+ specified, and the element is <a href=#concept-textarea-mutable title=concept-textarea-mutable>mutable</a>, and the element's
+ <a href=#concept-fe-value title=concept-fe-value>value</a> is the empty string,
+ then the element is <a href=#suffering-from-being-missing>suffering from being missing</a>.</p>
<p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to
explicitly associate the <code><a href=#the-textarea-element>textarea</a></code> element with its
@@ -26976,8 +26979,7 @@
submitted. The <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code>
attribute controls focus.</p>
- <p>The <dfn id=dom-textarea-accept title=dom-textarea-accept><code>accept</code></dfn>,
- <dfn id=dom-textarea-cols title=dom-textarea-cols><code>cols</code></dfn>, <dfn id=dom-textarea-required title=dom-textarea-required><code>required</code></dfn>, <dfn id=dom-textarea-rows title=dom-textarea-rows><code>rows</code></dfn>, and <dfn id=dom-textarea-wrap title=dom-textarea-wrap><code>wrap</code></dfn> attributes must
+ <p>The <dfn id=dom-textarea-cols title=dom-textarea-cols><code>cols</code></dfn>, <dfn id=dom-textarea-required title=dom-textarea-required><code>required</code></dfn>, <dfn id=dom-textarea-rows title=dom-textarea-rows><code>rows</code></dfn>, and <dfn id=dom-textarea-wrap title=dom-textarea-wrap><code>wrap</code></dfn> attributes must
<a href=#reflect>reflect</a> the respective content attributes of the same
name. The <code title=dom-textarea-cols><a href=#dom-textarea-cols>cols</a></code> and <code title=dom-textarea-rows><a href=#dom-textarea-rows>rows</a></code> attributes are <a href=#limited-to-only-positive-non-zero-numbers>limited
to only positive non-zero numbers</a>. The <dfn id=dom-textarea-maxlength title=dom-textarea-maxLength><code>maxLength</code></dfn> DOM
@@ -27027,8 +27029,8 @@
attribute DOMString <a href=#dom-fe-name title=dom-fe-name>name</a>;
readonly attribute DOMString <span title=dom-output-type>type</span>;
- attribute DOMString <span title=dom-output-defaultValue>defaultValue</span>;
- attribute DOMString <span title=dom-output-value>value</span>;
+ attribute DOMString <a href=#dom-output-defaultvalue title=dom-output-defaultValue>defaultValue</a>;
+ attribute DOMString <a href=#dom-output-value title=dom-output-value>value</a>;
readonly attribute boolean <a href=#dom-cva-willvalidate title=dom-cva-willValidate>willValidate</a>;
readonly attribute <span>ValidityState</span> <a href=#dom-cva-validity title=dom-cva-validity>validity</a>;
@@ -27036,7 +27038,7 @@
boolean <a href=#dom-cva-checkvalidatity title=dom-cva-checkValidatity>checkValidity</a>();
void <a href=#dom-cva-setcustomvalidity title=dom-cva-setCustomValidity>setCustomValidity</a>(in DOMString error);
};</pre>
- </dd>
+ </dd>
</dl><p class=XXX>...</p>
<p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to
@@ -27044,6 +27046,49 @@
<a href=#form-owner>form owner</a>. The <code title=attr-fe-name><a href=#attr-fe-name>name</a></code>
attribute represents the element's name.</p>
+ <p>The element has a <dfn id=concept-output-mode title=concept-output-mode>value mode
+ flag</dfn> which is either <i title=concept-output-mode-value>value</i> or <i title=concept-output-mode-default>default</i>. Initially the <a href=#concept-output-mode title=concept-output-mode>value mode flag</a> must be set to <i title=concept-output-mode-default>default</i>.</p>
+
+ <p>When the to <a href=#concept-output-mode title=concept-output-mode>value mode
+ flag</a> is in mode <i title=concept-output-mode-default>default</i>, the contents of the
+ element represent both the value of the element and its default
+ value. When the <a href=#concept-output-mode title=concept-output-mode>value mode
+ flag</a> is in mode <i title=concept-output-mode-value>value</i>, the contents of the
+ element represent the value of the element only, and the default
+ value is only accessible using the <code title=dom-output-defaultValue><a href=#dom-output-defaultvalue>defaultValue</a></code> DOM
+ attribute.</p>
+
+ <p>The element also has a <dfn id=concept-output-defaultvalue title=concept-output-defaultValue>default value</dfn>. Initially,
+ the <a href=#concept-output-defaultvalue title=concept-output-defaultValue>default value</a>
+ must be the empty string.</p>
+
+ <p>Whenever the element's descendants are changed in any way, if the
+ <a href=#concept-output-mode title=concept-output-mode>value mode flag</a> is in mode
+ <i title=concept-output-mode-default>default</i>, the element's
+ <a href=#concept-output-defaultvalue title=concept-output-defaultValue>default value</a> must
+ be set to the value of the element's <code><a href=#textcontent>textContent</a></code> DOM
+ attribute.</p>
+
+ <p>The <a href=#concept-form-reset-control title=concept-form-reset-control>reset
+ algorithm</a> for <code><a href=#the-textarea-element>textarea</a></code> elements is to set the
+ element's <code><a href=#textcontent>textContent</a></code> DOM attribute to the value of the
+ element's <code title=dom-output-defaultValue><a href=#dom-output-defaultvalue>defaultValue</a></code>
+ DOM attribute (thus replacing the element's child nodes), and then
+ to set the element's <a href=#concept-output-mode title=concept-output-mode>value mode
+ flag</a> to <i title=concept-output-mode-default>default</i>.</p>
+
+ <p>The <dfn id=dom-output-value title=dom-output-value><code>value</code></dfn> DOM
+ attribute must act like the element's <code><a href=#textcontent>textContent</a></code> DOM
+ attribute, except that on setting, in addition, before the child
+ nodes are changed, the element's <a href=#concept-output-mode title=concept-output-mode>value mode flag</a> must be set to <i title=concept-output-mode-value>value</i>.</p>
+
+ <p>The <dfn id=dom-output-defaultvalue title=dom-output-defaultValue><code>defaultValue</code></dfn> DOM
+ attribute, on getting, must return the element's <a href=#concept-output-defaultvalue title=concept-output-defaultValue>default value</a>. On
+ setting, the attribute must set the element's <a href=#concept-output-defaultvalue title=concept-output-defaultValue>default value</a>, and, if
+ the element's <a href=#concept-output-mode title=concept-output-mode>value mode
+ flag</a> is in the mode <i title=concept-output-mode-default>default</i>, set the element's
+ <code><a href=#textcontent>textContent</a></code> DOM attribute as well.</p>
+
<p>The <code title=dom-cva-willValidate><a href=#dom-cva-willvalidate>willValidate</a></code>,
<code title=dom-cva-validity><a href=#dom-cva-validity>validity</a></code>, and <code title=dom-cva-validationMessage><a href=#dom-cva-validationmessage>validationMessage</a></code>
attributes, and the <code title=dom-cva-checkValidatity><a href=#dom-cva-checkvalidatity>checkValidity()</a></code> and
Modified: source
===================================================================
--- source 2008-10-10 00:00:33 UTC (rev 2313)
+++ source 2008-10-10 00:26:01 UTC (rev 2314)
@@ -28894,6 +28894,7 @@
<span>limited to only positive non-zero numbers</span>.</p>
+
<h6>The <code title="attr-input-required">required</code> attribute</h6>
<p>The <dfn title="attr-input-required"><code>required</code></dfn>
@@ -28905,6 +28906,7 @@
title="concept-input-required">required</i>, and its <code
title="dom-input-value">value</code> DOM attribute applies and is in
the mode <span title="dom-input-value-value">value</span>, and the
+ element is <i title="concept-input-mutable">mutable</i>, and the
element's <span title="concept-fe-value">value</span> is the empty
string, then the element is <span>suffering from being
missing</span>.</p>
@@ -30252,9 +30254,10 @@
<p><strong>Constraint validation:</strong> If the element has its
<code title="attr-textarea-required">required</code> attribute
- specified, and the element's <span
- title="concept-fe-value">value</span> is the empty string, then the
- element is <span>suffering from being missing</span>.</p>
+ specified, and the element is <span
+ title="concept-textarea-mutable">mutable</span>, and the element's
+ <span title="concept-fe-value">value</span> is the empty string,
+ then the element is <span>suffering from being missing</span>.</p>
<p>The <code title="attr-fae-form">form</code> attribute is used to
explicitly associate the <code>textarea</code> element with its
@@ -30265,8 +30268,7 @@
submitted. The <code title="attr-fe-autofocus">autofocus</code>
attribute controls focus.</p>
- <p>The <dfn title="dom-textarea-accept"><code>accept</code></dfn>,
- <dfn title="dom-textarea-cols"><code>cols</code></dfn>, <dfn
+ <p>The <dfn title="dom-textarea-cols"><code>cols</code></dfn>, <dfn
title="dom-textarea-required"><code>required</code></dfn>, <dfn
title="dom-textarea-rows"><code>rows</code></dfn>, and <dfn
title="dom-textarea-wrap"><code>wrap</code></dfn> attributes must
@@ -30339,7 +30341,7 @@
boolean <span title="dom-cva-checkValidatity">checkValidity</span>();
void <span title="dom-cva-setCustomValidity">setCustomValidity</span>(in DOMString error);
};</pre>
- </dd>
+ </dd>
</dl>
<p class="XXX">...</p>
@@ -30349,6 +30351,64 @@
<span>form owner</span>. The <code title="attr-fe-name">name</code>
attribute represents the element's name.</p>
+ <p>The element has a <dfn title="concept-output-mode">value mode
+ flag</dfn> which is either <i
+ title="concept-output-mode-value">value</i> or <i
+ title="concept-output-mode-default">default</i>. Initially the <span
+ title="concept-output-mode">value mode flag</span> must be set to <i
+ title="concept-output-mode-default">default</i>.</p>
+
+ <p>When the to <span title="concept-output-mode">value mode
+ flag</span> is in mode <i
+ title="concept-output-mode-default">default</i>, the contents of the
+ element represent both the value of the element and its default
+ value. When the <span title="concept-output-mode">value mode
+ flag</span> is in mode <i
+ title="concept-output-mode-value">value</i>, the contents of the
+ element represent the value of the element only, and the default
+ value is only accessible using the <code
+ title="dom-output-defaultValue">defaultValue</code> DOM
+ attribute.</p>
+
+ <p>The element also has a <dfn
+ title="concept-output-defaultValue">default value</dfn>. Initially,
+ the <span title="concept-output-defaultValue">default value</span>
+ must be the empty string.</p>
+
+ <p>Whenever the element's descendants are changed in any way, if the
+ <span title="concept-output-mode">value mode flag</span> is in mode
+ <i title="concept-output-mode-default">default</i>, the element's
+ <span title="concept-output-defaultValue">default value</span> must
+ be set to the value of the element's <code>textContent</code> DOM
+ attribute.</p>
+
+ <p>The <span title="concept-form-reset-control">reset
+ algorithm</span> for <code>textarea</code> elements is to set the
+ element's <code>textContent</code> DOM attribute to the value of the
+ element's <code title="dom-output-defaultValue">defaultValue</code>
+ DOM attribute (thus replacing the element's child nodes), and then
+ to set the element's <span title="concept-output-mode">value mode
+ flag</span> to <i
+ title="concept-output-mode-default">default</i>.</p>
+
+ <p>The <dfn title="dom-output-value"><code>value</code></dfn> DOM
+ attribute must act like the element's <code>textContent</code> DOM
+ attribute, except that on setting, in addition, before the child
+ nodes are changed, the element's <span
+ title="concept-output-mode">value mode flag</span> must be set to <i
+ title="concept-output-mode-value">value</i>.</p>
+
+ <p>The <dfn
+ title="dom-output-defaultValue"><code>defaultValue</code></dfn> DOM
+ attribute, on getting, must return the element's <span
+ title="concept-output-defaultValue">default value</span>. On
+ setting, the attribute must set the element's <span
+ title="concept-output-defaultValue">default value</span>, and, if
+ the element's <span title="concept-output-mode">value mode
+ flag</span> is in the mode <i
+ title="concept-output-mode-default">default</i>, set the element's
+ <code>textContent</code> DOM attribute as well.</p>
+
<p>The <code title="dom-cva-willValidate">willValidate</code>,
<code title="dom-cva-validity">validity</code>, and <code
title="dom-cva-validationMessage">validationMessage</code>
More information about the Commit-Watchers
mailing list