[html5] r7986 - [giow] (3) Be even more explicit about the supported property names of a <form>. [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Jun 18 15:15:22 PDT 2013


Author: ianh
Date: 2013-06-18 15:15:20 -0700 (Tue, 18 Jun 2013)
New Revision: 7986

Modified:
   complete.html
   index
   source
Log:
[giow] (3) Be even more explicit about the supported property names of a <form>.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=22159
Affected topics: DOM APIs

Modified: complete.html
===================================================================
--- complete.html	2013-06-18 19:47:29 UTC (rev 7985)
+++ complete.html	2013-06-18 22:15:20 UTC (rev 7986)
@@ -44457,25 +44457,69 @@
   <hr><!-- Welcome to crazy town. Population: The Web. --><p>Each <code><a href=#the-form-element>form</a></code> element has a mapping of names to elements called the <dfn id=past-names-map>past names
   map</dfn>. It is used to persist names of controls even when they change names.</p>
 
-  <p>The <a href=#supported-property-names>supported property names</a> consist of:</p>
+  <p>The <a href=#supported-property-names>supported property names</a> consist of the names obtained from the following
+  algorithm, in the order obtained from this algorithm:</p>
 
-  <ul><li>The values of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> and <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attributes of all the <a href=#category-listed title=category-listed>listed
-   elements</a> whose <a href=#form-owner>form owner</a> is the <code><a href=#the-form-element>form</a></code> element, with the
-   exception of <code><a href=#the-input-element>input</a></code> elements whose <code title=attr-input-type><a href=#attr-input-type>type</a></code>
-   attribute is in the <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image Button</a> state, and</li>
+  <ol><li><p>Let <var title="">sourced names</var> be an initially empty ordered list of tuples
+   consisting of a string, an element, a source, where the source is either <i>id</i>, <i>name</i>,
+   or <i>past</i>, and, if the source is <i>past</i>, an age.</li>
 
-   <li>The values of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> and <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attributes of all the <code><a href=#the-img-element>img</a></code> elements that are
-   descendants of the <code><a href=#the-form-element>form</a></code> element, and</li>
+   <li>
 
-   <li>All the names currently in the <a href=#past-names-map>past names map</a>.</li>
+    <p>For each <a href=#category-listed title=category-listed>listed element</a> <var title="">candidate</var>
+    whose <a href=#form-owner>form owner</a> is the <code><a href=#the-form-element>form</a></code> element, with the exception of any
+    <code><a href=#the-input-element>input</a></code> elements whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the
+    <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image Button</a> state, run these substeps:</p>
 
-  </ul><p>The values must be listed in <a href=#tree-order>tree order</a>, with <code title=attr-id><a href=#the-id-attribute>id</a></code>
-  attributes preceding <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attributes preceding entries from the
-  <a href=#past-names-map>past names map</a> when the same element has more than one, and with multiple entries in
-  the <a href=#past-names-map>past names map</a> for the same element being ordered chronologically by when they
-  were added to the map, and in all cases ignoring later duplicates.</p>
+    <ol><li><p>If <var title="">candidate</var> has an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute, add
+     an entry to <var title="">sourced names</var> with that <code title=attr-id><a href=#the-id-attribute>id</a></code>
+     attribute's value as the string, <var title="">candidate</var> as the element, and <i>id</i> as
+     the source.</li>
 
-  <p>When a <code><a href=#the-form-element>form</a></code> element is <dfn id=dom-form-nameditem title=dom-form-namedItem>indexed for named property
+     <li><p>If <var title="">candidate</var> has a <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute,
+     add an entry to <var title="">sourced names</var> with that <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute's value as the string, <var title="">candidate</var>
+     as the element, and <i>name</i> as the source.</li>
+
+    </ol></li>
+
+   <li>
+
+    <p>For each <code><a href=#the-img-element>img</a></code> element <var title="">candidate</var> that is a descendant of the
+    <code><a href=#the-form-element>form</a></code> element, run these substeps:</p>
+
+    <ol><li><p>If <var title="">candidate</var> has an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute, add
+     an entry to <var title="">sourced names</var> with that <code title=attr-id><a href=#the-id-attribute>id</a></code>
+     attribute's value as the string, <var title="">candidate</var> as the element, and <i>id</i> as
+     the source.</li>
+
+     <li><p>If <var title="">candidate</var> has a <code title=attr-img-name><a href=#attr-img-name>name</a></code> attribute,
+     add an entry to <var title="">sourced names</var> with that <code title=attr-img-name><a href=#attr-img-name>name</a></code> attribute's value as the string, <var title="">candidate</var>
+     as the element, and <i>name</i> as the source.</li>
+
+    </ol></li>
+
+   <li>
+
+    <p>For each entry <var title="">past entry</var> in the <a href=#past-names-map>past names map</a> add an entry
+    to <var title="">sourced names</var> with the <var title="">past entry</var>'s name as the
+    string, <var title="">past entry</var>'s element as the element, <i>past</i> as the source, and
+    the length of time <var title="">past entry</var> has been in the <a href=#past-names-map>past names map</a> as
+    the age.</p>
+
+   </li>
+
+   <li><p>Sort <var title="">sourced names</var> by <a href=#tree-order>tree order</a> of the element entry of
+   each tuple, sorting entries with the same element by putting entries whose source is <i>id</i>
+   first, then entries whose source is <i>name</i>, and finally entries whose source is <i>past</i>,
+   and sorting entries with the same element and source by their age, oldest first.</li>
+
+   <li><p>Remove any entries in <var title="">sourced names</var> that have the same name as an
+   earlier entry in the map.</li>
+
+   <li><p>Return the list of names from <var title="">sourced names</var>, maintaining their
+   relative order.</li>
+
+  </ol><p>When a <code><a href=#the-form-element>form</a></code> element is <dfn id=dom-form-nameditem title=dom-form-namedItem>indexed for named property
   retrieval</dfn>, the user agent must run the following steps:</p>
 
   <ol><li><p>Let <var title="">candidates</var> be a <a href=#live>live</a> <code><a href=#radionodelist>RadioNodeList</a></code>

Modified: index
===================================================================
--- index	2013-06-18 19:47:29 UTC (rev 7985)
+++ index	2013-06-18 22:15:20 UTC (rev 7986)
@@ -44457,25 +44457,69 @@
   <hr><!-- Welcome to crazy town. Population: The Web. --><p>Each <code><a href=#the-form-element>form</a></code> element has a mapping of names to elements called the <dfn id=past-names-map>past names
   map</dfn>. It is used to persist names of controls even when they change names.</p>
 
-  <p>The <a href=#supported-property-names>supported property names</a> consist of:</p>
+  <p>The <a href=#supported-property-names>supported property names</a> consist of the names obtained from the following
+  algorithm, in the order obtained from this algorithm:</p>
 
-  <ul><li>The values of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> and <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attributes of all the <a href=#category-listed title=category-listed>listed
-   elements</a> whose <a href=#form-owner>form owner</a> is the <code><a href=#the-form-element>form</a></code> element, with the
-   exception of <code><a href=#the-input-element>input</a></code> elements whose <code title=attr-input-type><a href=#attr-input-type>type</a></code>
-   attribute is in the <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image Button</a> state, and</li>
+  <ol><li><p>Let <var title="">sourced names</var> be an initially empty ordered list of tuples
+   consisting of a string, an element, a source, where the source is either <i>id</i>, <i>name</i>,
+   or <i>past</i>, and, if the source is <i>past</i>, an age.</li>
 
-   <li>The values of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> and <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attributes of all the <code><a href=#the-img-element>img</a></code> elements that are
-   descendants of the <code><a href=#the-form-element>form</a></code> element, and</li>
+   <li>
 
-   <li>All the names currently in the <a href=#past-names-map>past names map</a>.</li>
+    <p>For each <a href=#category-listed title=category-listed>listed element</a> <var title="">candidate</var>
+    whose <a href=#form-owner>form owner</a> is the <code><a href=#the-form-element>form</a></code> element, with the exception of any
+    <code><a href=#the-input-element>input</a></code> elements whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the
+    <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image Button</a> state, run these substeps:</p>
 
-  </ul><p>The values must be listed in <a href=#tree-order>tree order</a>, with <code title=attr-id><a href=#the-id-attribute>id</a></code>
-  attributes preceding <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attributes preceding entries from the
-  <a href=#past-names-map>past names map</a> when the same element has more than one, and with multiple entries in
-  the <a href=#past-names-map>past names map</a> for the same element being ordered chronologically by when they
-  were added to the map, and in all cases ignoring later duplicates.</p>
+    <ol><li><p>If <var title="">candidate</var> has an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute, add
+     an entry to <var title="">sourced names</var> with that <code title=attr-id><a href=#the-id-attribute>id</a></code>
+     attribute's value as the string, <var title="">candidate</var> as the element, and <i>id</i> as
+     the source.</li>
 
-  <p>When a <code><a href=#the-form-element>form</a></code> element is <dfn id=dom-form-nameditem title=dom-form-namedItem>indexed for named property
+     <li><p>If <var title="">candidate</var> has a <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute,
+     add an entry to <var title="">sourced names</var> with that <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute's value as the string, <var title="">candidate</var>
+     as the element, and <i>name</i> as the source.</li>
+
+    </ol></li>
+
+   <li>
+
+    <p>For each <code><a href=#the-img-element>img</a></code> element <var title="">candidate</var> that is a descendant of the
+    <code><a href=#the-form-element>form</a></code> element, run these substeps:</p>
+
+    <ol><li><p>If <var title="">candidate</var> has an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute, add
+     an entry to <var title="">sourced names</var> with that <code title=attr-id><a href=#the-id-attribute>id</a></code>
+     attribute's value as the string, <var title="">candidate</var> as the element, and <i>id</i> as
+     the source.</li>
+
+     <li><p>If <var title="">candidate</var> has a <code title=attr-img-name><a href=#attr-img-name>name</a></code> attribute,
+     add an entry to <var title="">sourced names</var> with that <code title=attr-img-name><a href=#attr-img-name>name</a></code> attribute's value as the string, <var title="">candidate</var>
+     as the element, and <i>name</i> as the source.</li>
+
+    </ol></li>
+
+   <li>
+
+    <p>For each entry <var title="">past entry</var> in the <a href=#past-names-map>past names map</a> add an entry
+    to <var title="">sourced names</var> with the <var title="">past entry</var>'s name as the
+    string, <var title="">past entry</var>'s element as the element, <i>past</i> as the source, and
+    the length of time <var title="">past entry</var> has been in the <a href=#past-names-map>past names map</a> as
+    the age.</p>
+
+   </li>
+
+   <li><p>Sort <var title="">sourced names</var> by <a href=#tree-order>tree order</a> of the element entry of
+   each tuple, sorting entries with the same element by putting entries whose source is <i>id</i>
+   first, then entries whose source is <i>name</i>, and finally entries whose source is <i>past</i>,
+   and sorting entries with the same element and source by their age, oldest first.</li>
+
+   <li><p>Remove any entries in <var title="">sourced names</var> that have the same name as an
+   earlier entry in the map.</li>
+
+   <li><p>Return the list of names from <var title="">sourced names</var>, maintaining their
+   relative order.</li>
+
+  </ol><p>When a <code><a href=#the-form-element>form</a></code> element is <dfn id=dom-form-nameditem title=dom-form-namedItem>indexed for named property
   retrieval</dfn>, the user agent must run the following steps:</p>
 
   <ol><li><p>Let <var title="">candidates</var> be a <a href=#live>live</a> <code><a href=#radionodelist>RadioNodeList</a></code>

Modified: source
===================================================================
--- source	2013-06-18 19:47:29 UTC (rev 7985)
+++ source	2013-06-18 22:15:20 UTC (rev 7986)
@@ -48681,30 +48681,82 @@
   <p>Each <code>form</code> element has a mapping of names to elements called the <dfn>past names
   map</dfn>. It is used to persist names of controls even when they change names.</p>
 
-  <p>The <span>supported property names</span> consist of:</p>
+  <p>The <span>supported property names</span> consist of the names obtained from the following
+  algorithm, in the order obtained from this algorithm:</p>
 
-  <ul>
+  <ol>
 
-   <li>The values of all the <code title="attr-id">id</code> and <code
-   title="attr-fe-name">name</code> attributes of all the <span title="category-listed">listed
-   elements</span> whose <span>form owner</span> is the <code>form</code> element, with the
-   exception of <code>input</code> elements whose <code title="attr-input-type">type</code>
-   attribute is in the <span title="attr-input-type-image">Image Button</span> state, and</li>
+   <li><p>Let <var title="">sourced names</var> be an initially empty ordered list of tuples
+   consisting of a string, an element, a source, where the source is either <i>id</i>, <i>name</i>,
+   or <i>past</i>, and, if the source is <i>past</i>, an age.</p></li>
 
-   <li>The values of all the <code title="attr-id">id</code> and <code
-   title="attr-fe-name">name</code> attributes of all the <code>img</code> elements that are
-   descendants of the <code>form</code> element, and</li>
+   <li>
 
-   <li>All the names currently in the <span>past names map</span>.</li>
+    <p>For each <span title="category-listed">listed element</span> <var title="">candidate</var>
+    whose <span>form owner</span> is the <code>form</code> element, with the exception of any
+    <code>input</code> elements whose <code title="attr-input-type">type</code> attribute is in the
+    <span title="attr-input-type-image">Image Button</span> state, run these substeps:</p>
 
-  </ul>
+    <ol>
 
-  <p>The values must be listed in <span>tree order</span>, with <code title="attr-id">id</code>
-  attributes preceding <code title="attr-fe-name">name</code> attributes preceding entries from the
-  <span>past names map</span> when the same element has more than one, and with multiple entries in
-  the <span>past names map</span> for the same element being ordered chronologically by when they
-  were added to the map, and in all cases ignoring later duplicates.</p>
+     <li><p>If <var title="">candidate</var> has an <code title="attr-id">id</code> attribute, add
+     an entry to <var title="">sourced names</var> with that <code title="attr-id">id</code>
+     attribute's value as the string, <var title="">candidate</var> as the element, and <i>id</i> as
+     the source.</p></li>
 
+     <li><p>If <var title="">candidate</var> has a <code title="attr-fe-name">name</code> attribute,
+     add an entry to <var title="">sourced names</var> with that <code
+     title="attr-fe-name">name</code> attribute's value as the string, <var title="">candidate</var>
+     as the element, and <i>name</i> as the source.</p></li>
+
+    </ol>
+
+   </li>
+
+   <li>
+
+    <p>For each <code>img</code> element <var title="">candidate</var> that is a descendant of the
+    <code>form</code> element, run these substeps:</p>
+
+    <ol>
+
+     <li><p>If <var title="">candidate</var> has an <code title="attr-id">id</code> attribute, add
+     an entry to <var title="">sourced names</var> with that <code title="attr-id">id</code>
+     attribute's value as the string, <var title="">candidate</var> as the element, and <i>id</i> as
+     the source.</p></li>
+
+     <li><p>If <var title="">candidate</var> has a <code title="attr-img-name">name</code> attribute,
+     add an entry to <var title="">sourced names</var> with that <code
+     title="attr-img-name">name</code> attribute's value as the string, <var title="">candidate</var>
+     as the element, and <i>name</i> as the source.</p></li>
+
+    </ol>
+
+   </li>
+
+   <li>
+
+    <p>For each entry <var title="">past entry</var> in the <span>past names map</span> add an entry
+    to <var title="">sourced names</var> with the <var title="">past entry</var>'s name as the
+    string, <var title="">past entry</var>'s element as the element, <i>past</i> as the source, and
+    the length of time <var title="">past entry</var> has been in the <span>past names map</span> as
+    the age.</p>
+
+   </li>
+
+   <li><p>Sort <var title="">sourced names</var> by <span>tree order</span> of the element entry of
+   each tuple, sorting entries with the same element by putting entries whose source is <i>id</i>
+   first, then entries whose source is <i>name</i>, and finally entries whose source is <i>past</i>,
+   and sorting entries with the same element and source by their age, oldest first.</p></li>
+
+   <li><p>Remove any entries in <var title="">sourced names</var> that have the same name as an
+   earlier entry in the map.</p></li>
+
+   <li><p>Return the list of names from <var title="">sourced names</var>, maintaining their
+   relative order.</p></li>
+
+  </ol>
+
   <p>When a <code>form</code> element is <dfn title="dom-form-namedItem">indexed for named property
   retrieval</dfn>, the user agent must run the following steps:</p>
 




More information about the Commit-Watchers mailing list