HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2228WF2: <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
@@ -26078,20 +26078,26 @@ function AddCloud(data, x, y) { ... }</pre>
   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
   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
   title="concept-input-immutable">immutable</i>.</p>
 
   <p>Each <code>input</code> element has a boolean <dfn
   title="concept-input-dirty-flag">dirty flag</dfn>. When it is true,
   the element is said to be <dfn
   title="concept-input-dirty"><i>dirty</i></dfn>.</p>
 
@@ -26188,22 +26194,20 @@ function AddCloud(data, x, y) { ... }</pre>
   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
   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
   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-text">Text</span>
   state's <span><code title="dom-input-value">value</code> setter
@@ -26368,43 +26372,42 @@ function AddCloud(data, x, y) { ... }</pre>
   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-email">E-mail</span>
   state's <span>control initialization algorithm</span> is as
   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
   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-email">E-mail</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 does not match
   the <code>addr-spec</code> token defined in RFC 2822 section 3.4.1,
   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
   title="attr-input-type-email">E-mail</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>,
@@ -26442,21 +26445,105 @@ function AddCloud(data, x, y) { ... }</pre>
   <code class="no-backref" title="dom-input-stepDown">stepDown()</code>.</p>
 
 
 
   <h6><dfn title="attr-input-type-url">URL</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   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>
   attribute has the value <code title="attr-input-type-datetime-keyword">datetime</code>,
   it is in the <span title="attr-input-type-datetime">Date and Time</span> state.</p>
 
   <p class="big-issue">...</p>
@@ -26726,24 +26813,26 @@ rel="" on submit buttons?
   title="attr-input-autocomplete">autocomplete</code> attribute is in
   the <span title="attr-input-autocomplete-on-state">on</span> state,
   the user agent may store the value entered by the user so that if
   the user returns to the page, the UA can prefill the form. When an
   <code>input</code> element's <code
   title="attr-input-autocomplete">autocomplete</code> attribute is in
   the <span title="attr-input-autocomplete-off-state">off</span>
   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">
 
    <p>Banks frequently do not want UAs to prefill login
    information:</p>
 
    <pre>&lt;p>Account: &lt;input type="text" name="ac" autocomplete="off">&lt;/p>
 &lt;p>PIN: &lt;input type="text" name="pin" autocomplete="off">&lt;/p></pre>
 
   </div>
@@ -26754,20 +26843,21 @@ rel="" on submit buttons?
   the attribute to always be in the <span
   title="attr-input-autocomplete-on-state">on</span> state and always
   allowing values to be remembered and prefilled). Support for the
   <span title="attr-input-autocomplete-off-state">off</span> state
   should be enabled by default, and the ability to disable support
   should not be trivially accessible, as there are significant
   security implications for the user if support for this attribute is
   disabled.</p>
 
 
+
   <h6>The <code title="attr-input-readonly">readonly</code> attribute</h6>
 
   <p>The <dfn title="attr-input-readonly"><code>readonly</code></dfn>
   attribute is a <span>boolean attribute</span>. When specified, the
   element is <i title="concept-input-immutable">immutable</i>.</p>
 
   <p><strong>Constraint validation:</strong> If the <code
   title="attr-input-readonly">readonly</code> attribute is specified
   on an <code>input</code> element, the element is <span>barred from
   constraint validation</span>.</p>

|