[html5] r4977 - [giow] (0) Update the form submission algorithm to match reality more closely.

whatwg at whatwg.org whatwg at whatwg.org
Mon Apr 5 18:48:49 PDT 2010


Author: ianh
Date: 2010-04-05 18:48:47 -0700 (Mon, 05 Apr 2010)
New Revision: 4977

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Update the form submission algorithm to match reality more closely.

Modified: complete.html
===================================================================
--- complete.html	2010-04-06 00:52:16 UTC (rev 4976)
+++ complete.html	2010-04-06 01:48:47 UTC (rev 4977)
@@ -41735,10 +41735,6 @@
        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=#file-upload-state title=attr-input-type-file>File Upload</a> state but
-       the control does not have any files selected.</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>
 
@@ -41832,8 +41828,13 @@
      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 in 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.</li>
+     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 in the <var title="">form data set</var>
+     with the <var title="">name</var> as the name, the empty string
+     as the value, and <code title="">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
@@ -42350,7 +42351,10 @@
 
   <p>Each entry in the <var title="">form data set</var> is a
   <i>field</i>, the name of the entry is the <i>field name</i> and the
-  value of the entry is the <i>field value</i>.</p>
+  value of the entry is the <i>field value</i>, unless the entry's
+  name is "<code title="">_charset_</code>" and its type is "<code title="">hidden</code>", in which case the <i>field value</i> is the
+  character encoding used by the aforementioned algorithm to encode
+  the value of the field.</p>
 
   <p>The order of parts must be the same as the order of fields in the
   <var title="">form data set</var>. Multiple entries with the same

Modified: index
===================================================================
--- index	2010-04-06 00:52:16 UTC (rev 4976)
+++ index	2010-04-06 01:48:47 UTC (rev 4977)
@@ -41636,10 +41636,6 @@
        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=#file-upload-state title=attr-input-type-file>File Upload</a> state but
-       the control does not have any files selected.</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>
 
@@ -41733,8 +41729,13 @@
      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 in 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.</li>
+     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 in the <var title="">form data set</var>
+     with the <var title="">name</var> as the name, the empty string
+     as the value, and <code title="">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
@@ -42251,7 +42252,10 @@
 
   <p>Each entry in the <var title="">form data set</var> is a
   <i>field</i>, the name of the entry is the <i>field name</i> and the
-  value of the entry is the <i>field value</i>.</p>
+  value of the entry is the <i>field value</i>, unless the entry's
+  name is "<code title="">_charset_</code>" and its type is "<code title="">hidden</code>", in which case the <i>field value</i> is the
+  character encoding used by the aforementioned algorithm to encode
+  the value of the field.</p>
 
   <p>The order of parts must be the same as the order of fields in the
   <var title="">form data set</var>. Multiple entries with the same

Modified: source
===================================================================
--- source	2010-04-06 00:52:16 UTC (rev 4976)
+++ source	2010-04-06 01:48:47 UTC (rev 4977)
@@ -46540,12 +46540,6 @@
        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-file">File Upload</span> state but
-       the control does not have any files selected.</li>
-
-       <li>The <var title="">field</var> element is an
        <code>object</code> element that is not using a
        <span>plugin</span>.</li>
 
@@ -46676,8 +46670,14 @@
      <code>input</code> element, append an entry in 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.</p></li>
+     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 in the <var title="">form data set</var>
+     with the <var title="">name</var> as the name, the empty string
+     as the value, and <code title="">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
@@ -47303,7 +47303,11 @@
 
   <p>Each entry in the <var title="">form data set</var> is a
   <i>field</i>, the name of the entry is the <i>field name</i> and the
-  value of the entry is the <i>field value</i>.</p>
+  value of the entry is the <i>field value</i>, unless the entry's
+  name is "<code title="">_charset_</code>" and its type is "<code
+  title="">hidden</code>", in which case the <i>field value</i> is the
+  character encoding used by the aforementioned algorithm to encode
+  the value of the field.</p>
 
   <p>The order of parts must be the same as the order of fields in the
   <var title="">form data set</var>. Multiple entries with the same




More information about the Commit-Watchers mailing list