html5/spec forms.html,1.1051,1.1052 spec.html,1.1739,1.1740

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv11500

Modified Files:
	forms.html spec.html 
Log Message:
Try to make the named getter on HTMLFormElement more Web-compatible. (whatwg r6727)

[updated by splitter]


Index: forms.html
===================================================================
RCS file: /sources/public/html5/spec/forms.html,v
retrieving revision 1.1051
retrieving revision 1.1052
diff -u -d -r1.1051 -r1.1052
--- forms.html	5 Oct 2011 23:46:27 -0000	1.1051
+++ forms.html	21 Oct 2011 21:46:25 -0000	1.1052
@@ -790,8 +790,11 @@
 
    <dd>
 
-    <p>Returns the form control in the form with the given <a href="infrastructure.html#concept-id" title="concept-id">ID</a> or <code title="attr-fe-name"><a href="association-of-controls-and-forms.html#attr-fe-name">name</a></code> (excluding image buttons for
-    historical reasons).</p>
+    <p>Returns the form control (or, if there are several, a
+    <code><a href="infrastructure.html#nodelist">NodeList</a></code> of the form controls) in the form with the
+    given <a href="infrastructure.html#concept-id" title="concept-id">ID</a> or <code title="attr-fe-name"><a href="association-of-controls-and-forms.html#attr-fe-name">name</a></code> (excluding image buttons for
+    historical reasons); or, if there are none, returns the
+    <code><a href="embedded-content-1.html#the-img-element">img</a></code> element with the given ID.</p>
 
     <p>Once an element has been referenced using a particular name,
     that name will continue being available as a way to reference that
@@ -864,47 +867,52 @@
   the <code title="dom-form-elements"><a href="#dom-form-elements">elements</a></code> collection, when
   invoked with the given index as its argument.</p>
 
-  <p>Each <code><a href="#the-form-element">form</a></code> element has a mapping of names to elements
+  <hr><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="infrastructure.html#supported-property-names">supported property names</a> are the union of the
-  names currently supported by the object returned by the <code title="dom-form-elements"><a href="#dom-form-elements">elements</a></code> attribute, and the names
-  currently in the <a href="#past-names-map">past names map</a>.</p>
+  <p>The <a href="infrastructure.html#supported-property-names">supported property names</a> consist of the values
+  of all the <code title="attr-id"><a href="elements.html#the-id-attribute">id</a></code> and <code title="attr-fe-name"><a href="association-of-controls-and-forms.html#attr-fe-name">name</a></code> attributes of all the <a href="#category-listed" title="category-listed">listed elements</a> and <code><a href="embedded-content-1.html#the-img-element">img</a></code>
+  elements that are descendants of the <code><a href="#the-form-element">form</a></code> element, and
+  all the names currently in the <a href="#past-names-map">past names map</a>.</p>
 
   <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>If <var title="">name</var> is one of the <a href="infrastructure.html#supported-property-names">supported
-    property names</a> of the object returned by the <code title="dom-form-elements"><a href="#dom-form-elements">elements</a></code> attribute, then run
-    these substeps:</p>
+  <ol><li><p>Let <var title="">candidates</var> be a <a href="infrastructure.html#live">live</a>
+   <code><a href="infrastructure.html#nodelist">NodeList</a></code> object containing all the <a href="#category-listed" title="category-listed">listed elements</a> that are descendants
+   of the <code><a href="#the-form-element">form</a></code> element and that have either an <code title="attr-id"><a href="elements.html#the-id-attribute">id</a></code> attribute or a <code title="attr-fe-name"><a href="association-of-controls-and-forms.html#attr-fe-name">name</a></code> attribute equal to <var title="">name</var>, in <a href="infrastructure.html#tree-order">tree order</a>.</p></li>
 
-    <ol><li><p>Let <var title="">candidate</var> be the object returned
-     by the <code title="dom-HTMLFormControlsCollection-namedItem"><a href="common-dom-interfaces.html#dom-htmlformcontrolscollection-nameditem">namedItem()</a></code>
-     method on the object returned by the <code title="dom-form-elements"><a href="#dom-form-elements">elements</a></code> attribute when passed
-     the <var title="">name</var> argument.</p></li>
+   <li><p>If <var title="">candidates</var> is empty, let <var title="">candidates</var> be a <a href="infrastructure.html#live">live</a>
+   <code><a href="infrastructure.html#nodelist">NodeList</a></code> object containing all the <code><a href="embedded-content-1.html#the-img-element">img</a></code>
+   elements that are descendants of the <code><a href="#the-form-element">form</a></code> element and
+   that have either an <code title="attr-id"><a href="elements.html#the-id-attribute">id</a></code> attribute or a
+   <code title="attr-img-name"><a href="obsolete.html#attr-img-name">name</a></code> attribute equal to <var title="">name</var>, in <a href="infrastructure.html#tree-order">tree order</a>.</p></li>
 
-     <li><p>If <var title="">candidate</var> is an element, then add a
-     mapping from <var title="">name</var> to <var title="">candidate</var> in the <code><a href="#the-form-element">form</a></code> element's
-     <a href="#past-names-map">past names map</a>, replacing the previous entry with
-     the same name, if any.</p></li>
+   <li><p>If <var title="">candidates</var> is empty, <var title="">name</var> is the name of one of the entries in the
+   <code><a href="#the-form-element">form</a></code> element's <a href="#past-names-map">past names map</a>: return the
+   object associated with <var title="">name</var> in that
+   map.</p></li>
 
-     <li><p>Return <var title="">candidate</var> and abort these
-     steps.</p></li>
+   <li><p>If <var title="">candidates</var> contains more than one
+   node, return <var title="">candidates</var> and abort these
+   steps.</p></li>
 
-    </ol></li>
+   <li><p>Otherwise, <var title="">candidates</var> contains exactly
+   one node. Add a mapping from <var title="">name</var> to the node
+   in <var title="">candidates</var> in the <code><a href="#the-form-element">form</a></code> element's
+   <a href="#past-names-map">past names map</a>, replacing the previous entry with the
+   same name, if any.</p></li>
 
-   <li><p>Otherwise, <var title="">name</var> is the name of one of
-   the entries in the <code><a href="#the-form-element">form</a></code> element's <a href="#past-names-map">past names
-   map</a>: return the object associated with <var title="">name</var> in that map.</p></li>
+   <li><p>Return the node in <var title="">candidates</var>.</p></li>
 
   </ol><p>If an element listed in the <code><a href="#the-form-element">form</a></code> element's <a href="#past-names-map">past
   names map</a> is removed from the <code><a href="infrastructure.html#document">Document</a></code>, then its
   entries must be removed from the map.</p>
 
   
+  
+
   <hr><p>The <dfn id="dom-form-submit" title="dom-form-submit"><code>submit()</code></dfn>
   method, when invoked, must <a href="association-of-controls-and-forms.html#concept-form-submit" title="concept-form-submit">submit</a> the <code><a href="#the-form-element">form</a></code>
   element from the <code><a href="#the-form-element">form</a></code> element itself, with the <var title="">submitted from <code title="dom-form-submit"><a href="#dom-form-submit">submit()</a></code> method</var> flag set.</p>

Index: spec.html
===================================================================
RCS file: /sources/public/html5/spec/spec.html,v
retrieving revision 1.1739
retrieving revision 1.1740
diff -u -d -r1.1739 -r1.1740
--- spec.html	21 Oct 2011 16:46:45 -0000	1.1739
+++ spec.html	21 Oct 2011 21:46:26 -0000	1.1740
@@ -349,7 +349,7 @@
     <a href="Overview.html">single page HTML</a>,
     <a href="spec.html">multipage HTML</a>,
     <a href="author/">web developer edition</a>.
-This is revision 1.5392.
+This is revision 1.5393.
    </p> 
      <p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
    &#169; 2011 <a href="http://www.w3.org/"><abbr title="World Wide

Received on Friday, 21 October 2011 21:46:35 UTC