[html5] r5937 - [e] (0) Abstract out an algorithm for Anne. Fixing http://www.w3.org/Bugs/Public [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Mar 3 17:14:32 PST 2011


Author: ianh
Date: 2011-03-03 17:14:30 -0800 (Thu, 03 Mar 2011)
New Revision: 5937

Modified:
   complete.html
   index
   source
Log:
[e] (0) Abstract out an algorithm for Anne.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=12005

Modified: complete.html
===================================================================
--- complete.html	2011-03-04 01:02:20 UTC (rev 5936)
+++ complete.html	2011-03-04 01:14:30 UTC (rev 5937)
@@ -744,9 +744,10 @@
        <li><a href=#introduction-1><span class=secno>4.10.22.1 </span>Introduction</a></li>
        <li><a href=#implicit-submission><span class=secno>4.10.22.2 </span>Implicit submission</a></li>
        <li><a href=#form-submission-algorithm><span class=secno>4.10.22.3 </span>Form submission algorithm</a></li>
-       <li><a href=#url-encoded-form-data><span class=secno>4.10.22.4 </span>URL-encoded form data</a></li>
-       <li><a href=#multipart-form-data><span class=secno>4.10.22.5 </span>Multipart form data</a></li>
-       <li><a href=#plain-text-form-data><span class=secno>4.10.22.6 </span>Plain text form data</a></ol></li>
+       <li><a href=#constructing-form-data-set><span class=secno>4.10.22.4 </span>Constructing the form data set</a></li>
+       <li><a href=#url-encoded-form-data><span class=secno>4.10.22.5 </span>URL-encoded form data</a></li>
+       <li><a href=#multipart-form-data><span class=secno>4.10.22.6 </span>Multipart form data</a></li>
+       <li><a href=#plain-text-form-data><span class=secno>4.10.22.7 </span>Plain text form data</a></ol></li>
      <li><a href=#resetting-a-form><span class=secno>4.10.23 </span>Resetting a form</a></ol></li>
    <li><a href=#interactive-elements><span class=secno>4.11 </span>Interactive elements</a>
     <ol>
@@ -48611,179 +48612,9 @@
 
    <!-- unlock -->
 
-   <li><p>Let <var title="">controls</var> be a list of all the <a href=#category-submit title=category-submit>submittable elements</a> whose
-   <a href=#form-owner>form owner</a> is <var title="">form</var>, in <a href=#tree-order>tree
-   order</a>.</li>
+   <li><p>Let <var title="">form data set</var> be the result of
+   <a href=#constructing-the-form-data-set>constructing the form data set</a> for <var title="">form</var>.</li>
 
-   <li><p>Let the <var title="">form data set</var> be a list of
-   name-value-type tuples, initially empty.</li>
-
-   <li id=constructing-form-data-set>
-
-    <p><strong>Constructing the form data set</strong>. For each
-    element <var title="">field</var> in <var title="">controls</var>,
-    in <a href=#tree-order>tree order</a>, run the following substeps:</p>
-
-    <ol><li>
-
-      <p>If any of the following conditions are met, then skip these
-      substeps for this element:</p>
-
-      <ul><li>The <var title="">field</var> element has a
-       <code><a href=#the-datalist-element>datalist</a></code> element ancestor.</li>
-
-       <li>The <var title="">field</var> element is <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>.</li>
-
-       <li>The <var title="">field</var> element is a <a href=#concept-button title=concept-button>button</a> but it is not <var title="">submitter</var>.</li>
-
-       <li>The <var title="">field</var> element is an
-       <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> state and
-       whose <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> is
-       false.</li>
-
-       <li>The <var title="">field</var> element is an
-       <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#radio-button-state title=attr-input-type-radio>Radio Button</a> state and
-       whose <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> is
-       false.</li>
-
-       <li>The <var title="">field</var> element is not an
-       <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#image-button-state title=attr-input-type-image>Image Button</a> state, and
-       either the <var title="">field</var> element does not have a
-       <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute specified, or
-       its <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute's value is
-       the empty string.</li>
-
-       <li>The <var title="">field</var> element is an
-       <code><a href=#the-object-element>object</a></code> element that is not using a
-       <a href=#plugin>plugin</a>.</li>
-
-      </ul><p>Otherwise, process <var title="">field</var> as follows:</p>
-
-     </li>
-
-     <li><p>Let <var title="">type</var> be the value of the <code title="">type</code> IDL attribute of <var title="">field</var>.</li> <!-- if the field is an <object>
-     element, this will get ignored. -->
-
-     <li>
-
-      <p>If the <var title="">field</var> element is an
-      <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#image-button-state title=attr-input-type-image>Image Button</a> state,
-      then run these further nested substeps:</p>
-
-      <ol><li><p>If the <var title="">field</var> element has a <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute specified and its
-       value is not the empty string, let <var title="">name</var> be
-       that value followed by a single U+002E FULL STOP character (.).
-       Otherwise, let <var title="">name</var> be the empty
-       string.</li>
-
-       <li><p>Let <var title="">name<sub title="">x</sub></var> be the
-       string consisting of the concatenation of <var title="">name</var> and a single U+0078 LATIN SMALL LETTER X
-       character (x).</li>
-
-       <li><p>Let <var title="">name<sub title="">y</sub></var> be the
-       string consisting of the concatenation of <var title="">name</var> and a single U+0079 LATIN SMALL LETTER Y
-       character (y).</li>
-
-       <li><p>The <var title="">field</var> element is <var title="">submitter</var>, and before this algorithm was invoked
-       the user <a href=#concept-input-type-image-coordinate title=concept-input-type-image-coordinate>indicated a
-       coordinate</a>. Let <var title="">x</var> be the <var title="">x</var>-component of the coordinate selected by the
-       user, and let <var title="">y</var> be the <var title="">y</var>-component of the coordinate selected by the
-       user.</li>
-
-       <li><p>Append an entry to the <var title="">form data set</var>
-       with the name <var title="">name<sub title="">x</sub></var>,
-       the value <var title="">x</var>, and the type <var title="">type</var>.</li>
-
-       <li><p>Append an entry to the <var title="">form data set</var>
-       with the name <var title="">name<sub title="">y</sub></var> and
-       the value <var title="">y</var>, and the type <var title="">type</var>.</li>
-
-       <li><p>Skip the remaining substeps for this element: if there
-       are any more elements in <var title="">controls</var>, return
-       to the top of the <a href=#constructing-form-data-set>constructing the form data
-       set</a> step, otherwise, jump to the next step in the overall
-       form submission algorithm.</li>
-
-      </ol></li>
-
-     <li><p>Let <var title="">name</var> be the value of the <var title="">field</var> element's <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute.</li>
-
-     <li><p>If the <var title="">field</var> element is a
-     <code><a href=#the-select-element>select</a></code> element, then for each <code><a href=#the-option-element>option</a></code>
-     element in the <code><a href=#the-select-element>select</a></code> element whose <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> is true,
-     append an entry to the <var title="">form data set</var> with the
-     <var title="">name</var> as the name, the <a href=#concept-option-value title=concept-option-value>value</a> of the
-     <code><a href=#the-option-element>option</a></code> element as the value, and <var title="">type</var> as the type.</li>
-
-     <li>
-
-      <p>Otherwise, if the <var title="">field</var> element is an
-      <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> state or the
-      <a href=#radio-button-state title=attr-input-type-radio>Radio Button</a> state,
-      then run these further nested substeps:</p>
-
-      <ol><li><p>If the <var title="">field</var> element has a <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute specified, then
-       let <var title="">value</var> be the value of that attribute;
-       otherwise, let <var title="">value</var> be the string
-       "<code title="">on</code>".</li>
-
-       <li><p>Append an entry to the <var title="">form data set</var>
-       with <var title="">name</var> as the name, <var title="">value</var> as the value, and <var title="">type</var>
-       as the type.</li>
-
-      </ol></li>
-
-     <li><p>Otherwise, if the <var title="">field</var> element is an
-     <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#file-upload-state title=attr-input-type-file>File Upload</a> state, then for
-     each file <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected</a> in the
-     <code><a href=#the-input-element>input</a></code> element, append an entry to the <var title="">form data set</var> with the <var title="">name</var> as
-     the name, the file (consisting of the name, the type, and the
-     body) as the value, and <var title="">type</var> as the type. If
-     there are no <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected files</a>,
-     then append an entry to the <var title="">form data set</var>
-     with the <var title="">name</var> as the name, the empty string
-     as the value, and <code>application/octet-stream</code> as the
-     type.</li>
-     <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=529859 -->
-
-     <li><p>Otherwise, if the <var title="">field</var> element is an
-     <code><a href=#the-object-element>object</a></code> element: try to obtain a form submission
-     value from the <a href=#plugin>plugin</a><!-- using NPAPI's
-     NPP_GetValue() entry point with the NPPVformValue variable -->,
-     and if that is successful, append an entry to the <var title="">form data set</var> with <var title="">name</var> as the
-     name, the returned form submission value as the value, and the
-     string "<code title="">object</code>" as the type.</li>
-
-     <li><p>Otherwise, append an entry to the <var title="">form data
-     set</var> with <var title="">name</var> as the name, the <a href=#concept-fe-value title=concept-fe-value>value</a> of the <var title="">field</var> element as the value, and <var title="">type</var> as the type.</li>
-
-     <li>
-
-      <p>If the element has a <a href=#form-control-dirname-attribute>form control <code title="">dirname</code> attribute</a>, and that attribute's
-      value is not the empty string, then run these substeps:</p>
-
-      <ol><li><p>Let <var title="">dirname</var> be the value of the
-       element's <code title="">dirname</code> attribute.</li>
-
-       <li><p>Let <var title="">dir</var> be the string "<code title="">ltr</code>" if <a href=#the-directionality>the directionality</a> of the
-       element is '<a href=#concept-ltr title=concept-ltr>ltr</a>', and "<code title="">rtl</code>" otherwise (i.e. when <a href=#the-directionality>the
-       directionality</a> of the element is '<a href=#concept-rtl title=concept-rtl>rtl</a>').</li>
-
-       <li><p>Append an entry to the <var title="">form data set</var>
-       with <var title="">dirname</var> as the name, <var title="">dir</var> as the value, and the string "<code title="">direction</code>" as the type.</li>
-
-      </ol><p class=note>An element can only have a <a href=#form-control-dirname-attribute>form control
-      <code title="">dirname</code> attribute</a> if it is a
-      <code><a href=#the-textarea-element>textarea</a></code> element or an <code><a href=#the-input-element>input</a></code> element
-      whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in
-      either the <a href=#text-state-and-search-state title=attr-input-type-text>Text</a> state
-      or the <a href=#text-state-and-search-state title=attr-input-type-search>Search</a>
-      state.</p>
-
-     </li>
-
-    </ol></li>
-
    <li><p>Let <var title="">action</var> be the <var title="">submitter</var> element's <a href=#concept-fs-action title=concept-fs-action>action</a>.</li>
 
    <li>
@@ -49049,13 +48880,187 @@
 
     </dl></li>
 
-  </ol></div>
+  </ol><h5 id=constructing-form-data-set><span class=secno>4.10.22.4 </span>Constructing the form data set</h5>
 
+  <p>The algorithm to <dfn id=constructing-the-form-data-set title="constructing the form data
+  set">construct the form data set</dfn> for a form <var title="">form</var> is as follows:</p>
 
-  <div class=impl>
+  <ol><li><p>Let <var title="">controls</var> be a list of all the <a href=#category-submit title=category-submit>submittable elements</a> whose
+   <a href=#form-owner>form owner</a> is <var title="">form</var>, in <a href=#tree-order>tree
+   order</a>.</li>
 
-  <h5 id=url-encoded-form-data><span class=secno>4.10.22.4 </span>URL-encoded form data</h5>
+   <li><p>Let the <var title="">form data set</var> be a list of
+   name-value-type tuples, initially empty.</li>
 
+   <li>
+
+    <p><i>Loop</i>: For each element <var title="">field</var> in <var title="">controls</var>, in <a href=#tree-order>tree order</a>, run the
+    following substeps:</p>
+
+    <ol><li>
+
+      <p>If any of the following conditions are met, then skip these
+      substeps for this element:</p>
+
+      <ul><li>The <var title="">field</var> element has a
+       <code><a href=#the-datalist-element>datalist</a></code> element ancestor.</li>
+
+       <li>The <var title="">field</var> element is <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>.</li>
+
+       <li>The <var title="">field</var> element is a <a href=#concept-button title=concept-button>button</a> but it is not <var title="">submitter</var>.</li>
+
+       <li>The <var title="">field</var> element is an
+       <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> state and
+       whose <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> is
+       false.</li>
+
+       <li>The <var title="">field</var> element is an
+       <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#radio-button-state title=attr-input-type-radio>Radio Button</a> state and
+       whose <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> is
+       false.</li>
+
+       <li>The <var title="">field</var> element is not an
+       <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#image-button-state title=attr-input-type-image>Image Button</a> state, and
+       either the <var title="">field</var> element does not have a
+       <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute specified, or
+       its <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute's value is
+       the empty string.</li>
+
+       <li>The <var title="">field</var> element is an
+       <code><a href=#the-object-element>object</a></code> element that is not using a
+       <a href=#plugin>plugin</a>.</li>
+
+      </ul><p>Otherwise, process <var title="">field</var> as follows:</p>
+
+     </li>
+
+     <li><p>Let <var title="">type</var> be the value of the <code title="">type</code> IDL attribute of <var title="">field</var>.</li> <!-- if the field is an <object>
+     element, this will get ignored. -->
+
+     <li>
+
+      <p>If the <var title="">field</var> element is an
+      <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#image-button-state title=attr-input-type-image>Image Button</a> state,
+      then run these further nested substeps:</p>
+
+      <ol><li><p>If the <var title="">field</var> element has a <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute specified and its
+       value is not the empty string, let <var title="">name</var> be
+       that value followed by a single U+002E FULL STOP character (.).
+       Otherwise, let <var title="">name</var> be the empty
+       string.</li>
+
+       <li><p>Let <var title="">name<sub title="">x</sub></var> be the
+       string consisting of the concatenation of <var title="">name</var> and a single U+0078 LATIN SMALL LETTER X
+       character (x).</li>
+
+       <li><p>Let <var title="">name<sub title="">y</sub></var> be the
+       string consisting of the concatenation of <var title="">name</var> and a single U+0079 LATIN SMALL LETTER Y
+       character (y).</li>
+
+       <li><p>The <var title="">field</var> element is <var title="">submitter</var>, and before this algorithm was invoked
+       the user <a href=#concept-input-type-image-coordinate title=concept-input-type-image-coordinate>indicated a
+       coordinate</a>. Let <var title="">x</var> be the <var title="">x</var>-component of the coordinate selected by the
+       user, and let <var title="">y</var> be the <var title="">y</var>-component of the coordinate selected by the
+       user.</li>
+
+       <li><p>Append an entry to the <var title="">form data set</var>
+       with the name <var title="">name<sub title="">x</sub></var>,
+       the value <var title="">x</var>, and the type <var title="">type</var>.</li>
+
+       <li><p>Append an entry to the <var title="">form data set</var>
+       with the name <var title="">name<sub title="">y</sub></var> and
+       the value <var title="">y</var>, and the type <var title="">type</var>.</li>
+
+       <li><p>Skip the remaining substeps for this element: if there
+       are any more elements in <var title="">controls</var>, return
+       to the top of the <i>loop</i> step, otherwise, jump to the
+       <i>end</i> step below.</li>
+
+      </ol></li>
+
+     <li><p>Let <var title="">name</var> be the value of the <var title="">field</var> element's <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute.</li>
+
+     <li><p>If the <var title="">field</var> element is a
+     <code><a href=#the-select-element>select</a></code> element, then for each <code><a href=#the-option-element>option</a></code>
+     element in the <code><a href=#the-select-element>select</a></code> element whose <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> is true,
+     append an entry to the <var title="">form data set</var> with the
+     <var title="">name</var> as the name, the <a href=#concept-option-value title=concept-option-value>value</a> of the
+     <code><a href=#the-option-element>option</a></code> element as the value, and <var title="">type</var> as the type.</li>
+
+     <li>
+
+      <p>Otherwise, if the <var title="">field</var> element is an
+      <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> state or the
+      <a href=#radio-button-state title=attr-input-type-radio>Radio Button</a> state,
+      then run these further nested substeps:</p>
+
+      <ol><li><p>If the <var title="">field</var> element has a <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute specified, then
+       let <var title="">value</var> be the value of that attribute;
+       otherwise, let <var title="">value</var> be the string
+       "<code title="">on</code>".</li>
+
+       <li><p>Append an entry to the <var title="">form data set</var>
+       with <var title="">name</var> as the name, <var title="">value</var> as the value, and <var title="">type</var>
+       as the type.</li>
+
+      </ol></li>
+
+     <li><p>Otherwise, if the <var title="">field</var> element is an
+     <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#file-upload-state title=attr-input-type-file>File Upload</a> state, then for
+     each file <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected</a> in the
+     <code><a href=#the-input-element>input</a></code> element, append an entry to the <var title="">form data set</var> with the <var title="">name</var> as
+     the name, the file (consisting of the name, the type, and the
+     body) as the value, and <var title="">type</var> as the type. If
+     there are no <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected files</a>,
+     then append an entry to the <var title="">form data set</var>
+     with the <var title="">name</var> as the name, the empty string
+     as the value, and <code>application/octet-stream</code> as the
+     type.</li>
+     <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=529859 -->
+
+     <li><p>Otherwise, if the <var title="">field</var> element is an
+     <code><a href=#the-object-element>object</a></code> element: try to obtain a form submission
+     value from the <a href=#plugin>plugin</a><!-- using NPAPI's
+     NPP_GetValue() entry point with the NPPVformValue variable -->,
+     and if that is successful, append an entry to the <var title="">form data set</var> with <var title="">name</var> as the
+     name, the returned form submission value as the value, and the
+     string "<code title="">object</code>" as the type.</li>
+
+     <li><p>Otherwise, append an entry to the <var title="">form data
+     set</var> with <var title="">name</var> as the name, the <a href=#concept-fe-value title=concept-fe-value>value</a> of the <var title="">field</var> element as the value, and <var title="">type</var> as the type.</li>
+
+     <li>
+
+      <p>If the element has a <a href=#form-control-dirname-attribute>form control <code title="">dirname</code> attribute</a>, and that attribute's
+      value is not the empty string, then run these substeps:</p>
+
+      <ol><li><p>Let <var title="">dirname</var> be the value of the
+       element's <code title="">dirname</code> attribute.</li>
+
+       <li><p>Let <var title="">dir</var> be the string "<code title="">ltr</code>" if <a href=#the-directionality>the directionality</a> of the
+       element is '<a href=#concept-ltr title=concept-ltr>ltr</a>', and "<code title="">rtl</code>" otherwise (i.e. when <a href=#the-directionality>the
+       directionality</a> of the element is '<a href=#concept-rtl title=concept-rtl>rtl</a>').</li>
+
+       <li><p>Append an entry to the <var title="">form data set</var>
+       with <var title="">dirname</var> as the name, <var title="">dir</var> as the value, and the string "<code title="">direction</code>" as the type.</li>
+
+      </ol><p class=note>An element can only have a <a href=#form-control-dirname-attribute>form control
+      <code title="">dirname</code> attribute</a> if it is a
+      <code><a href=#the-textarea-element>textarea</a></code> element or an <code><a href=#the-input-element>input</a></code> element
+      whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in
+      either the <a href=#text-state-and-search-state title=attr-input-type-text>Text</a> state
+      or the <a href=#text-state-and-search-state title=attr-input-type-search>Search</a>
+      state.</p>
+
+     </li>
+
+    </ol></li>
+
+   <li><p><i>End</i>: Return the <var title="">form data
+   step</var>.</li>
+
+  </ol><h5 id=url-encoded-form-data><span class=secno>4.10.22.5 </span>URL-encoded form data</h5>
+
   <p>The <dfn id=application/x-www-form-urlencoded-encoding-algorithm><code title="">application/x-www-form-urlencoded</code> encoding
   algorithm</dfn> is as follows:</p>
 
@@ -49189,7 +49194,7 @@
 
   <div class=impl>
 
-  <h5 id=multipart-form-data><span class=secno>4.10.22.5 </span>Multipart form data</h5>
+  <h5 id=multipart-form-data><span class=secno>4.10.22.6 </span>Multipart form data</h5>
 
   <!-- http://hixie.ch/tests/adhoc/html/forms/submission/multipart_form-data/ -->
 
@@ -49283,7 +49288,7 @@
 
   <div class=impl>
 
-  <h5 id=plain-text-form-data><span class=secno>4.10.22.6 </span>Plain text form data</h5>
+  <h5 id=plain-text-form-data><span class=secno>4.10.22.7 </span>Plain text form data</h5>
 
   <p>The <dfn id=text/plain-encoding-algorithm><code title="">text/plain</code> encoding
   algorithm</dfn> is as follows:</p>

Modified: index
===================================================================
--- index	2011-03-04 01:02:20 UTC (rev 5936)
+++ index	2011-03-04 01:14:30 UTC (rev 5937)
@@ -752,9 +752,10 @@
        <li><a href=#introduction-1><span class=secno>4.10.22.1 </span>Introduction</a></li>
        <li><a href=#implicit-submission><span class=secno>4.10.22.2 </span>Implicit submission</a></li>
        <li><a href=#form-submission-algorithm><span class=secno>4.10.22.3 </span>Form submission algorithm</a></li>
-       <li><a href=#url-encoded-form-data><span class=secno>4.10.22.4 </span>URL-encoded form data</a></li>
-       <li><a href=#multipart-form-data><span class=secno>4.10.22.5 </span>Multipart form data</a></li>
-       <li><a href=#plain-text-form-data><span class=secno>4.10.22.6 </span>Plain text form data</a></ol></li>
+       <li><a href=#constructing-form-data-set><span class=secno>4.10.22.4 </span>Constructing the form data set</a></li>
+       <li><a href=#url-encoded-form-data><span class=secno>4.10.22.5 </span>URL-encoded form data</a></li>
+       <li><a href=#multipart-form-data><span class=secno>4.10.22.6 </span>Multipart form data</a></li>
+       <li><a href=#plain-text-form-data><span class=secno>4.10.22.7 </span>Plain text form data</a></ol></li>
      <li><a href=#resetting-a-form><span class=secno>4.10.23 </span>Resetting a form</a></ol></li>
    <li><a href=#interactive-elements><span class=secno>4.11 </span>Interactive elements</a>
     <ol>
@@ -48594,179 +48595,9 @@
 
    <!-- unlock -->
 
-   <li><p>Let <var title="">controls</var> be a list of all the <a href=#category-submit title=category-submit>submittable elements</a> whose
-   <a href=#form-owner>form owner</a> is <var title="">form</var>, in <a href=#tree-order>tree
-   order</a>.</li>
+   <li><p>Let <var title="">form data set</var> be the result of
+   <a href=#constructing-the-form-data-set>constructing the form data set</a> for <var title="">form</var>.</li>
 
-   <li><p>Let the <var title="">form data set</var> be a list of
-   name-value-type tuples, initially empty.</li>
-
-   <li id=constructing-form-data-set>
-
-    <p><strong>Constructing the form data set</strong>. For each
-    element <var title="">field</var> in <var title="">controls</var>,
-    in <a href=#tree-order>tree order</a>, run the following substeps:</p>
-
-    <ol><li>
-
-      <p>If any of the following conditions are met, then skip these
-      substeps for this element:</p>
-
-      <ul><li>The <var title="">field</var> element has a
-       <code><a href=#the-datalist-element>datalist</a></code> element ancestor.</li>
-
-       <li>The <var title="">field</var> element is <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>.</li>
-
-       <li>The <var title="">field</var> element is a <a href=#concept-button title=concept-button>button</a> but it is not <var title="">submitter</var>.</li>
-
-       <li>The <var title="">field</var> element is an
-       <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> state and
-       whose <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> is
-       false.</li>
-
-       <li>The <var title="">field</var> element is an
-       <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#radio-button-state title=attr-input-type-radio>Radio Button</a> state and
-       whose <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> is
-       false.</li>
-
-       <li>The <var title="">field</var> element is not an
-       <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#image-button-state title=attr-input-type-image>Image Button</a> state, and
-       either the <var title="">field</var> element does not have a
-       <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute specified, or
-       its <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute's value is
-       the empty string.</li>
-
-       <li>The <var title="">field</var> element is an
-       <code><a href=#the-object-element>object</a></code> element that is not using a
-       <a href=#plugin>plugin</a>.</li>
-
-      </ul><p>Otherwise, process <var title="">field</var> as follows:</p>
-
-     </li>
-
-     <li><p>Let <var title="">type</var> be the value of the <code title="">type</code> IDL attribute of <var title="">field</var>.</li> <!-- if the field is an <object>
-     element, this will get ignored. -->
-
-     <li>
-
-      <p>If the <var title="">field</var> element is an
-      <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#image-button-state title=attr-input-type-image>Image Button</a> state,
-      then run these further nested substeps:</p>
-
-      <ol><li><p>If the <var title="">field</var> element has a <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute specified and its
-       value is not the empty string, let <var title="">name</var> be
-       that value followed by a single U+002E FULL STOP character (.).
-       Otherwise, let <var title="">name</var> be the empty
-       string.</li>
-
-       <li><p>Let <var title="">name<sub title="">x</sub></var> be the
-       string consisting of the concatenation of <var title="">name</var> and a single U+0078 LATIN SMALL LETTER X
-       character (x).</li>
-
-       <li><p>Let <var title="">name<sub title="">y</sub></var> be the
-       string consisting of the concatenation of <var title="">name</var> and a single U+0079 LATIN SMALL LETTER Y
-       character (y).</li>
-
-       <li><p>The <var title="">field</var> element is <var title="">submitter</var>, and before this algorithm was invoked
-       the user <a href=#concept-input-type-image-coordinate title=concept-input-type-image-coordinate>indicated a
-       coordinate</a>. Let <var title="">x</var> be the <var title="">x</var>-component of the coordinate selected by the
-       user, and let <var title="">y</var> be the <var title="">y</var>-component of the coordinate selected by the
-       user.</li>
-
-       <li><p>Append an entry to the <var title="">form data set</var>
-       with the name <var title="">name<sub title="">x</sub></var>,
-       the value <var title="">x</var>, and the type <var title="">type</var>.</li>
-
-       <li><p>Append an entry to the <var title="">form data set</var>
-       with the name <var title="">name<sub title="">y</sub></var> and
-       the value <var title="">y</var>, and the type <var title="">type</var>.</li>
-
-       <li><p>Skip the remaining substeps for this element: if there
-       are any more elements in <var title="">controls</var>, return
-       to the top of the <a href=#constructing-form-data-set>constructing the form data
-       set</a> step, otherwise, jump to the next step in the overall
-       form submission algorithm.</li>
-
-      </ol></li>
-
-     <li><p>Let <var title="">name</var> be the value of the <var title="">field</var> element's <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute.</li>
-
-     <li><p>If the <var title="">field</var> element is a
-     <code><a href=#the-select-element>select</a></code> element, then for each <code><a href=#the-option-element>option</a></code>
-     element in the <code><a href=#the-select-element>select</a></code> element whose <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> is true,
-     append an entry to the <var title="">form data set</var> with the
-     <var title="">name</var> as the name, the <a href=#concept-option-value title=concept-option-value>value</a> of the
-     <code><a href=#the-option-element>option</a></code> element as the value, and <var title="">type</var> as the type.</li>
-
-     <li>
-
-      <p>Otherwise, if the <var title="">field</var> element is an
-      <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> state or the
-      <a href=#radio-button-state title=attr-input-type-radio>Radio Button</a> state,
-      then run these further nested substeps:</p>
-
-      <ol><li><p>If the <var title="">field</var> element has a <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute specified, then
-       let <var title="">value</var> be the value of that attribute;
-       otherwise, let <var title="">value</var> be the string
-       "<code title="">on</code>".</li>
-
-       <li><p>Append an entry to the <var title="">form data set</var>
-       with <var title="">name</var> as the name, <var title="">value</var> as the value, and <var title="">type</var>
-       as the type.</li>
-
-      </ol></li>
-
-     <li><p>Otherwise, if the <var title="">field</var> element is an
-     <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#file-upload-state title=attr-input-type-file>File Upload</a> state, then for
-     each file <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected</a> in the
-     <code><a href=#the-input-element>input</a></code> element, append an entry to the <var title="">form data set</var> with the <var title="">name</var> as
-     the name, the file (consisting of the name, the type, and the
-     body) as the value, and <var title="">type</var> as the type. If
-     there are no <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected files</a>,
-     then append an entry to the <var title="">form data set</var>
-     with the <var title="">name</var> as the name, the empty string
-     as the value, and <code>application/octet-stream</code> as the
-     type.</li>
-     <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=529859 -->
-
-     <li><p>Otherwise, if the <var title="">field</var> element is an
-     <code><a href=#the-object-element>object</a></code> element: try to obtain a form submission
-     value from the <a href=#plugin>plugin</a><!-- using NPAPI's
-     NPP_GetValue() entry point with the NPPVformValue variable -->,
-     and if that is successful, append an entry to the <var title="">form data set</var> with <var title="">name</var> as the
-     name, the returned form submission value as the value, and the
-     string "<code title="">object</code>" as the type.</li>
-
-     <li><p>Otherwise, append an entry to the <var title="">form data
-     set</var> with <var title="">name</var> as the name, the <a href=#concept-fe-value title=concept-fe-value>value</a> of the <var title="">field</var> element as the value, and <var title="">type</var> as the type.</li>
-
-     <li>
-
-      <p>If the element has a <a href=#form-control-dirname-attribute>form control <code title="">dirname</code> attribute</a>, and that attribute's
-      value is not the empty string, then run these substeps:</p>
-
-      <ol><li><p>Let <var title="">dirname</var> be the value of the
-       element's <code title="">dirname</code> attribute.</li>
-
-       <li><p>Let <var title="">dir</var> be the string "<code title="">ltr</code>" if <a href=#the-directionality>the directionality</a> of the
-       element is '<a href=#concept-ltr title=concept-ltr>ltr</a>', and "<code title="">rtl</code>" otherwise (i.e. when <a href=#the-directionality>the
-       directionality</a> of the element is '<a href=#concept-rtl title=concept-rtl>rtl</a>').</li>
-
-       <li><p>Append an entry to the <var title="">form data set</var>
-       with <var title="">dirname</var> as the name, <var title="">dir</var> as the value, and the string "<code title="">direction</code>" as the type.</li>
-
-      </ol><p class=note>An element can only have a <a href=#form-control-dirname-attribute>form control
-      <code title="">dirname</code> attribute</a> if it is a
-      <code><a href=#the-textarea-element>textarea</a></code> element or an <code><a href=#the-input-element>input</a></code> element
-      whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in
-      either the <a href=#text-state-and-search-state title=attr-input-type-text>Text</a> state
-      or the <a href=#text-state-and-search-state title=attr-input-type-search>Search</a>
-      state.</p>
-
-     </li>
-
-    </ol></li>
-
    <li><p>Let <var title="">action</var> be the <var title="">submitter</var> element's <a href=#concept-fs-action title=concept-fs-action>action</a>.</li>
 
    <li>
@@ -49032,13 +48863,187 @@
 
     </dl></li>
 
-  </ol></div>
+  </ol><h5 id=constructing-form-data-set><span class=secno>4.10.22.4 </span>Constructing the form data set</h5>
 
+  <p>The algorithm to <dfn id=constructing-the-form-data-set title="constructing the form data
+  set">construct the form data set</dfn> for a form <var title="">form</var> is as follows:</p>
 
-  <div class=impl>
+  <ol><li><p>Let <var title="">controls</var> be a list of all the <a href=#category-submit title=category-submit>submittable elements</a> whose
+   <a href=#form-owner>form owner</a> is <var title="">form</var>, in <a href=#tree-order>tree
+   order</a>.</li>
 
-  <h5 id=url-encoded-form-data><span class=secno>4.10.22.4 </span>URL-encoded form data</h5>
+   <li><p>Let the <var title="">form data set</var> be a list of
+   name-value-type tuples, initially empty.</li>
 
+   <li>
+
+    <p><i>Loop</i>: For each element <var title="">field</var> in <var title="">controls</var>, in <a href=#tree-order>tree order</a>, run the
+    following substeps:</p>
+
+    <ol><li>
+
+      <p>If any of the following conditions are met, then skip these
+      substeps for this element:</p>
+
+      <ul><li>The <var title="">field</var> element has a
+       <code><a href=#the-datalist-element>datalist</a></code> element ancestor.</li>
+
+       <li>The <var title="">field</var> element is <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>.</li>
+
+       <li>The <var title="">field</var> element is a <a href=#concept-button title=concept-button>button</a> but it is not <var title="">submitter</var>.</li>
+
+       <li>The <var title="">field</var> element is an
+       <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> state and
+       whose <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> is
+       false.</li>
+
+       <li>The <var title="">field</var> element is an
+       <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#radio-button-state title=attr-input-type-radio>Radio Button</a> state and
+       whose <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> is
+       false.</li>
+
+       <li>The <var title="">field</var> element is not an
+       <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#image-button-state title=attr-input-type-image>Image Button</a> state, and
+       either the <var title="">field</var> element does not have a
+       <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute specified, or
+       its <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute's value is
+       the empty string.</li>
+
+       <li>The <var title="">field</var> element is an
+       <code><a href=#the-object-element>object</a></code> element that is not using a
+       <a href=#plugin>plugin</a>.</li>
+
+      </ul><p>Otherwise, process <var title="">field</var> as follows:</p>
+
+     </li>
+
+     <li><p>Let <var title="">type</var> be the value of the <code title="">type</code> IDL attribute of <var title="">field</var>.</li> <!-- if the field is an <object>
+     element, this will get ignored. -->
+
+     <li>
+
+      <p>If the <var title="">field</var> element is an
+      <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#image-button-state title=attr-input-type-image>Image Button</a> state,
+      then run these further nested substeps:</p>
+
+      <ol><li><p>If the <var title="">field</var> element has a <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute specified and its
+       value is not the empty string, let <var title="">name</var> be
+       that value followed by a single U+002E FULL STOP character (.).
+       Otherwise, let <var title="">name</var> be the empty
+       string.</li>
+
+       <li><p>Let <var title="">name<sub title="">x</sub></var> be the
+       string consisting of the concatenation of <var title="">name</var> and a single U+0078 LATIN SMALL LETTER X
+       character (x).</li>
+
+       <li><p>Let <var title="">name<sub title="">y</sub></var> be the
+       string consisting of the concatenation of <var title="">name</var> and a single U+0079 LATIN SMALL LETTER Y
+       character (y).</li>
+
+       <li><p>The <var title="">field</var> element is <var title="">submitter</var>, and before this algorithm was invoked
+       the user <a href=#concept-input-type-image-coordinate title=concept-input-type-image-coordinate>indicated a
+       coordinate</a>. Let <var title="">x</var> be the <var title="">x</var>-component of the coordinate selected by the
+       user, and let <var title="">y</var> be the <var title="">y</var>-component of the coordinate selected by the
+       user.</li>
+
+       <li><p>Append an entry to the <var title="">form data set</var>
+       with the name <var title="">name<sub title="">x</sub></var>,
+       the value <var title="">x</var>, and the type <var title="">type</var>.</li>
+
+       <li><p>Append an entry to the <var title="">form data set</var>
+       with the name <var title="">name<sub title="">y</sub></var> and
+       the value <var title="">y</var>, and the type <var title="">type</var>.</li>
+
+       <li><p>Skip the remaining substeps for this element: if there
+       are any more elements in <var title="">controls</var>, return
+       to the top of the <i>loop</i> step, otherwise, jump to the
+       <i>end</i> step below.</li>
+
+      </ol></li>
+
+     <li><p>Let <var title="">name</var> be the value of the <var title="">field</var> element's <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute.</li>
+
+     <li><p>If the <var title="">field</var> element is a
+     <code><a href=#the-select-element>select</a></code> element, then for each <code><a href=#the-option-element>option</a></code>
+     element in the <code><a href=#the-select-element>select</a></code> element whose <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> is true,
+     append an entry to the <var title="">form data set</var> with the
+     <var title="">name</var> as the name, the <a href=#concept-option-value title=concept-option-value>value</a> of the
+     <code><a href=#the-option-element>option</a></code> element as the value, and <var title="">type</var> as the type.</li>
+
+     <li>
+
+      <p>Otherwise, if the <var title="">field</var> element is an
+      <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> state or the
+      <a href=#radio-button-state title=attr-input-type-radio>Radio Button</a> state,
+      then run these further nested substeps:</p>
+
+      <ol><li><p>If the <var title="">field</var> element has a <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute specified, then
+       let <var title="">value</var> be the value of that attribute;
+       otherwise, let <var title="">value</var> be the string
+       "<code title="">on</code>".</li>
+
+       <li><p>Append an entry to the <var title="">form data set</var>
+       with <var title="">name</var> as the name, <var title="">value</var> as the value, and <var title="">type</var>
+       as the type.</li>
+
+      </ol></li>
+
+     <li><p>Otherwise, if the <var title="">field</var> element is an
+     <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#file-upload-state title=attr-input-type-file>File Upload</a> state, then for
+     each file <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected</a> in the
+     <code><a href=#the-input-element>input</a></code> element, append an entry to the <var title="">form data set</var> with the <var title="">name</var> as
+     the name, the file (consisting of the name, the type, and the
+     body) as the value, and <var title="">type</var> as the type. If
+     there are no <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected files</a>,
+     then append an entry to the <var title="">form data set</var>
+     with the <var title="">name</var> as the name, the empty string
+     as the value, and <code>application/octet-stream</code> as the
+     type.</li>
+     <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=529859 -->
+
+     <li><p>Otherwise, if the <var title="">field</var> element is an
+     <code><a href=#the-object-element>object</a></code> element: try to obtain a form submission
+     value from the <a href=#plugin>plugin</a><!-- using NPAPI's
+     NPP_GetValue() entry point with the NPPVformValue variable -->,
+     and if that is successful, append an entry to the <var title="">form data set</var> with <var title="">name</var> as the
+     name, the returned form submission value as the value, and the
+     string "<code title="">object</code>" as the type.</li>
+
+     <li><p>Otherwise, append an entry to the <var title="">form data
+     set</var> with <var title="">name</var> as the name, the <a href=#concept-fe-value title=concept-fe-value>value</a> of the <var title="">field</var> element as the value, and <var title="">type</var> as the type.</li>
+
+     <li>
+
+      <p>If the element has a <a href=#form-control-dirname-attribute>form control <code title="">dirname</code> attribute</a>, and that attribute's
+      value is not the empty string, then run these substeps:</p>
+
+      <ol><li><p>Let <var title="">dirname</var> be the value of the
+       element's <code title="">dirname</code> attribute.</li>
+
+       <li><p>Let <var title="">dir</var> be the string "<code title="">ltr</code>" if <a href=#the-directionality>the directionality</a> of the
+       element is '<a href=#concept-ltr title=concept-ltr>ltr</a>', and "<code title="">rtl</code>" otherwise (i.e. when <a href=#the-directionality>the
+       directionality</a> of the element is '<a href=#concept-rtl title=concept-rtl>rtl</a>').</li>
+
+       <li><p>Append an entry to the <var title="">form data set</var>
+       with <var title="">dirname</var> as the name, <var title="">dir</var> as the value, and the string "<code title="">direction</code>" as the type.</li>
+
+      </ol><p class=note>An element can only have a <a href=#form-control-dirname-attribute>form control
+      <code title="">dirname</code> attribute</a> if it is a
+      <code><a href=#the-textarea-element>textarea</a></code> element or an <code><a href=#the-input-element>input</a></code> element
+      whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in
+      either the <a href=#text-state-and-search-state title=attr-input-type-text>Text</a> state
+      or the <a href=#text-state-and-search-state title=attr-input-type-search>Search</a>
+      state.</p>
+
+     </li>
+
+    </ol></li>
+
+   <li><p><i>End</i>: Return the <var title="">form data
+   step</var>.</li>
+
+  </ol><h5 id=url-encoded-form-data><span class=secno>4.10.22.5 </span>URL-encoded form data</h5>
+
   <p>The <dfn id=application/x-www-form-urlencoded-encoding-algorithm><code title="">application/x-www-form-urlencoded</code> encoding
   algorithm</dfn> is as follows:</p>
 
@@ -49172,7 +49177,7 @@
 
   <div class=impl>
 
-  <h5 id=multipart-form-data><span class=secno>4.10.22.5 </span>Multipart form data</h5>
+  <h5 id=multipart-form-data><span class=secno>4.10.22.6 </span>Multipart form data</h5>
 
   <!-- http://hixie.ch/tests/adhoc/html/forms/submission/multipart_form-data/ -->
 
@@ -49266,7 +49271,7 @@
 
   <div class=impl>
 
-  <h5 id=plain-text-form-data><span class=secno>4.10.22.6 </span>Plain text form data</h5>
+  <h5 id=plain-text-form-data><span class=secno>4.10.22.7 </span>Plain text form data</h5>
 
   <p>The <dfn id=text/plain-encoding-algorithm><code title="">text/plain</code> encoding
   algorithm</dfn> is as follows:</p>

Modified: source
===================================================================
--- source	2011-03-04 01:02:20 UTC (rev 5936)
+++ source	2011-03-04 01:14:30 UTC (rev 5937)
@@ -54558,247 +54558,10 @@
 
    <!-- unlock -->
 
-   <li><p>Let <var title="">controls</var> be a list of all the <span
-   title="category-submit">submittable elements</span> whose
-   <span>form owner</span> is <var title="">form</var>, in <span>tree
-   order</span>.</p></li>
+   <li><p>Let <var title="">form data set</var> be the result of
+   <span>constructing the form data set</span> for <var
+   title="">form</var>.</p></li>
 
-   <li><p>Let the <var title="">form data set</var> be a list of
-   name-value-type tuples, initially empty.</p></li>
-
-   <li id="constructing-form-data-set">
-
-    <p><strong>Constructing the form data set</strong>. For each
-    element <var title="">field</var> in <var title="">controls</var>,
-    in <span>tree order</span>, run the following substeps:</p>
-
-    <ol>
-
-     <li>
-
-      <p>If any of the following conditions are met, then skip these
-      substeps for this element:</p>
-
-      <ul>
-
-       <li>The <var title="">field</var> element has a
-       <code>datalist</code> element ancestor.</li>
-
-       <li>The <var title="">field</var> element is <span
-       title="concept-fe-disabled">disabled</span>.</li>
-
-       <li>The <var title="">field</var> element is a <span
-       title="concept-button">button</span> but it is not <var
-       title="">submitter</var>.</li>
-
-       <li>The <var title="">field</var> element is an
-       <code>input</code> element whose <code
-       title="attr-input-type">type</code> attribute is in the <span
-       title="attr-input-type-checkbox">Checkbox</span> state and
-       whose <span title="concept-fe-checked">checkedness</span> is
-       false.</li>
-
-       <li>The <var title="">field</var> element is an
-       <code>input</code> element whose <code
-       title="attr-input-type">type</code> attribute is in the <span
-       title="attr-input-type-radio">Radio Button</span> state and
-       whose <span title="concept-fe-checked">checkedness</span> is
-       false.</li>
-
-       <li>The <var title="">field</var> element is not an
-       <code>input</code> element whose <code
-       title="attr-input-type">type</code> attribute is in the <span
-       title="attr-input-type-image">Image Button</span> state, and
-       either the <var title="">field</var> element does not have a
-       <code title="attr-fe-name">name</code> attribute specified, or
-       its <code title="attr-fe-name">name</code> attribute's value is
-       the empty string.</li>
-
-       <li>The <var title="">field</var> element is an
-       <code>object</code> element that is not using a
-       <span>plugin</span>.</li>
-
-      </ul>
-
-      <p>Otherwise, process <var title="">field</var> as follows:</p>
-
-     </li>
-
-     <li><p>Let <var title="">type</var> be the value of the <code
-     title="">type</code> IDL attribute of <var
-     title="">field</var>.</p></li> <!-- if the field is an <object>
-     element, this will get ignored. -->
-
-     <li>
-
-      <p>If the <var title="">field</var> element is an
-      <code>input</code> element whose <code
-      title="attr-input-type">type</code> attribute is in the <span
-      title="attr-input-type-image">Image Button</span> state,
-      then run these further nested substeps:</p>
-
-      <ol>
-
-       <li><p>If the <var title="">field</var> element has a <code
-       title="attr-fe-name">name</code> attribute specified and its
-       value is not the empty string, let <var title="">name</var> be
-       that value followed by a single U+002E FULL STOP character (.).
-       Otherwise, let <var title="">name</var> be the empty
-       string.</p></li>
-
-       <li><p>Let <var title="">name<sub title="">x</sub></var> be the
-       string consisting of the concatenation of <var
-       title="">name</var> and a single U+0078 LATIN SMALL LETTER X
-       character (x).</p></li>
-
-       <li><p>Let <var title="">name<sub title="">y</sub></var> be the
-       string consisting of the concatenation of <var
-       title="">name</var> and a single U+0079 LATIN SMALL LETTER Y
-       character (y).</p></li>
-
-       <li><p>The <var title="">field</var> element is <var
-       title="">submitter</var>, and before this algorithm was invoked
-       the user <span
-       title="concept-input-type-image-coordinate">indicated a
-       coordinate</span>. Let <var title="">x</var> be the <var
-       title="">x</var>-component of the coordinate selected by the
-       user, and let <var title="">y</var> be the <var
-       title="">y</var>-component of the coordinate selected by the
-       user.</p></li>
-
-       <li><p>Append an entry to the <var title="">form data set</var>
-       with the name <var title="">name<sub title="">x</sub></var>,
-       the value <var title="">x</var>, and the type <var
-       title="">type</var>.</p></li>
-
-       <li><p>Append an entry to the <var title="">form data set</var>
-       with the name <var title="">name<sub title="">y</sub></var> and
-       the value <var title="">y</var>, and the type <var
-       title="">type</var>.</p></li>
-
-       <li><p>Skip the remaining substeps for this element: if there
-       are any more elements in <var title="">controls</var>, return
-       to the top of the <a
-       href="#constructing-form-data-set">constructing the form data
-       set</a> step, otherwise, jump to the next step in the overall
-       form submission algorithm.</p></li>
-
-      </ol>
-
-     </li>
-
-     <li><p>Let <var title="">name</var> be the value of the <var
-     title="">field</var> element's <code
-     title="attr-fe-name">name</code> attribute.</p></li>
-
-     <li><p>If the <var title="">field</var> element is a
-     <code>select</code> element, then for each <code>option</code>
-     element in the <code>select</code> element whose <span
-     title="concept-option-selectedness">selectedness</span> is true,
-     append an entry to the <var title="">form data set</var> with the
-     <var title="">name</var> as the name, the <span
-     title="concept-option-value">value</span> of the
-     <code>option</code> element as the value, and <var
-     title="">type</var> as the type.</p></li>
-
-     <li>
-
-      <p>Otherwise, if the <var title="">field</var> element is an
-      <code>input</code> element whose <code
-      title="attr-input-type">type</code> attribute is in the <span
-      title="attr-input-type-checkbox">Checkbox</span> state or the
-      <span title="attr-input-type-radio">Radio Button</span> state,
-      then run these further nested substeps:</p>
-
-      <ol>
-
-       <li><p>If the <var title="">field</var> element has a <code
-       title="attr-input-value">value</code> attribute specified, then
-       let <var title="">value</var> be the value of that attribute;
-       otherwise, let <var title="">value</var> be the string
-       "<code title="">on</code>".</p></li>
-
-       <li><p>Append an entry to the <var title="">form data set</var>
-       with <var title="">name</var> as the name, <var
-       title="">value</var> as the value, and <var title="">type</var>
-       as the type.</p></li>
-
-      </ol>
-
-     </li>
-
-     <li><p>Otherwise, if the <var title="">field</var> element is an
-     <code>input</code> element whose <code
-     title="attr-input-type">type</code> attribute is in the <span
-     title="attr-input-type-file">File Upload</span> state, then for
-     each file <span
-     title="concept-input-type-file-selected">selected</span> in the
-     <code>input</code> element, append an entry to the <var
-     title="">form data set</var> with the <var title="">name</var> as
-     the name, the file (consisting of the name, the type, and the
-     body) as the value, and <var title="">type</var> as the type. If
-     there are no <span
-     title="concept-input-type-file-selected">selected files</span>,
-     then append an entry to the <var title="">form data set</var>
-     with the <var title="">name</var> as the name, the empty string
-     as the value, and <code>application/octet-stream</code> as the
-     type.</p></li>
-     <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=529859 -->
-
-     <li><p>Otherwise, if the <var title="">field</var> element is an
-     <code>object</code> element: try to obtain a form submission
-     value from the <span>plugin</span><!-- using NPAPI's
-     NPP_GetValue() entry point with the NPPVformValue variable -->,
-     and if that is successful, append an entry to the <var
-     title="">form data set</var> with <var title="">name</var> as the
-     name, the returned form submission value as the value, and the
-     string "<code title="">object</code>" as the type.</p></li>
-
-     <li><p>Otherwise, append an entry to the <var title="">form data
-     set</var> with <var title="">name</var> as the name, the <span
-     title="concept-fe-value">value</span> of the <var
-     title="">field</var> element as the value, and <var
-     title="">type</var> as the type.</p></li>
-
-     <li>
-
-      <p>If the element has a <span>form control <code
-      title="">dirname</code> attribute</span>, and that attribute's
-      value is not the empty string, then run these substeps:</p>
-
-      <ol>
-
-       <li><p>Let <var title="">dirname</var> be the value of the
-       element's <code title="">dirname</code> attribute.</p></li>
-
-       <li><p>Let <var title="">dir</var> be the string "<code
-       title="">ltr</code>" if <span>the directionality</span> of the
-       element is '<span title="concept-ltr">ltr</span>', and "<code
-       title="">rtl</code>" otherwise (i.e. when <span>the
-       directionality</span> of the element is '<span
-       title="concept-rtl">rtl</span>').</p></li>
-
-       <li><p>Append an entry to the <var title="">form data set</var>
-       with <var title="">dirname</var> as the name, <var
-       title="">dir</var> as the value, and the string "<code
-       title="">direction</code>" as the type.</p></li>
-
-      </ol>
-
-      <p class="note">An element can only have a <span>form control
-      <code title="">dirname</code> attribute</span> if it is a
-      <code>textarea</code> element or an <code>input</code> element
-      whose <code title="attr-input-type">type</code> attribute is in
-      either the <span title="attr-input-type-text">Text</span> state
-      or the <span title="attr-input-type-search">Search</span>
-      state.</p>
-
-     </li>
-
-    </ol>
-
-   </li>
-
    <li><p>Let <var title="">action</var> be the <var
    title="">submitter</var> element's <span
    title="concept-fs-action">action</span>.</p></li>
@@ -55131,11 +54894,260 @@
 
   </ol>
 
-  </div>
 
+  <h5 id="constructing-form-data-set">Constructing the form data set</h5>
 
-  <div class="impl">
+  <p>The algorithm to <dfn title="constructing the form data
+  set">construct the form data set</dfn> for a form <var
+  title="">form</var> is as follows:</p>
 
+  <ol>
+
+   <li><p>Let <var title="">controls</var> be a list of all the <span
+   title="category-submit">submittable elements</span> whose
+   <span>form owner</span> is <var title="">form</var>, in <span>tree
+   order</span>.</p></li>
+
+   <li><p>Let the <var title="">form data set</var> be a list of
+   name-value-type tuples, initially empty.</p></li>
+
+   <li>
+
+    <p><i>Loop</i>: For each element <var title="">field</var> in <var
+    title="">controls</var>, in <span>tree order</span>, run the
+    following substeps:</p>
+
+    <ol>
+
+     <li>
+
+      <p>If any of the following conditions are met, then skip these
+      substeps for this element:</p>
+
+      <ul>
+
+       <li>The <var title="">field</var> element has a
+       <code>datalist</code> element ancestor.</li>
+
+       <li>The <var title="">field</var> element is <span
+       title="concept-fe-disabled">disabled</span>.</li>
+
+       <li>The <var title="">field</var> element is a <span
+       title="concept-button">button</span> but it is not <var
+       title="">submitter</var>.</li>
+
+       <li>The <var title="">field</var> element is an
+       <code>input</code> element whose <code
+       title="attr-input-type">type</code> attribute is in the <span
+       title="attr-input-type-checkbox">Checkbox</span> state and
+       whose <span title="concept-fe-checked">checkedness</span> is
+       false.</li>
+
+       <li>The <var title="">field</var> element is an
+       <code>input</code> element whose <code
+       title="attr-input-type">type</code> attribute is in the <span
+       title="attr-input-type-radio">Radio Button</span> state and
+       whose <span title="concept-fe-checked">checkedness</span> is
+       false.</li>
+
+       <li>The <var title="">field</var> element is not an
+       <code>input</code> element whose <code
+       title="attr-input-type">type</code> attribute is in the <span
+       title="attr-input-type-image">Image Button</span> state, and
+       either the <var title="">field</var> element does not have a
+       <code title="attr-fe-name">name</code> attribute specified, or
+       its <code title="attr-fe-name">name</code> attribute's value is
+       the empty string.</li>
+
+       <li>The <var title="">field</var> element is an
+       <code>object</code> element that is not using a
+       <span>plugin</span>.</li>
+
+      </ul>
+
+      <p>Otherwise, process <var title="">field</var> as follows:</p>
+
+     </li>
+
+     <li><p>Let <var title="">type</var> be the value of the <code
+     title="">type</code> IDL attribute of <var
+     title="">field</var>.</p></li> <!-- if the field is an <object>
+     element, this will get ignored. -->
+
+     <li>
+
+      <p>If the <var title="">field</var> element is an
+      <code>input</code> element whose <code
+      title="attr-input-type">type</code> attribute is in the <span
+      title="attr-input-type-image">Image Button</span> state,
+      then run these further nested substeps:</p>
+
+      <ol>
+
+       <li><p>If the <var title="">field</var> element has a <code
+       title="attr-fe-name">name</code> attribute specified and its
+       value is not the empty string, let <var title="">name</var> be
+       that value followed by a single U+002E FULL STOP character (.).
+       Otherwise, let <var title="">name</var> be the empty
+       string.</p></li>
+
+       <li><p>Let <var title="">name<sub title="">x</sub></var> be the
+       string consisting of the concatenation of <var
+       title="">name</var> and a single U+0078 LATIN SMALL LETTER X
+       character (x).</p></li>
+
+       <li><p>Let <var title="">name<sub title="">y</sub></var> be the
+       string consisting of the concatenation of <var
+       title="">name</var> and a single U+0079 LATIN SMALL LETTER Y
+       character (y).</p></li>
+
+       <li><p>The <var title="">field</var> element is <var
+       title="">submitter</var>, and before this algorithm was invoked
+       the user <span
+       title="concept-input-type-image-coordinate">indicated a
+       coordinate</span>. Let <var title="">x</var> be the <var
+       title="">x</var>-component of the coordinate selected by the
+       user, and let <var title="">y</var> be the <var
+       title="">y</var>-component of the coordinate selected by the
+       user.</p></li>
+
+       <li><p>Append an entry to the <var title="">form data set</var>
+       with the name <var title="">name<sub title="">x</sub></var>,
+       the value <var title="">x</var>, and the type <var
+       title="">type</var>.</p></li>
+
+       <li><p>Append an entry to the <var title="">form data set</var>
+       with the name <var title="">name<sub title="">y</sub></var> and
+       the value <var title="">y</var>, and the type <var
+       title="">type</var>.</p></li>
+
+       <li><p>Skip the remaining substeps for this element: if there
+       are any more elements in <var title="">controls</var>, return
+       to the top of the <i>loop</i> step, otherwise, jump to the
+       <i>end</i> step below.</p></li>
+
+      </ol>
+
+     </li>
+
+     <li><p>Let <var title="">name</var> be the value of the <var
+     title="">field</var> element's <code
+     title="attr-fe-name">name</code> attribute.</p></li>
+
+     <li><p>If the <var title="">field</var> element is a
+     <code>select</code> element, then for each <code>option</code>
+     element in the <code>select</code> element whose <span
+     title="concept-option-selectedness">selectedness</span> is true,
+     append an entry to the <var title="">form data set</var> with the
+     <var title="">name</var> as the name, the <span
+     title="concept-option-value">value</span> of the
+     <code>option</code> element as the value, and <var
+     title="">type</var> as the type.</p></li>
+
+     <li>
+
+      <p>Otherwise, if the <var title="">field</var> element is an
+      <code>input</code> element whose <code
+      title="attr-input-type">type</code> attribute is in the <span
+      title="attr-input-type-checkbox">Checkbox</span> state or the
+      <span title="attr-input-type-radio">Radio Button</span> state,
+      then run these further nested substeps:</p>
+
+      <ol>
+
+       <li><p>If the <var title="">field</var> element has a <code
+       title="attr-input-value">value</code> attribute specified, then
+       let <var title="">value</var> be the value of that attribute;
+       otherwise, let <var title="">value</var> be the string
+       "<code title="">on</code>".</p></li>
+
+       <li><p>Append an entry to the <var title="">form data set</var>
+       with <var title="">name</var> as the name, <var
+       title="">value</var> as the value, and <var title="">type</var>
+       as the type.</p></li>
+
+      </ol>
+
+     </li>
+
+     <li><p>Otherwise, if the <var title="">field</var> element is an
+     <code>input</code> element whose <code
+     title="attr-input-type">type</code> attribute is in the <span
+     title="attr-input-type-file">File Upload</span> state, then for
+     each file <span
+     title="concept-input-type-file-selected">selected</span> in the
+     <code>input</code> element, append an entry to the <var
+     title="">form data set</var> with the <var title="">name</var> as
+     the name, the file (consisting of the name, the type, and the
+     body) as the value, and <var title="">type</var> as the type. If
+     there are no <span
+     title="concept-input-type-file-selected">selected files</span>,
+     then append an entry to the <var title="">form data set</var>
+     with the <var title="">name</var> as the name, the empty string
+     as the value, and <code>application/octet-stream</code> as the
+     type.</p></li>
+     <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=529859 -->
+
+     <li><p>Otherwise, if the <var title="">field</var> element is an
+     <code>object</code> element: try to obtain a form submission
+     value from the <span>plugin</span><!-- using NPAPI's
+     NPP_GetValue() entry point with the NPPVformValue variable -->,
+     and if that is successful, append an entry to the <var
+     title="">form data set</var> with <var title="">name</var> as the
+     name, the returned form submission value as the value, and the
+     string "<code title="">object</code>" as the type.</p></li>
+
+     <li><p>Otherwise, append an entry to the <var title="">form data
+     set</var> with <var title="">name</var> as the name, the <span
+     title="concept-fe-value">value</span> of the <var
+     title="">field</var> element as the value, and <var
+     title="">type</var> as the type.</p></li>
+
+     <li>
+
+      <p>If the element has a <span>form control <code
+      title="">dirname</code> attribute</span>, and that attribute's
+      value is not the empty string, then run these substeps:</p>
+
+      <ol>
+
+       <li><p>Let <var title="">dirname</var> be the value of the
+       element's <code title="">dirname</code> attribute.</p></li>
+
+       <li><p>Let <var title="">dir</var> be the string "<code
+       title="">ltr</code>" if <span>the directionality</span> of the
+       element is '<span title="concept-ltr">ltr</span>', and "<code
+       title="">rtl</code>" otherwise (i.e. when <span>the
+       directionality</span> of the element is '<span
+       title="concept-rtl">rtl</span>').</p></li>
+
+       <li><p>Append an entry to the <var title="">form data set</var>
+       with <var title="">dirname</var> as the name, <var
+       title="">dir</var> as the value, and the string "<code
+       title="">direction</code>" as the type.</p></li>
+
+      </ol>
+
+      <p class="note">An element can only have a <span>form control
+      <code title="">dirname</code> attribute</span> if it is a
+      <code>textarea</code> element or an <code>input</code> element
+      whose <code title="attr-input-type">type</code> attribute is in
+      either the <span title="attr-input-type-text">Text</span> state
+      or the <span title="attr-input-type-search">Search</span>
+      state.</p>
+
+     </li>
+
+    </ol>
+
+   </li>
+
+   <li><p><i>End</i>: Return the <var title="">form data
+   step</var>.</p></li>
+
+  </ol>
+
+
   <h5>URL-encoded form data</h5>
 
   <p>The <dfn><code




More information about the Commit-Watchers mailing list