[html5] r8010 - [giow] (3) Make the empty string no longer be a possible index for most objects [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Jul 2 14:45:40 PDT 2013


Author: ianh
Date: 2013-07-02 14:45:38 -0700 (Tue, 02 Jul 2013)
New Revision: 8010

Modified:
   complete.html
   index
   source
Log:
[giow] (3) Make the empty string no longer be a possible index for most objects that can be indexed by name.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=22291
Affected topics: DOM APIs

Modified: complete.html
===================================================================
--- complete.html	2013-07-02 21:17:17 UTC (rev 8009)
+++ complete.html	2013-07-02 21:45:38 UTC (rev 8010)
@@ -7476,20 +7476,22 @@
   <p>The object's <a href=#supported-property-indices>supported property indices</a> are as defined for
   <code><a href=#htmlcollection>HTMLCollection</a></code> objects.</p>
 
-  <p>The <a href=#supported-property-names>supported property names</a> consist of the values of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> attributes of all the elements <a href=#represented-by-the-collection>represented by the
-  collection</a>, and the values of all the <code title="">name</code> attributes of all the
+  <p>The <a href=#supported-property-names>supported property names</a> consist of the non-empty values of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> attributes of all the elements <a href=#represented-by-the-collection>represented by the
+  collection</a>, and the non-empty values of all the <code title="">name</code> attributes of all the
   <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>, <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>,
   <code><a href=#frame>frame</a></code>, <code><a href=#frameset>frameset</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, and
   <code><a href=#the-object-element>object</a></code> elements <a href=#represented-by-the-collection>represented by the collection</a>, in <a href=#tree-order>tree
   order</a>, ignoring later duplicates, with the <code title=attr-id><a href=#the-id-attribute>id</a></code> of an element
-  preceding its <code title="">name</code> if it has both, they differ from each other, and neither
+  preceding its <code title="">name</code> if it contributes both, they differ from each other, and neither
   is the duplicate of an earlier entry.</p>
 
   <p>The <dfn id=dom-htmlallcollection-item-string title=dom-HTMLAllCollection-item-string><code>item(<var title="">name</var>)</code></dfn> and <dfn id=dom-htmlallcollection-nameditem title=dom-HTMLAllCollection-namedItem><code>namedItem(<var title="">name</var>)</code></dfn>
   methods must act according to the following algorithm:</p>
 
-  <ol><li>
+  <ol><li>If <var title="">name</var> is the empty string, return null and stop the algorithm.</li>
 
+   <li>
+
     <p>Let <var title="">collection</var> be an <code><a href=#htmlcollection>HTMLCollection</a></code> object rooted at the
     same node as the <code><a href=#htmlallcollection>HTMLAllCollection</a></code> object on which the method was invoked, whose
     filter matches only elements that already match the filter of the <code><a href=#htmlallcollection>HTMLAllCollection</a></code>
@@ -7572,14 +7574,16 @@
   <p>The object's <a href=#supported-property-indices>supported property indices</a> are as defined for
   <code><a href=#htmlcollection>HTMLCollection</a></code> objects.</p>
 
-  <p>The <a href=#supported-property-names>supported property names</a> consist of 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
+  <p>The <a href=#supported-property-names>supported property names</a> consist of the non-empty 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
   elements <a href=#represented-by-the-collection>represented by the collection</a>, in <a href=#tree-order>tree order</a>, ignoring later
-  duplicates, with the <code title=attr-id><a href=#the-id-attribute>id</a></code> of an element preceding its <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> if it has both, they differ from each other, and neither is the
+  duplicates, with the <code title=attr-id><a href=#the-id-attribute>id</a></code> of an element preceding its <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> if it contributes both, they differ from each other, and neither is the
   duplicate of an earlier entry.</p>
 
   <p>The <dfn id=dom-htmlformcontrolscollection-nameditem title=dom-HTMLFormControlsCollection-namedItem><code>namedItem(<var title="">name</var>)</code></dfn> method must act according to the following algorithm:</p>
 
-  <ol><li>If, at the time the method is called, there is exactly one node in the collection that has
+  <ol><li>If <var title="">name</var> is the empty string, return null and stop the algorithm.</li>
+
+   <li>If, at the time the method is called, there is exactly one node in the collection that has
    either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code title=attr-fe-name><a href=#attr-fe-name>name</a></code>
    attribute equal to <var title="">name</var>, then return that node and stop the algorithm.</li>
 
@@ -7703,13 +7707,13 @@
   or adds any <code><a href=#the-optgroup-element>optgroup</a></code> elements, and never adds new children to existing
   <code><a href=#the-optgroup-element>optgroup</a></code> elements (though it can remove children from them).</p>
 
-  <p>The <a href=#supported-property-names>supported property names</a> consist of the values of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> and <code title=attr-option-name><a href=#attr-option-name>name</a></code> attributes of all the
+  <p>The <a href=#supported-property-names>supported property names</a> consist of the non-empty values of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> and <code title=attr-option-name><a href=#attr-option-name>name</a></code> attributes of all the
   elements <a href=#represented-by-the-collection>represented by the collection</a>, in <a href=#tree-order>tree order</a>, ignoring later
-  duplicates, with the <code title=attr-id><a href=#the-id-attribute>id</a></code> of an element preceding its <code title=attr-option-name><a href=#attr-option-name>name</a></code> if it has both, they differ from each other, and neither is
+  duplicates, with the <code title=attr-id><a href=#the-id-attribute>id</a></code> of an element preceding its <code title=attr-option-name><a href=#attr-option-name>name</a></code> if it contributes both, they differ from each other, and neither is
   the duplicate of an earlier entry.</p>
 
   <p>The <dfn id=dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem><code>namedItem(<var title="">name</var>)</code></dfn> method must return the first node in the collection that has
-  either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code title=attr-option-name><a href=#attr-option-name>name</a></code> attribute equal to <var title="">name</var>, if there is one;
+  either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code title=attr-option-name><a href=#attr-option-name>name</a></code> attribute equal to <var title="">name</var>, if there is one and if <var title="">name</var> is not the empty string;
   otherwise, it must return null.</p>
 
   <p>When the user agent is to <dfn id=dom-htmloptionscollection-setter title=dom-HTMLOptionsCollection-setter>set the value of a new
@@ -8886,7 +8890,7 @@
 
   <hr><p id=dom-document-namedItem-which>The <code><a href=#document>Document</a></code> interface <a href=#support-named-properties title="support
   named properties">supports named properties</a>. The <a href=#supported-property-names>supported property names</a> at
-  any moment consist of the values of the <code title=attr-name>name</code> content attributes of
+  any moment consist of the values of the <code title="">name</code> content attributes of
   all the
     <code><a href=#the-applet-element>applet</a></code>,
     <a href=#exposed>exposed</a> <code><a href=#the-embed-element>embed</a></code>,
@@ -8894,16 +8898,18 @@
     <code><a href=#the-iframe-element>iframe</a></code>,
     <code><a href=#the-img-element>img</a></code>, and
     <a href=#exposed>exposed</a> <code><a href=#the-object-element>object</a></code>
-  elements in the <code><a href=#document>Document</a></code> that have <code title=attr-name>name</code> content
+  elements in the <code><a href=#document>Document</a></code> that have non-empty <code title="">name</code> content
   attributes, and the values of the <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes of all the
     <code><a href=#the-applet-element>applet</a></code> and
     <a href=#exposed>exposed</a> <code><a href=#the-object-element>object</a></code>
-  elements in the <code><a href=#document>Document</a></code> that have <code title=attr-id><a href=#the-id-attribute>id</a></code> content
+  elements in the <code><a href=#document>Document</a></code> that have non-empty <code title=attr-id><a href=#the-id-attribute>id</a></code> content
   attributes, and the values of the <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes of all the
     <code><a href=#the-img-element>img</a></code>
-  elements in the <code><a href=#document>Document</a></code> that have both <code title=attr-name>name</code> content
-  attributes and <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes. The <a href=#supported-property-names>supported property
-  names</a> must be in <a href=#tree-order>tree order</a>, ignoring later duplicates.</p>
+  elements in the <code><a href=#document>Document</a></code> that have both non-empty <code title=attr-name>name</code> content
+  attributes and non-empty <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes. The <a href=#supported-property-names>supported property
+  names</a> must be in <a href=#tree-order>tree order</a>, ignoring later duplicates, with values from <code title=attr-id><a href=#the-id-attribute>id</a></code>
+  attributes coming before values from <code title="">name</code> attributes when the same element
+  contributes both.</p>
 
   <p>To <a href=#determine-the-value-of-a-named-property>determine the value of a named property</a> <var title="">name</var> when <dfn id=dom-document-nameditem title=dom-document-namedItem>the <code>Document</code> object is indexed for property
   retrieval</dfn>, the user agent must return the value obtained using the following steps:</p>
@@ -8957,7 +8963,7 @@
    <li><code><a href=#the-applet-element>applet</a></code> or <a href=#exposed>exposed</a> <code><a href=#the-object-element>object</a></code> elements that have an <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute whose value is <var title="">name</var>, or</li>
 
    <li><code><a href=#the-img-element>img</a></code> elements that have an <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute
-   whose value is <var title="">name</var>, and that have a <code title=attr-name>name</code>
+   whose value is <var title="">name</var>, and that have a non-empty <code title=attr-name>name</code>
    content attribute present also.</li>
 
   </ul><p>An <code><a href=#the-embed-element>embed</a></code> or <code><a href=#the-object-element>object</a></code> element is said to be <dfn id=exposed>exposed</dfn> if it has
@@ -44771,6 +44777,9 @@
    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 empty string as
+   their name.</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>
 
@@ -65851,10 +65860,10 @@
    <li>the value of the <code title="">name</code> content attribute for all <code><a href=#the-a-element>a</a></code>,
    <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>, <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>,
    <code><a href=#frameset>frameset</a></code>, <code><a href=#the-img-element>img</a></code>, and <code><a href=#the-object-element>object</a></code> elements in the <a href=#active-document>active
-   document</a> that have a <code title="">name</code> content attribute, and</li>
+   document</a> that have a non-empty <code title="">name</code> content attribute, and</li>
 
    <li>the value of the <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute of any <a href=#html-elements title="HTML
-   elements">HTML element</a> in the <a href=#active-document>active document</a> with an <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute.</li>
+   elements">HTML element</a> in the <a href=#active-document>active document</a> with a non-empty <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute.</li>
 
   </ul><p>To <a href=#determine-the-value-of-a-named-property>determine the value of a named property</a> <var title="">name</var> when <dfn id=dom-window-nameditem title=dom-window-namedItem>the <code>Window</code> object is indexed for property
   retrieval</dfn>, the user agent must return the value obtained using the following steps:</p>

Modified: index
===================================================================
--- index	2013-07-02 21:17:17 UTC (rev 8009)
+++ index	2013-07-02 21:45:38 UTC (rev 8010)
@@ -7476,20 +7476,22 @@
   <p>The object's <a href=#supported-property-indices>supported property indices</a> are as defined for
   <code><a href=#htmlcollection>HTMLCollection</a></code> objects.</p>
 
-  <p>The <a href=#supported-property-names>supported property names</a> consist of the values of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> attributes of all the elements <a href=#represented-by-the-collection>represented by the
-  collection</a>, and the values of all the <code title="">name</code> attributes of all the
+  <p>The <a href=#supported-property-names>supported property names</a> consist of the non-empty values of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> attributes of all the elements <a href=#represented-by-the-collection>represented by the
+  collection</a>, and the non-empty values of all the <code title="">name</code> attributes of all the
   <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>, <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>,
   <code><a href=#frame>frame</a></code>, <code><a href=#frameset>frameset</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, and
   <code><a href=#the-object-element>object</a></code> elements <a href=#represented-by-the-collection>represented by the collection</a>, in <a href=#tree-order>tree
   order</a>, ignoring later duplicates, with the <code title=attr-id><a href=#the-id-attribute>id</a></code> of an element
-  preceding its <code title="">name</code> if it has both, they differ from each other, and neither
+  preceding its <code title="">name</code> if it contributes both, they differ from each other, and neither
   is the duplicate of an earlier entry.</p>
 
   <p>The <dfn id=dom-htmlallcollection-item-string title=dom-HTMLAllCollection-item-string><code>item(<var title="">name</var>)</code></dfn> and <dfn id=dom-htmlallcollection-nameditem title=dom-HTMLAllCollection-namedItem><code>namedItem(<var title="">name</var>)</code></dfn>
   methods must act according to the following algorithm:</p>
 
-  <ol><li>
+  <ol><li>If <var title="">name</var> is the empty string, return null and stop the algorithm.</li>
 
+   <li>
+
     <p>Let <var title="">collection</var> be an <code><a href=#htmlcollection>HTMLCollection</a></code> object rooted at the
     same node as the <code><a href=#htmlallcollection>HTMLAllCollection</a></code> object on which the method was invoked, whose
     filter matches only elements that already match the filter of the <code><a href=#htmlallcollection>HTMLAllCollection</a></code>
@@ -7572,14 +7574,16 @@
   <p>The object's <a href=#supported-property-indices>supported property indices</a> are as defined for
   <code><a href=#htmlcollection>HTMLCollection</a></code> objects.</p>
 
-  <p>The <a href=#supported-property-names>supported property names</a> consist of 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
+  <p>The <a href=#supported-property-names>supported property names</a> consist of the non-empty 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
   elements <a href=#represented-by-the-collection>represented by the collection</a>, in <a href=#tree-order>tree order</a>, ignoring later
-  duplicates, with the <code title=attr-id><a href=#the-id-attribute>id</a></code> of an element preceding its <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> if it has both, they differ from each other, and neither is the
+  duplicates, with the <code title=attr-id><a href=#the-id-attribute>id</a></code> of an element preceding its <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> if it contributes both, they differ from each other, and neither is the
   duplicate of an earlier entry.</p>
 
   <p>The <dfn id=dom-htmlformcontrolscollection-nameditem title=dom-HTMLFormControlsCollection-namedItem><code>namedItem(<var title="">name</var>)</code></dfn> method must act according to the following algorithm:</p>
 
-  <ol><li>If, at the time the method is called, there is exactly one node in the collection that has
+  <ol><li>If <var title="">name</var> is the empty string, return null and stop the algorithm.</li>
+
+   <li>If, at the time the method is called, there is exactly one node in the collection that has
    either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code title=attr-fe-name><a href=#attr-fe-name>name</a></code>
    attribute equal to <var title="">name</var>, then return that node and stop the algorithm.</li>
 
@@ -7703,13 +7707,13 @@
   or adds any <code><a href=#the-optgroup-element>optgroup</a></code> elements, and never adds new children to existing
   <code><a href=#the-optgroup-element>optgroup</a></code> elements (though it can remove children from them).</p>
 
-  <p>The <a href=#supported-property-names>supported property names</a> consist of the values of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> and <code title=attr-option-name><a href=#attr-option-name>name</a></code> attributes of all the
+  <p>The <a href=#supported-property-names>supported property names</a> consist of the non-empty values of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> and <code title=attr-option-name><a href=#attr-option-name>name</a></code> attributes of all the
   elements <a href=#represented-by-the-collection>represented by the collection</a>, in <a href=#tree-order>tree order</a>, ignoring later
-  duplicates, with the <code title=attr-id><a href=#the-id-attribute>id</a></code> of an element preceding its <code title=attr-option-name><a href=#attr-option-name>name</a></code> if it has both, they differ from each other, and neither is
+  duplicates, with the <code title=attr-id><a href=#the-id-attribute>id</a></code> of an element preceding its <code title=attr-option-name><a href=#attr-option-name>name</a></code> if it contributes both, they differ from each other, and neither is
   the duplicate of an earlier entry.</p>
 
   <p>The <dfn id=dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem><code>namedItem(<var title="">name</var>)</code></dfn> method must return the first node in the collection that has
-  either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code title=attr-option-name><a href=#attr-option-name>name</a></code> attribute equal to <var title="">name</var>, if there is one;
+  either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code title=attr-option-name><a href=#attr-option-name>name</a></code> attribute equal to <var title="">name</var>, if there is one and if <var title="">name</var> is not the empty string;
   otherwise, it must return null.</p>
 
   <p>When the user agent is to <dfn id=dom-htmloptionscollection-setter title=dom-HTMLOptionsCollection-setter>set the value of a new
@@ -8886,7 +8890,7 @@
 
   <hr><p id=dom-document-namedItem-which>The <code><a href=#document>Document</a></code> interface <a href=#support-named-properties title="support
   named properties">supports named properties</a>. The <a href=#supported-property-names>supported property names</a> at
-  any moment consist of the values of the <code title=attr-name>name</code> content attributes of
+  any moment consist of the values of the <code title="">name</code> content attributes of
   all the
     <code><a href=#the-applet-element>applet</a></code>,
     <a href=#exposed>exposed</a> <code><a href=#the-embed-element>embed</a></code>,
@@ -8894,16 +8898,18 @@
     <code><a href=#the-iframe-element>iframe</a></code>,
     <code><a href=#the-img-element>img</a></code>, and
     <a href=#exposed>exposed</a> <code><a href=#the-object-element>object</a></code>
-  elements in the <code><a href=#document>Document</a></code> that have <code title=attr-name>name</code> content
+  elements in the <code><a href=#document>Document</a></code> that have non-empty <code title="">name</code> content
   attributes, and the values of the <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes of all the
     <code><a href=#the-applet-element>applet</a></code> and
     <a href=#exposed>exposed</a> <code><a href=#the-object-element>object</a></code>
-  elements in the <code><a href=#document>Document</a></code> that have <code title=attr-id><a href=#the-id-attribute>id</a></code> content
+  elements in the <code><a href=#document>Document</a></code> that have non-empty <code title=attr-id><a href=#the-id-attribute>id</a></code> content
   attributes, and the values of the <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes of all the
     <code><a href=#the-img-element>img</a></code>
-  elements in the <code><a href=#document>Document</a></code> that have both <code title=attr-name>name</code> content
-  attributes and <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes. The <a href=#supported-property-names>supported property
-  names</a> must be in <a href=#tree-order>tree order</a>, ignoring later duplicates.</p>
+  elements in the <code><a href=#document>Document</a></code> that have both non-empty <code title=attr-name>name</code> content
+  attributes and non-empty <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes. The <a href=#supported-property-names>supported property
+  names</a> must be in <a href=#tree-order>tree order</a>, ignoring later duplicates, with values from <code title=attr-id><a href=#the-id-attribute>id</a></code>
+  attributes coming before values from <code title="">name</code> attributes when the same element
+  contributes both.</p>
 
   <p>To <a href=#determine-the-value-of-a-named-property>determine the value of a named property</a> <var title="">name</var> when <dfn id=dom-document-nameditem title=dom-document-namedItem>the <code>Document</code> object is indexed for property
   retrieval</dfn>, the user agent must return the value obtained using the following steps:</p>
@@ -8957,7 +8963,7 @@
    <li><code><a href=#the-applet-element>applet</a></code> or <a href=#exposed>exposed</a> <code><a href=#the-object-element>object</a></code> elements that have an <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute whose value is <var title="">name</var>, or</li>
 
    <li><code><a href=#the-img-element>img</a></code> elements that have an <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute
-   whose value is <var title="">name</var>, and that have a <code title=attr-name>name</code>
+   whose value is <var title="">name</var>, and that have a non-empty <code title=attr-name>name</code>
    content attribute present also.</li>
 
   </ul><p>An <code><a href=#the-embed-element>embed</a></code> or <code><a href=#the-object-element>object</a></code> element is said to be <dfn id=exposed>exposed</dfn> if it has
@@ -44771,6 +44777,9 @@
    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 empty string as
+   their name.</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>
 
@@ -65851,10 +65860,10 @@
    <li>the value of the <code title="">name</code> content attribute for all <code><a href=#the-a-element>a</a></code>,
    <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>, <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>,
    <code><a href=#frameset>frameset</a></code>, <code><a href=#the-img-element>img</a></code>, and <code><a href=#the-object-element>object</a></code> elements in the <a href=#active-document>active
-   document</a> that have a <code title="">name</code> content attribute, and</li>
+   document</a> that have a non-empty <code title="">name</code> content attribute, and</li>
 
    <li>the value of the <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute of any <a href=#html-elements title="HTML
-   elements">HTML element</a> in the <a href=#active-document>active document</a> with an <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute.</li>
+   elements">HTML element</a> in the <a href=#active-document>active document</a> with a non-empty <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute.</li>
 
   </ul><p>To <a href=#determine-the-value-of-a-named-property>determine the value of a named property</a> <var title="">name</var> when <dfn id=dom-window-nameditem title=dom-window-namedItem>the <code>Window</code> object is indexed for property
   retrieval</dfn>, the user agent must return the value obtained using the following steps:</p>

Modified: source
===================================================================
--- source	2013-07-02 21:17:17 UTC (rev 8009)
+++ source	2013-07-02 21:45:38 UTC (rev 8010)
@@ -7006,14 +7006,14 @@
   <p>The object's <span>supported property indices</span> are as defined for
   <code>HTMLCollection</code> objects.</p>
 
-  <p>The <span>supported property names</span> consist of the values of all the <code
+  <p>The <span>supported property names</span> consist of the non-empty values of all the <code
   title="attr-id">id</code> attributes of all the elements <span>represented by the
-  collection</span>, and the values of all the <code title="">name</code> attributes of all the
+  collection</span>, and the non-empty values of all the <code title="">name</code> attributes of all the
   <code>a</code>, <code>applet</code>, <code>area</code>, <code>embed</code>, <code>form</code>,
   <code>frame</code>, <code>frameset</code>, <code>iframe</code>, <code>img</code>, and
   <code>object</code> elements <span>represented by the collection</span>, in <span>tree
   order</span>, ignoring later duplicates, with the <code title="attr-id">id</code> of an element
-  preceding its <code title="">name</code> if it has both, they differ from each other, and neither
+  preceding its <code title="">name</code> if it contributes both, they differ from each other, and neither
   is the duplicate of an earlier entry.</p>
 
   <p>The <dfn title="dom-HTMLAllCollection-item-string"><code>item(<var
@@ -7023,6 +7023,8 @@
 
   <ol>
 
+   <li>If <var title="">name</var> is the empty string, return null and stop the algorithm.</li>
+
    <li>
 
     <p>Let <var title="">collection</var> be an <code>HTMLCollection</code> object rooted at the
@@ -7120,11 +7122,11 @@
   <p>The object's <span>supported property indices</span> are as defined for
   <code>HTMLCollection</code> objects.</p>
 
-  <p>The <span>supported property names</span> consist of the values of all the <code
+  <p>The <span>supported property names</span> consist of the non-empty values of all the <code
   title="attr-id">id</code> and <code title="attr-fe-name">name</code> attributes of all the
   elements <span>represented by the collection</span>, in <span>tree order</span>, ignoring later
   duplicates, with the <code title="attr-id">id</code> of an element preceding its <code
-  title="attr-fe-name">name</code> if it has both, they differ from each other, and neither is the
+  title="attr-fe-name">name</code> if it contributes both, they differ from each other, and neither is the
   duplicate of an earlier entry.</p>
 
   <p>The <dfn title="dom-HTMLFormControlsCollection-namedItem"><code>namedItem(<var
@@ -7132,6 +7134,8 @@
 
   <ol>
 
+   <li>If <var title="">name</var> is the empty string, return null and stop the algorithm.</li>
+
    <li>If, at the time the method is called, there is exactly one node in the collection that has
    either an <code title="attr-id">id</code> attribute or a <code title="attr-fe-name">name</code>
    attribute equal to <var title="">name</var>, then return that node and stop the algorithm.</li>
@@ -7289,17 +7293,17 @@
   or adds any <code>optgroup</code> elements, and never adds new children to existing
   <code>optgroup</code> elements (though it can remove children from them).</p>
 
-  <p>The <span>supported property names</span> consist of the values of all the <code
+  <p>The <span>supported property names</span> consist of the non-empty values of all the <code
   title="attr-id">id</code> and <code title="attr-option-name">name</code> attributes of all the
   elements <span>represented by the collection</span>, in <span>tree order</span>, ignoring later
   duplicates, with the <code title="attr-id">id</code> of an element preceding its <code
-  title="attr-option-name">name</code> if it has both, they differ from each other, and neither is
+  title="attr-option-name">name</code> if it contributes both, they differ from each other, and neither is
   the duplicate of an earlier entry.</p>
 
   <p>The <dfn title="dom-HTMLOptionsCollection-namedItem"><code>namedItem(<var
   title="">name</var>)</code></dfn> method must return the first node in the collection that has
   either an <code title="attr-id">id</code> attribute or a <code
-  title="attr-option-name">name</code> attribute equal to <var title="">name</var>, if there is one;
+  title="attr-option-name">name</code> attribute equal to <var title="">name</var>, if there is one and if <var title="">name</var> is not the empty string;
   otherwise, it must return null.</p>
 
   <p>When the user agent is to <dfn title="dom-HTMLOptionsCollection-setter">set the value of a new
@@ -8688,7 +8692,7 @@
 
   <p id="dom-document-namedItem-which">The <code>Document</code> interface <span title="support
   named properties">supports named properties</span>. The <span>supported property names</span> at
-  any moment consist of the values of the <code title="attr-name">name</code> content attributes of
+  any moment consist of the values of the <code title="">name</code> content attributes of
   all the
     <code>applet</code>,
     <span>exposed</span> <code>embed</code>,
@@ -8696,16 +8700,18 @@
     <code>iframe</code>,
     <code>img</code>, and
     <span>exposed</span> <code>object</code>
-  elements in the <code>Document</code> that have <code title="attr-name">name</code> content
+  elements in the <code>Document</code> that have non-empty <code title="">name</code> content
   attributes, and the values of the <code title="attr-id">id</code> content attributes of all the
     <code>applet</code> and
     <span>exposed</span> <code>object</code>
-  elements in the <code>Document</code> that have <code title="attr-id">id</code> content
+  elements in the <code>Document</code> that have non-empty <code title="attr-id">id</code> content
   attributes, and the values of the <code title="attr-id">id</code> content attributes of all the
     <code>img</code>
-  elements in the <code>Document</code> that have both <code title="attr-name">name</code> content
-  attributes and <code title="attr-id">id</code> content attributes. The <span>supported property
-  names</span> must be in <span>tree order</span>, ignoring later duplicates.</p>
+  elements in the <code>Document</code> that have both non-empty <code title="attr-name">name</code> content
+  attributes and non-empty <code title="attr-id">id</code> content attributes. The <span>supported property
+  names</span> must be in <span>tree order</span>, ignoring later duplicates, with values from <code title="attr-id">id</code>
+  attributes coming before values from <code title="">name</code> attributes when the same element
+  contributes both.</p>
 
   <p>To <span>determine the value of a named property</span> <var title="">name</var> when <dfn
   title="dom-document-namedItem">the <code>Document</code> object is indexed for property
@@ -8771,7 +8777,7 @@
    title="attr-id">id</code> content attribute whose value is <var title="">name</var>, or</li>
 
    <li><code>img</code> elements that have an <code title="attr-id">id</code> content attribute
-   whose value is <var title="">name</var>, and that have a <code title="attr-name">name</code>
+   whose value is <var title="">name</var>, and that have a non-empty <code title="attr-name">name</code>
    content attribute present also.</li>
 
   </ul>
@@ -49034,6 +49040,9 @@
    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 empty string as
+   their name.</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>
 
@@ -73433,10 +73442,10 @@
    <li>the value of the <code title="">name</code> content attribute for all <code>a</code>,
    <code>applet</code>, <code>area</code>, <code>embed</code>, <code>form</code>,
    <code>frameset</code>, <code>img</code>, and <code>object</code> elements in the <span>active
-   document</span> that have a <code title="">name</code> content attribute, and</li>
+   document</span> that have a non-empty <code title="">name</code> content attribute, and</li>
 
    <li>the value of the <code title="attr-id">id</code> content attribute of any <span title="HTML
-   elements">HTML element</span> in the <span>active document</span> with an <code
+   elements">HTML element</span> in the <span>active document</span> with a non-empty <code
    title="attr-id">id</code> content attribute.</li>
 
   </ul>




More information about the Commit-Watchers mailing list