Short URL: http://html5.org/r/2228
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 2228 | WF2: <input type=url>. Define constraints for how/when autocomplete='' happens. Say that input controls not in a document aren't mutable. | 2008-09-24 07:17 |
Index: source =================================================================== --- source (revision 2227) +++ source (revision 2228) @@ -26085,6 +26085,12 @@ title="concept-fe-disabled">disabled</span>, it is <i title="concept-input-immutable">immutable</i>.</p> + <p>When an <code>input</code> element does not have a + <code>Document</code> node as one of its ancestors (i.e. when it is + not in the document), it is <i + title="concept-input-immutable">immutable</i>.</p> <!-- XXX how does + this affect shadow trees in XBL2? --> + <p class="note">The <code title="attr-input-readonly">readonly</code> attribute can also make an <code>input</code> element <i @@ -26195,8 +26201,6 @@ follows:</strong> <span>Strip line breaks from the value</span>.</p> - <!-- XXX autocomplete? --> - <p><strong>The <span title="attr-input-type-text">Text</span> state's <span>default value change algorithm</span> is as follows:</strong> If the <code>input</code> element is not <i @@ -26375,8 +26379,6 @@ follows:</strong> <span>Strip line breaks from the value</span>.</p> - <!-- XXX autocomplete? --> - <p><strong>The <span title="attr-input-type-email">E-mail</span> state's <span>default value change algorithm</span> is as follows:</strong> If the <code>input</code> element is not <i @@ -26397,7 +26399,8 @@ excluding the <code>CFWS</code> subtoken everywhere, and excluding the <code>FWS</code> subtoken everywhere except in the <code>quoted-string</code> subtoken, the element is <span>suffering - from a type mismatch</span>. <a href="#refsRFC2822">[RFC2822]</a> + from a type mismatch</span>. <a + href="#refsRFC2822">[RFC2822]</a></p> <p>When an <code>input</code> element's <code title="attr-input-type">type</code> attribute is in the <span @@ -26449,10 +26452,94 @@ attribute has the value <code title="attr-input-type-url-keyword">url</code>, it is in the <span title="attr-input-type-url">URL</span> state.</p> - <p class="big-issue">...</p> + <p>When an <code>input</code> element's <code + title="attr-input-type">type</code> attribute is in the <span + title="attr-input-type-url">URL</span> state, the element represents + a control for editing a single <span>URL</span> given in 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-url">URL</span> state is <i + title="concept-input-mutable">mutable</i>, the user should allow the + user to change the URL represented by its <span + title="concept-fe-value">value</span>. User agents may allow the + user to set the <span title="concept-fe-value">value</span> to a + string that is not a URL. User agents should allow the user to set + the <span title="concept-fe-value">value</span> to the empty + string. 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-url">URL</span> + state's <span>control initialization algorithm</span> is as + follows:</strong> <span>Strip line breaks from the + value</span>.</p> + <p><strong>The <span title="attr-input-type-url">URL</span> + state's <span>default value change algorithm</span> is as + follows:</strong> If the <code>input</code> element is not <i + title="concept-input-dirty">dirty</i> then set the <span + title="concept-fe-value">value</span> of the element to the value of + the <code title="attr-input-value">value</code> content attribute + and <span>strip line breaks from the value</span>.</p> + + <p><strong>The <span title="attr-input-type-url">URL</span> + state's <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><strong>Constraint validation:</strong> While the <span + title="concept-fe-value">value</span> of the element is not a + <span>valid URL</span>, the element is <span>suffering from a type + mismatch</span>.</p> + + <p>When an <code>input</code> element's <code + title="attr-input-type">type</code> attribute is in the <span + title="attr-input-type-url">URL</span> state, 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-maxlength">maxlength</code>, + <code title="attr-input-pattern">pattern</code>, + <code title="attr-input-readonly">readonly</code>, + <code title="attr-input-required">required</code>, and + <code title="attr-input-size">size</code> content attributes; + <code title="dom-input-list">list</code>, and + <code title="dom-input-selectedOption">selectedOption</code> DOM attributes. + + <p>When an <code>input</code> element's <code + title="attr-input-type">type</code> attribute is in the <span + title="attr-input-type-url">URL</span> state, 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-max">max</code>, + <code class="no-backref" title="attr-input-min">min</code>, + <code class="no-backref" title="attr-input-src">src</code>, + <code class="no-backref" title="attr-input-step">step</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>When an <code>input</code> element's <code + title="attr-input-type">type</code> attribute is in the <span + title="attr-input-type-url">URL</span> state, the following DOM + attributes and methods do not apply to the element: + <code class="no-backref" title="dom-input-checked">checked</code>, + <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, + <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code>, + <code class="no-backref" title="dom-input-stepUp">stepUp()</code>, and + <code class="no-backref" title="dom-input-stepDown">stepDown()</code>.</p> + + + <h6><dfn title="attr-input-type-datetime">Date and Time</dfn> state</h6> <p>When an <code>input</code> element's <code title="attr-input-type">type</code> @@ -26733,10 +26820,12 @@ state, the user agent should not remember the control's value.</p> <!-- XXX xref value? --> - <p>This specification does not define the autocompletion mechanism. - User agents may implement any system within the conformance criteria - of this specification, taking into account security and privacy - concerns.</p> + <p>The autocompletion mechanism must be implemented by the user + agent acting as if the user had modified the element's <span + title="concept-input-value">value</span>, and must be done at a time + where the element is <i title="concept-input-mutable">mutable</i> + (e.g. just after the element has been inserted into the document, or + when the user agent <span>stops parsing</span>).</p> <div class="example"> @@ -26761,6 +26850,7 @@ disabled.</p> + <h6>The <code title="attr-input-readonly">readonly</code> attribute</h6> <p>The <dfn title="attr-input-readonly"><code>readonly</code></dfn>