[html5] r2798 - [] (0) Support <form autocomplete>

whatwg at whatwg.org whatwg at whatwg.org
Wed Feb 11 18:48:28 PST 2009


Author: ianh
Date: 2009-02-11 18:48:27 -0800 (Wed, 11 Feb 2009)
New Revision: 2798

Modified:
   index
   source
Log:
[] (0) Support <form autocomplete>

Modified: index
===================================================================
--- index	2009-02-12 01:58:09 UTC (rev 2797)
+++ index	2009-02-12 02:48:27 UTC (rev 2798)
@@ -24275,6 +24275,7 @@
    <dd><a href=#global-attributes>Global attributes</a></dd>
    <dd><code title=attr-form-accept-charset><a href=#attr-form-accept-charset>accept-charset</a></code></dd>
    <dd><code title=attr-fs-action><a href=#attr-fs-action>action</a></code></dd>
+   <dd><code title=attr-form-autocomplete><a href=#attr-form-autocomplete>autocomplete</a></code></dd>
    <dd><code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code></dd>
    <dd><code title=attr-fs-method><a href=#attr-fs-method>method</a></code></dd>
    <dd><code title=attr-form-name><a href=#attr-form-name>name</a></code></dd>
@@ -24286,6 +24287,7 @@
 interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
            attribute DOMString <a href=#dom-form-acceptcharset title=dom-form-acceptCharset>acceptCharset</a>;
            attribute DOMString <a href=#dom-fs-action title=dom-fs-action>action</a>;
+           attribute boolean <a href=#dom-form-autocomplete title=dom-form-autocomplete>autocomplete</a>;
            attribute DOMString <a href=#dom-fs-enctype title=dom-fs-enctype>enctype</a>;
            attribute DOMString <a href=#dom-fs-method title=dom-fs-method>method</a>;
            attribute DOMString <a href=#dom-form-name title=dom-form-name>name</a>;
@@ -24322,14 +24324,31 @@
   empty string, and the value must be unique amongst the
   <code><a href=#the-form-element>form</a></code> elements in the <code title=dom-forms>forms</code> collection that it is in, if any.</p>
 
+  <p>The <dfn id=attr-form-autocomplete title=attr-form-autocomplete><code>autocomplete</code></dfn>
+  attribute is an <a href=#enumerated-attribute>enumerated attribute</a>. The attribute has
+  two states. The <code title=attr-form-autocomplete-on>on</code>
+  keyword maps to the <dfn id=attr-form-autocomplete-on-state title=attr-form-autocomplete-on-state>on</dfn> state, and the
+  <code title=attr-form-autocomplete-off>off</code> keyword maps to
+  the <dfn id=attr-form-autocomplete-off-state title=attr-form-autocomplete-off-state>off</dfn>
+  state. The attribute may also be omitted. The <i>missing value
+  default</i> is the <a href=#attr-form-autocomplete-on-state title=attr-form-autocomplete-on-state>on</a> state. The <a href=#attr-form-autocomplete-off-state title=attr-form-autocomplete-off-state>off</a> state indicates
+  that by default, <code><a href=#the-input-element>input</a></code> elements in the form will have
+  their <a href=#resulting-autocompletion-state>resulting autocompletion state</a> set to <i title="">off</i>; the <a href=#attr-form-autocomplete-on-state title=attr-form-autocomplete-on-state>on</a> state indicates
+  that by default, <code><a href=#the-input-element>input</a></code> elements in the form will have
+  their <a href=#resulting-autocompletion-state>resulting autocompletion state</a> set to <i title="">on</i>.</p>
+
   <p>The <code title=attr-fs-action><a href=#attr-fs-action>action</a></code>, <code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code>, <code title=attr-fs-method><a href=#attr-fs-method>method</a></code>, <code title=attr-fs-novalidate><a href=#attr-fs-novalidate>novalidate</a></code>, and <code title=attr-fs-target><a href=#attr-fs-target>target</a></code> attributes are <a href=#form-submission>attributes
   for form submission</a>.</p>
 
-  <p>The <dfn id=dom-form-acceptcharset title=dom-form-acceptCharset><code>acceptCharset</code></dfn>
-  and <dfn id=dom-form-name title=dom-form-name><code>name</code></dfn> DOM
-  attributes must <a href=#reflect>reflect</a> the respective content
-  attributes of the same name.</p>
+  <p>The <dfn id=dom-form-autocomplete title=dom-form-autocomplete><code>autocomplete</code></dfn> and
+  <dfn id=dom-form-name title=dom-form-name><code>name</code></dfn> DOM attributes
+  must <a href=#reflect>reflect</a> the respective content attributes of the
+  same name.</p>
 
+  <p>The <dfn id=dom-form-acceptcharset title=dom-form-acceptCharset><code>acceptCharset</code></dfn> DOM
+  attribute must <a href=#reflect>reflect</a> the <code title=attr-form-accept-charset><a href=#attr-form-accept-charset>accept-charset</a></code> content
+  attribute.</p>
+
   <p>The <dfn id=dom-form-elements title=dom-form-elements><code>elements</code></dfn>
   DOM attribute must return an <code><a href=#htmlformcontrolscollection-0>HTMLFormControlsCollection</a></code>
   rooted at the <code>Document</code> node, whose filter matches <a href=#category-listed title=category-listed>listed</a> elements whose <a href=#form-owner>form
@@ -27931,18 +27950,15 @@
 
   <h6 id=the-autocomplete-attribute><span class=secno>4.10.4.2.1 </span>The <code title=attr-input-autocomplete><a href=#attr-input-autocomplete>autocomplete</a></code> attribute</h6>
 
-  <!-- IE also applies it to <form> elements, but only 0.09% of pages
-  use it there, so we don't support that. (It doesn't apply it to
-  <textarea>, so we don't support it there either.) -->
- 
   <p>The <dfn id=attr-input-autocomplete title=attr-input-autocomplete><code>autocomplete</code></dfn>
   attribute is an <a href=#enumerated-attribute>enumerated attribute</a>. The attribute has
-  two states. The <code title=attr-input-autocomplete-on>on</code>
+  three states. The <code title=attr-input-autocomplete-on>on</code>
   keyword maps to the <dfn id=attr-input-autocomplete-on-state title=attr-input-autocomplete-on-state>on</dfn> state, and the
   <code title=attr-input-autocomplete-off>off</code> keyword maps to
   the <dfn id=attr-input-autocomplete-off-state title=attr-input-autocomplete-off-state>off</dfn>
   state. The attribute may also be omitted. The <i>missing value
-  default</i> is the <a href=#attr-input-autocomplete-on-state title=attr-input-autocomplete-on-state>on</a> state.</p>
+  default</i> is the <dfn id=attr-input-autocomplete-default-state title=attr-input-autocomplete-default-state>default</dfn>
+  state.</p>
 
   <p>The <a href=#attr-input-autocomplete-off-state title=attr-input-autocomplete-off-state>off</a>
   state indicates that the control's input data is either particularly
@@ -27957,14 +27973,33 @@
   to be able to rely on his user agent to remember values he has
   entered for that control.</p>
 
+  <p>The <a href=#attr-input-autocomplete-default-state title=attr-input-autocomplete-default-state>default</a> state
+  indicates that the user agent is to use the <code title=attr-form-autocomplete><a href=#attr-form-autocomplete>autocomplete</a></code> attribute on the
+  element's <a href=#form-owner>form owner</a> instead.</p>
+
+  <p>Each <code><a href=#the-input-element>input</a></code> element has a <dfn id=resulting-autocompletion-state>resulting
+  autocompletion state</dfn>, which is either <i title="">on</i> or <i title="">off</i>.</p>
+
   <p>When an <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-autocomplete><a href=#attr-input-autocomplete>autocomplete</a></code> attribute is in
   the <a href=#attr-input-autocomplete-on-state title=attr-input-autocomplete-on-state>on</a> 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
+  when an <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-autocomplete><a href=#attr-input-autocomplete>autocomplete</a></code> attribute is in
+  the <a href=#attr-input-autocomplete-default-state title=attr-input-autocomplete-default-state>default</a> state,
+  and the element has no <a href=#form-owner>form owner</a>, and when an
   <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-autocomplete><a href=#attr-input-autocomplete>autocomplete</a></code> attribute is in
-  the <a href=#attr-input-autocomplete-off-state title=attr-input-autocomplete-off-state>off</a>
-  state, the user agent should not remember the control's <a href=#concept-fe-value title=concept-fe-value>value</a>.</p>
+  the <a href=#attr-input-autocomplete-default-state title=attr-input-autocomplete-default-state>default</a> state,
+  and the element's <a href=#form-owner>form owner</a>'s <code title=attr-form-autocomplete><a href=#attr-form-autocomplete>autocomplete</a></code> attribute is in
+  the <a href=#attr-form-autocomplete-on-state title=attr-form-autocomplete-on-state>on</a> state,
+  the <code><a href=#the-input-element>input</a></code> element's <a href=#resulting-autocompletion-state>resulting autocompletion
+  state</a> is <i title="">on</i>. Otherwise, the
+  <code><a href=#the-input-element>input</a></code> element's <a href=#resulting-autocompletion-state>resulting autocompletion
+  state</a> is <i title="">off</i>.</p>
 
+  <p>When an <code><a href=#the-input-element>input</a></code> element's <a href=#resulting-autocompletion-state>resulting
+  autocompletion state</a> is <i title="">on</i>, 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. Otherwise, the user agent
+  should not remember the control's <a href=#concept-fe-value title=concept-fe-value>value</a>.</p>
+
   <p>The autocompletion mechanism must be implemented by the user
   agent acting as if the user had modified the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, and must be done at a time
   where the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>
@@ -27982,15 +28017,12 @@
 
   </div>
 
-  <p>A user agent may allow the user to disable support for this
-  attribute's <a href=#attr-input-autocomplete-off-state title=attr-input-autocomplete-off-state>off</a> state (causing
-  the attribute to always be in the <a href=#attr-input-autocomplete-on-state title=attr-input-autocomplete-on-state>on</a> state and always
-  allowing values to be remembered and prefilled). Support for the
-  <a href=#attr-input-autocomplete-off-state title=attr-input-autocomplete-off-state>off</a> 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>
+  <p>A user agent may allow the user to override the <a href=#resulting-autocompletion-state>resulting
+  autocompletion state</a> and set it to always <i title="">on</i>,
+  always allowing values to be remembered and prefilled), or always <i title="">off</i>, never remembering values. However, the ability to
+  override the <a href=#resulting-autocompletion-state>resulting autocompletion state</a> to <i title="">on</i> should not be trivially accessible, as there are
+  significant security implications for the user if all values are
+  always remembered, regardless of the site's preferences.</p>
 
 
 

Modified: source
===================================================================
--- source	2009-02-12 01:58:09 UTC (rev 2797)
+++ source	2009-02-12 02:48:27 UTC (rev 2798)
@@ -26935,6 +26935,7 @@
    <dd><span>Global attributes</span></dd>
    <dd><code title="attr-form-accept-charset">accept-charset</code></dd>
    <dd><code title="attr-fs-action">action</code></dd>
+   <dd><code title="attr-form-autocomplete">autocomplete</code></dd>
    <dd><code title="attr-fs-enctype">enctype</code></dd>
    <dd><code title="attr-fs-method">method</code></dd>
    <dd><code title="attr-form-name">name</code></dd>
@@ -26946,6 +26947,7 @@
 interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
            attribute DOMString <span title="dom-form-acceptCharset">acceptCharset</span>;
            attribute DOMString <span title="dom-fs-action">action</span>;
+           attribute boolean <span title="dom-form-autocomplete">autocomplete</span>;
            attribute DOMString <span title="dom-fs-enctype">enctype</span>;
            attribute DOMString <span title="dom-fs-method">method</span>;
            attribute DOMString <span title="dom-form-name">name</span>;
@@ -26987,6 +26989,26 @@
   <code>form</code> elements in the <code
   title="dom-forms">forms</code> collection that it is in, if any.</p>
 
+  <p>The <dfn
+  title="attr-form-autocomplete"><code>autocomplete</code></dfn>
+  attribute is an <span>enumerated attribute</span>. The attribute has
+  two states. The <code title="attr-form-autocomplete-on">on</code>
+  keyword maps to the <dfn
+  title="attr-form-autocomplete-on-state">on</dfn> state, and the
+  <code title="attr-form-autocomplete-off">off</code> keyword maps to
+  the <dfn title="attr-form-autocomplete-off-state">off</dfn>
+  state. The attribute may also be omitted. The <i>missing value
+  default</i> is the <span
+  title="attr-form-autocomplete-on-state">on</span> state. The <span
+  title="attr-form-autocomplete-off-state">off</span> state indicates
+  that by default, <code>input</code> elements in the form will have
+  their <span>resulting autocompletion state</span> set to <i
+  title="">off</i>; the <span
+  title="attr-form-autocomplete-on-state">on</span> state indicates
+  that by default, <code>input</code> elements in the form will have
+  their <span>resulting autocompletion state</span> set to <i
+  title="">on</i>.</p>
+
   <p>The <code title="attr-fs-action">action</code>, <code
   title="attr-fs-enctype">enctype</code>, <code
   title="attr-fs-method">method</code>, <code
@@ -26995,11 +27017,17 @@
   for form submission</span>.</p>
 
   <p>The <dfn
-  title="dom-form-acceptCharset"><code>acceptCharset</code></dfn>
-  and <dfn title="dom-form-name"><code>name</code></dfn> DOM
-  attributes must <span>reflect</span> the respective content
-  attributes of the same name.</p>
+  title="dom-form-autocomplete"><code>autocomplete</code></dfn> and
+  <dfn title="dom-form-name"><code>name</code></dfn> DOM attributes
+  must <span>reflect</span> the respective content attributes of the
+  same name.</p>
 
+  <p>The <dfn
+  title="dom-form-acceptCharset"><code>acceptCharset</code></dfn> DOM
+  attribute must <span>reflect</span> the <code
+  title="attr-form-accept-charset">accept-charset</code> content
+  attribute.</p>
+
   <p>The <dfn title="dom-form-elements"><code>elements</code></dfn>
   DOM attribute must return an <code>HTMLFormControlsCollection</code>
   rooted at the <code>Document</code> node, whose filter matches <span
@@ -31117,21 +31145,18 @@
 
   <h6>The <code title="attr-input-autocomplete">autocomplete</code> attribute</h6>
 
-  <!-- IE also applies it to <form> elements, but only 0.09% of pages
-  use it there, so we don't support that. (It doesn't apply it to
-  <textarea>, so we don't support it there either.) -->
- 
   <p>The <dfn
   title="attr-input-autocomplete"><code>autocomplete</code></dfn>
   attribute is an <span>enumerated attribute</span>. The attribute has
-  two states. The <code title="attr-input-autocomplete-on">on</code>
+  three states. The <code title="attr-input-autocomplete-on">on</code>
   keyword maps to the <dfn
   title="attr-input-autocomplete-on-state">on</dfn> state, and the
   <code title="attr-input-autocomplete-off">off</code> keyword maps to
   the <dfn title="attr-input-autocomplete-off-state">off</dfn>
   state. The attribute may also be omitted. The <i>missing value
-  default</i> is the <span
-  title="attr-input-autocomplete-on-state">on</span> state.</p>
+  default</i> is the <dfn
+  title="attr-input-autocomplete-default-state">default</dfn>
+  state.</p>
 
   <p>The <span title="attr-input-autocomplete-off-state">off</span>
   state indicates that the control's input data is either particularly
@@ -31147,15 +31172,41 @@
   to be able to rely on his user agent to remember values he has
   entered for that control.</p>
 
+  <p>The <span
+  title="attr-input-autocomplete-default-state">default</span> state
+  indicates that the user agent is to use the <code
+  title="attr-form-autocomplete">autocomplete</code> attribute on the
+  element's <span>form owner</span> instead.</p>
+
+  <p>Each <code>input</code> element has a <dfn>resulting
+  autocompletion state</dfn>, which is either <i title="">on</i> or <i
+  title="">off</i>.</p>
+
   <p>When an <code>input</code> element's <code
   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
+  when an <code>input</code> element's <code
+  title="attr-input-autocomplete">autocomplete</code> attribute is in
+  the <span
+  title="attr-input-autocomplete-default-state">default</span> state,
+  and the element has no <span>form owner</span>, and 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 <span
+  the <span
+  title="attr-input-autocomplete-default-state">default</span> state,
+  and the element's <span>form owner</span>'s <code
+  title="attr-form-autocomplete">autocomplete</code> attribute is in
+  the <span title="attr-form-autocomplete-on-state">on</span> state,
+  the <code>input</code> element's <span>resulting autocompletion
+  state</span> is <i title="">on</i>. Otherwise, the
+  <code>input</code> element's <span>resulting autocompletion
+  state</span> is <i title="">off</i>.</p>
+
+  <p>When an <code>input</code> element's <span>resulting
+  autocompletion state</span> is <i title="">on</i>, 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. Otherwise, the user agent
+  should not remember the control's <span
   title="concept-fe-value">value</span>.</p>
 
   <p>The autocompletion mechanism must be implemented by the user
@@ -31176,17 +31227,14 @@
 
   </div>
 
-  <p>A user agent may allow the user to disable support for this
-  attribute's <span
-  title="attr-input-autocomplete-off-state">off</span> state (causing
-  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>
+  <p>A user agent may allow the user to override the <span>resulting
+  autocompletion state</span> and set it to always <i title="">on</i>,
+  always allowing values to be remembered and prefilled), or always <i
+  title="">off</i>, never remembering values. However, the ability to
+  override the <span>resulting autocompletion state</span> to <i
+  title="">on</i> should not be trivially accessible, as there are
+  significant security implications for the user if all values are
+  always remembered, regardless of the site's preferences.</p>
 
 
 




More information about the Commit-Watchers mailing list