[html5] r5376 - [giow] (2) Define what happens when the type= of an <input> changes.

whatwg at whatwg.org whatwg at whatwg.org
Fri Aug 27 14:50:52 PDT 2010


Author: ianh
Date: 2010-08-27 14:50:50 -0700 (Fri, 27 Aug 2010)
New Revision: 5376

Modified:
   complete.html
   index
   source
Log:
[giow] (2) Define what happens when the type= of an <input> changes.

Modified: complete.html
===================================================================
--- complete.html	2010-08-27 21:10:02 UTC (rev 5375)
+++ complete.html	2010-08-27 21:50:50 UTC (rev 5376)
@@ -38559,12 +38559,8 @@
 
   </table><div class=impl>
 
-  <p>When an <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute changes state, and
-  when the element is first created, the element's rendering and
-  behavior must change to the new state's accordingly and the
-  <dfn id=value-sanitization-algorithm>value sanitization algorithm</dfn>, if one is defined for the
-  <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute's new state,
-  must be invoked.</p>
+  <p>Some states of the <code title=attr-input-type><a href=#attr-input-type>type</a></code>
+  attribute define a <dfn id=value-sanitization-algorithm>value sanitization algorithm</dfn>.</p>
 
   <p>Each <code><a href=#the-input-element>input</a></code> element has a <a href=#concept-fe-value title=concept-fe-value>value</a>, which is exposed by the <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute. Some states
   define an <dfn id=concept-input-value-string-number title=concept-input-value-string-number>algorithm
@@ -38592,7 +38588,7 @@
   content attribute gives the default <a href=#concept-fe-value title=concept-fe-value>value</a> of the <code><a href=#the-input-element>input</a></code>
   element. <span class=impl>When the <code title=attr-input-value><a href=#attr-input-value>value</a></code> content attribute is added,
   set, or removed, if the control's <a href=#concept-input-value-dirty-flag title=concept-input-value-dirty-flag>dirty value flag</a> is
-  true, the user agent must set the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element to the value of
+  false, the user agent must set the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element to the value of
   the <code title=attr-input-value><a href=#attr-input-value>value</a></code> content attribute,
   if there is one, or the empty string otherwise, and then run the
   current <a href=#value-sanitization-algorithm>value sanitization algorithm</a>, if one is
@@ -38658,9 +38654,44 @@
   <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a>, and <a href=#concept-input-checked-dirty-flag title=concept-input-checked-dirty-flag>dirty checkedness
   flag</a> must be propagated to the clone when it is created.</p>
 
+  <hr><p>When an <code><a href=#the-input-element>input</a></code> element is first created, the
+  element's rendering and behavior must be set to the rendering and
+  behavior defined for the <code title=attr-input-type><a href=#attr-input-type>type</a></code>
+  attribute's state, and the <a href=#value-sanitization-algorithm>value sanitization
+  algorithm</a>, if one is defined for the <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute's state, must be
+  invoked.</p>
+
   </div>
 
-  <p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to
+  <div class=impl id=input-type-change>
+
+  <p>When an <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute changes state, the
+  user agent must run the following steps:</p>
+
+  <ol><!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/602 --><li><p>If the previous state of the element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute put the <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute in the <i title=dom-input-value-value><a href=#dom-input-value-value>value</a></i> mode, and the element's
+   <a href=#concept-fe-value title=concept-fe-value>value</a> is not the empty
+   string, and the new state of the element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute puts the <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute in either the <i title=dom-input-value-default><a href=#dom-input-value-default>default</a></i> mode or the <i title=dom-input-value-default-on><a href=#dom-input-value-default-on>default/on</a></i> mode, then set
+   the element's <code title=attr-input-value><a href=#attr-input-value>value</a></code> content
+   attribute to the element's <a href=#concept-fe-value title=concept-fe-value>value</a>.</li>
+
+   <li><p>Otherwise, if the previous state of the element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute put the <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute in any mode
+   other than the <i title=dom-input-value-value><a href=#dom-input-value-value>value</a></i> mode, and
+   the new state of the element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute puts the <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute in the <i title=dom-input-value-value><a href=#dom-input-value-value>value</a></i> mode, then set the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element to the value
+   of the <code title=attr-input-value><a href=#attr-input-value>value</a></code> content
+   attribute, if there is one, or the empty string otherwise, and
+   then set the control's <a href=#concept-input-value-dirty-flag title=concept-input-value-dirty-flag>dirty value flag</a> to
+   false.</li>
+
+   <li><p>Update the element's rendering and behavior to the new
+   state's.</li>
+
+   <li><p>Invoke the <a href=#value-sanitization-algorithm>value sanitization algorithm</a>, if one
+   is defined for the <code title=attr-input-type><a href=#attr-input-type>type</a></code>
+   attribute's new state.</li>
+
+  </ol></div>
+
+  <hr><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-input-element>input</a></code> element with its
   <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. The <code title=attr-fe-disabled><a href=#attr-fe-disabled>disabled</a></code> attribute is used to make

Modified: index
===================================================================
--- index	2010-08-27 21:10:02 UTC (rev 5375)
+++ index	2010-08-27 21:50:50 UTC (rev 5376)
@@ -38484,12 +38484,8 @@
 
   </table><div class=impl>
 
-  <p>When an <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute changes state, and
-  when the element is first created, the element's rendering and
-  behavior must change to the new state's accordingly and the
-  <dfn id=value-sanitization-algorithm>value sanitization algorithm</dfn>, if one is defined for the
-  <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute's new state,
-  must be invoked.</p>
+  <p>Some states of the <code title=attr-input-type><a href=#attr-input-type>type</a></code>
+  attribute define a <dfn id=value-sanitization-algorithm>value sanitization algorithm</dfn>.</p>
 
   <p>Each <code><a href=#the-input-element>input</a></code> element has a <a href=#concept-fe-value title=concept-fe-value>value</a>, which is exposed by the <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute. Some states
   define an <dfn id=concept-input-value-string-number title=concept-input-value-string-number>algorithm
@@ -38517,7 +38513,7 @@
   content attribute gives the default <a href=#concept-fe-value title=concept-fe-value>value</a> of the <code><a href=#the-input-element>input</a></code>
   element. <span class=impl>When the <code title=attr-input-value><a href=#attr-input-value>value</a></code> content attribute is added,
   set, or removed, if the control's <a href=#concept-input-value-dirty-flag title=concept-input-value-dirty-flag>dirty value flag</a> is
-  true, the user agent must set the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element to the value of
+  false, the user agent must set the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element to the value of
   the <code title=attr-input-value><a href=#attr-input-value>value</a></code> content attribute,
   if there is one, or the empty string otherwise, and then run the
   current <a href=#value-sanitization-algorithm>value sanitization algorithm</a>, if one is
@@ -38583,9 +38579,44 @@
   <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a>, and <a href=#concept-input-checked-dirty-flag title=concept-input-checked-dirty-flag>dirty checkedness
   flag</a> must be propagated to the clone when it is created.</p>
 
+  <hr><p>When an <code><a href=#the-input-element>input</a></code> element is first created, the
+  element's rendering and behavior must be set to the rendering and
+  behavior defined for the <code title=attr-input-type><a href=#attr-input-type>type</a></code>
+  attribute's state, and the <a href=#value-sanitization-algorithm>value sanitization
+  algorithm</a>, if one is defined for the <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute's state, must be
+  invoked.</p>
+
   </div>
 
-  <p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to
+  <div class=impl id=input-type-change>
+
+  <p>When an <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute changes state, the
+  user agent must run the following steps:</p>
+
+  <ol><!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/602 --><li><p>If the previous state of the element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute put the <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute in the <i title=dom-input-value-value><a href=#dom-input-value-value>value</a></i> mode, and the element's
+   <a href=#concept-fe-value title=concept-fe-value>value</a> is not the empty
+   string, and the new state of the element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute puts the <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute in either the <i title=dom-input-value-default><a href=#dom-input-value-default>default</a></i> mode or the <i title=dom-input-value-default-on><a href=#dom-input-value-default-on>default/on</a></i> mode, then set
+   the element's <code title=attr-input-value><a href=#attr-input-value>value</a></code> content
+   attribute to the element's <a href=#concept-fe-value title=concept-fe-value>value</a>.</li>
+
+   <li><p>Otherwise, if the previous state of the element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute put the <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute in any mode
+   other than the <i title=dom-input-value-value><a href=#dom-input-value-value>value</a></i> mode, and
+   the new state of the element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute puts the <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute in the <i title=dom-input-value-value><a href=#dom-input-value-value>value</a></i> mode, then set the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element to the value
+   of the <code title=attr-input-value><a href=#attr-input-value>value</a></code> content
+   attribute, if there is one, or the empty string otherwise, and
+   then set the control's <a href=#concept-input-value-dirty-flag title=concept-input-value-dirty-flag>dirty value flag</a> to
+   false.</li>
+
+   <li><p>Update the element's rendering and behavior to the new
+   state's.</li>
+
+   <li><p>Invoke the <a href=#value-sanitization-algorithm>value sanitization algorithm</a>, if one
+   is defined for the <code title=attr-input-type><a href=#attr-input-type>type</a></code>
+   attribute's new state.</li>
+
+  </ol></div>
+
+  <hr><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-input-element>input</a></code> element with its
   <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. The <code title=attr-fe-disabled><a href=#attr-fe-disabled>disabled</a></code> attribute is used to make

Modified: source
===================================================================
--- source	2010-08-27 21:10:02 UTC (rev 5375)
+++ source	2010-08-27 21:50:50 UTC (rev 5376)
@@ -42862,13 +42862,8 @@
 
   <div class="impl">
 
-  <p>When an <code>input</code> element's <code
-  title="attr-input-type">type</code> attribute changes state, and
-  when the element is first created, the element's rendering and
-  behavior must change to the new state's accordingly and the
-  <dfn>value sanitization algorithm</dfn>, if one is defined for the
-  <code title="attr-input-type">type</code> attribute's new state,
-  must be invoked.</p>
+  <p>Some states of the <code title="attr-input-type">type</code>
+  attribute define a <dfn>value sanitization algorithm</dfn>.</p>
 
   <p>Each <code>input</code> element has a <span
   title="concept-fe-value">value</span>, which is exposed by the <code
@@ -42905,7 +42900,7 @@
   title="attr-input-value">value</code> content attribute is added,
   set, or removed, if the control's <span
   title="concept-input-value-dirty-flag">dirty value flag</span> is
-  true, the user agent must set the <span
+  false, the user agent must 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,
   if there is one, or the empty string otherwise, and then run the
@@ -42999,8 +42994,70 @@
   title="concept-input-checked-dirty-flag">dirty checkedness
   flag</span> must be propagated to the clone when it is created.</p>
 
+  <hr>
+
+  <p>When an <code>input</code> element is first created, the
+  element's rendering and behavior must be set to the rendering and
+  behavior defined for the <code title="attr-input-type">type</code>
+  attribute's state, and the <span>value sanitization
+  algorithm</span>, if one is defined for the <code
+  title="attr-input-type">type</code> attribute's state, must be
+  invoked.</p>
+
   </div>
 
+  <div id="input-type-change" class="impl">
+
+  <p>When an <code>input</code> element's <code
+  title="attr-input-type">type</code> attribute changes state, the
+  user agent must run the following steps:</p>
+
+  <ol>
+
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/602 -->
+
+   <li><p>If the previous state of the element's <code
+   title="attr-input-type">type</code> attribute put the <code
+   title="dom-input-value">value</code> IDL attribute in the <i
+   title="dom-input-value-value">value</i> mode, and the element's
+   <span title="concept-fe-value">value</span> is not the empty
+   string, and the new state of the element's <code
+   title="attr-input-type">type</code> attribute puts the <code
+   title="dom-input-value">value</code> IDL attribute in either the <i
+   title="dom-input-value-default">default</i> mode or the <i
+   title="dom-input-value-default-on">default/on</i> mode, then set
+   the element's <code title="attr-input-value">value</code> content
+   attribute to the element's <span
+   title="concept-fe-value">value</span>.</p></li>
+
+   <li><p>Otherwise, if the previous state of the element's <code
+   title="attr-input-type">type</code> attribute put the <code
+   title="dom-input-value">value</code> IDL attribute in any mode
+   other than the <i title="dom-input-value-value">value</i> mode, and
+   the new state of the element's <code
+   title="attr-input-type">type</code> attribute puts the <code
+   title="dom-input-value">value</code> IDL attribute in the <i
+   title="dom-input-value-value">value</i> mode, 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, if there is one, or the empty string otherwise, and
+   then set the control's <span
+   title="concept-input-value-dirty-flag">dirty value flag</span> to
+   false.</p></li>
+
+   <li><p>Update the element's rendering and behavior to the new
+   state's.</p></li>
+
+   <li><p>Invoke the <span>value sanitization algorithm</span>, if one
+   is defined for the <code title="attr-input-type">type</code>
+   attribute's new state.</p></li>
+
+  </ol>
+
+  </div>
+
+  <hr>
+
   <p>The <code title="attr-fae-form">form</code> attribute is used to
   explicitly associate the <code>input</code> element with its
   <span>form owner</span>. The <code title="attr-fe-name">name</code>




More information about the Commit-Watchers mailing list