From 1a75845e67792418a7721d516266ad01a90f2062 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Mon, 27 Jun 2016 13:21:38 +0200 Subject: [PATCH] Remove web-incompatible simplifications of FormData MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Everything done by f9d4c255cb11ee6e80a310f5463a6b601c90376f is now reverted as it turned out nothing there would really stick. I should avoid experiments like this going forward without solid evidence since it’s just not worth the time and churn. Fixes #73. --- Overview.html | 63 +++++++++++++++++++++++++++++------------------ Overview.src.html | 61 ++++++++++++++++++++++++++++----------------- 2 files changed, 77 insertions(+), 47 deletions(-) diff --git a/Overview.html b/Overview.html index 9191ecc..51df74d 100644 --- a/Overview.html +++ b/Overview.html @@ -7,7 +7,7 @@

XMLHttpRequest

-

Living Standard — Last Updated 7 June 2016

+

Living Standard — Last Updated 27 June 2016

Participate: @@ -1928,7 +1928,7 @@

4.7 Events summary

5 Interface FormData

-
typedef (Blob or USVString) FormDataEntryValue;
+
typedef (File or USVString) FormDataEntryValue;
 
 [Constructor(optional HTMLFormElement form),
  Exposed=(Window,Worker)]
@@ -1960,6 +1960,34 @@ 

5 Interface value's name attribute. +

To create an entry for name, value, and optionally a +filename, run these steps: + +

    +
  1. Let entry be a new entry. + +

  2. Set entry's name to + name. + +

  3. If value is a Blob object and not a + File object, then set value to a new + File object, representing the same bytes, whose + name attribute value is + "blob". + + +

  4. If value is (now) a File object and + filename is given, then set value to a new + File object, representing the same bytes, whose + name attribute value is + filename. + +

  5. Set entry's value to + value. + +

  6. Return entry. +

+

The @@ -1981,15 +2009,10 @@

5 Interface File object whose contents are value and - name is filename. - +
  • Let entry be the result of creating an entry + with name, value, and filename if given. -

  • Append a new entry whose - name is name, and - value is value, to - context object's list of +

  • Append entry to context object's list of entries. @@ -2020,25 +2043,17 @@

    5 Interface File object whose contents are value and - name is filename. - - -
  • Let entry be a new entry - whose name is name, and - value is value. +

  • Let entry be the result of creating an entry + with name, value, and filename if given.

  • If there are any entries in context object's list of entries whose - name is name, replace - the first such entry with entry and - remove the others. + name is name, then replace the first such + entry with entry and remove the others. -

  • Otherwise, append entry to - context object's list of - entries. +

  • Otherwise, append entry to context object's + list of entries.

    The value pairs to iterate over are the diff --git a/Overview.src.html b/Overview.src.html index 3484f35..d6bb149 100644 --- a/Overview.src.html +++ b/Overview.src.html @@ -1880,7 +1880,7 @@

    Events summary

    Interface FormData

    -
    typedef (Blob or USVString) FormDataEntryValue;
    +
    typedef (File or USVString) FormDataEntryValue;
     
     [Constructor(optional HTMLFormElement form),
      Exposed=(Window,Worker)]
    @@ -1912,6 +1912,34 @@ 

    Interface FormData

    value's name attribute. +

    To create an entry for name, value, and optionally a +filename, run these steps: + +

      +
    1. Let entry be a new entry. + +

    2. Set entry's name to + name. + +

    3. If value is a Blob object and not a + File object, then set value to a new + File object, representing the same bytes, whose + name attribute value is + "blob". + + +

    4. If value is (now) a File object and + filename is given, then set value to a new + File object, representing the same bytes, whose + name attribute value is + filename. + +

    5. Set entry's value to + value. + +

    6. Return entry. +

    +

    The @@ -1933,15 +1961,10 @@

    Interface FormData

    method, when invoked, must run these steps:
      -
    1. If the filename argument is given, set value to a new - File object whose contents are value and - name is filename. - +

    2. Let entry be the result of creating an entry + with name, value, and filename if given. -

    3. Append a new entry whose - name is name, and - value is value, to - context object's list of +

    4. Append entry to context object's list of entries.

    @@ -1972,25 +1995,17 @@

    Interface FormData

    method, when invoked, must run these steps:
      -
    1. If the filename argument is given, set value to a new - File object whose contents are value and - name is filename. - - -

    2. Let entry be a new entry - whose name is name, and - value is value. +

    3. Let entry be the result of creating an entry + with name, value, and filename if given.

    4. If there are any entries in context object's list of entries whose - name is name, replace - the first such entry with entry and - remove the others. + name is name, then replace the first such + entry with entry and remove the others. -

    5. Otherwise, append entry to - context object's list of - entries. +

    6. Otherwise, append entry to context object's + list of entries.

    The value pairs to iterate over are the