Backed out 3 changesets (bug 1351193) for landing with the wrong reviewer name
authorDorel Luca <dluca@mozilla.com>
Sat, 02 Jun 2018 17:51:30 +0300
changeset 421085 561dd8c84f8576b2c55286fec1937539c15a31d6
parent 421084 7305a574730685a9dee4a6cfdf0c2aad6d0de081
child 421086 fdac47b8ef20d45c7828f2185c063ee92019c5a0
push id34088
push userdluca@mozilla.com
push dateMon, 04 Jun 2018 17:56:32 +0000
treeherdermozilla-central@5b15326286d4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1351193
milestone62.0a1
backs outcc8d552173981747b96c95bd2b0953d685ad7947
b05e943f8d2ca718a02895997fd30fcf9a9470d9
94ffa7844ae7ab8053c22028d9b2cb9f7fc571e5
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 3 changesets (bug 1351193) for landing with the wrong reviewer name Backed out changeset cc8d55217398 (bug 1351193) Backed out changeset b05e943f8d2c (bug 1351193) Backed out changeset 94ffa7844ae7 (bug 1351193)
dom/bindings/test/test_dom_xrays.html
dom/events/DataTransfer.cpp
dom/events/DataTransfer.h
dom/webidl/DataTransfer.webidl
testing/web-platform/meta/FileAPI/file/send-file-form-iso-2022-jp.tentative.html.ini
testing/web-platform/meta/FileAPI/file/send-file-form-utf-8.html.ini
testing/web-platform/meta/FileAPI/file/send-file-form-windows-1252.tentative.html.ini
testing/web-platform/meta/FileAPI/file/send-file-form-x-user-defined.tentative.html.ini
testing/web-platform/meta/FileAPI/file/send-file-form.html.ini
testing/web-platform/meta/MANIFEST.json
testing/web-platform/meta/html/dom/interfaces.https.html.ini
testing/web-platform/meta/html/editing/dnd/datastore/datatransfer-constructor-001.html.ini
testing/web-platform/meta/html/editing/dnd/datastore/datatransfer-types.html.ini
testing/web-platform/meta/html/semantics/forms/form-submission-0/submit-file.sub.html.ini
testing/web-platform/tests/fetch/api/resources/echo-content.py
toolkit/content/tests/chrome/window_browser_drop.xul
--- a/dom/bindings/test/test_dom_xrays.html
+++ b/dom/bindings/test/test_dom_xrays.html
@@ -166,17 +166,17 @@ function test()
   ok(Object.isFrozen(languages2.wrappedJSObject),
      ".languages should still be a frozen array underneath");
   isnot(languages1, languages2, "Must have distinct arrays");
   isnot(languages1, languages2.wrappedJSObject,
         "Must have distinct arrays no matter how we slice it");
 
   // Check that DataTransfer's .types has the hack to alias contains()
   // to includes().
-  var dataTransfer = new win.DataTransfer();
+  var dataTransfer = new win.DataTransfer("foo", true);
   is(dataTransfer.types.contains, dataTransfer.types.includes,
      "Should have contains() set up as an alias to includes()");
   // Waive Xrays on the dataTransfer itself, since the .types we get is
   // different over Xrays vs not.
   is(dataTransfer.wrappedJSObject.types.contains, undefined,
      "Underlying object should not have contains() set up as an alias to " +
      "includes()");
 
--- a/dom/events/DataTransfer.cpp
+++ b/dom/events/DataTransfer.cpp
@@ -192,22 +192,32 @@ DataTransfer::DataTransfer(nsISupports* 
                "invalid event type for DataTransfer constructor");
 }
 
 DataTransfer::~DataTransfer()
 {}
 
 // static
 already_AddRefed<DataTransfer>
-DataTransfer::Constructor(const GlobalObject& aGlobal, ErrorResult& aRv)
+DataTransfer::Constructor(const GlobalObject& aGlobal,
+                          const nsAString& aEventType, bool aIsExternal,
+                          ErrorResult& aRv)
 {
+  nsAutoCString onEventType("on");
+  AppendUTF16toUTF8(aEventType, onEventType);
+  RefPtr<nsAtom> eventTypeAtom = NS_Atomize(onEventType);
+  if (!eventTypeAtom) {
+    aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
+    return nullptr;
+  }
 
+  EventMessage eventMessage = nsContentUtils::GetEventMessage(eventTypeAtom);
   RefPtr<DataTransfer> transfer = new DataTransfer(aGlobal.GetAsSupports(),
-                                                   eCopy, /* is external */ false, /* clipboard type */ -1);
-  transfer->mEffectAllowed = nsIDragService::DRAGDROP_ACTION_NONE;
+                                                     eventMessage, aIsExternal,
+                                                     -1);
   return transfer.forget();
 }
 
 JSObject*
 DataTransfer::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
 {
   return DataTransferBinding::Wrap(aCx, this, aGivenProto);
 }
--- a/dom/events/DataTransfer.h
+++ b/dom/events/DataTransfer.h
@@ -114,17 +114,18 @@ public:
     MOZ_ASSERT(aNewParent);
     // Setting the parent after we've been wrapped is pointless, so
     // make sure we aren't wrapped yet.
     MOZ_ASSERT(!GetWrapperPreserveColor());
     mParent = aNewParent;
   }
 
   static already_AddRefed<DataTransfer>
-  Constructor(const GlobalObject& aGlobal, ErrorResult& aRv);
+  Constructor(const GlobalObject& aGlobal, const nsAString& aEventType,
+              bool aIsExternal, ErrorResult& aRv);
 
   /**
    * The actual effect that will be used, and should always be one of the
    * possible values of effectAllowed.
    *
    * For dragstart, drag and dragleave events, the dropEffect is initialized
    * to none. Any value assigned to the dropEffect will be set, but the value
    * isn't used for anything.
--- a/dom/webidl/DataTransfer.webidl
+++ b/dom/webidl/DataTransfer.webidl
@@ -2,17 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is:
  * http://www.whatwg.org/specs/web-apps/current-work/#the-datatransfer-interface
  */
 
-[Constructor]
+[ChromeConstructor(DOMString eventType, boolean isExternal)]
 interface DataTransfer {
            attribute DOMString dropEffect;
            attribute DOMString effectAllowed;
 
   readonly attribute DataTransferItemList items;
 
   void setDragImage(Element image, long x, long y);
 
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/FileAPI/file/send-file-form-iso-2022-jp.tentative.html.ini
@@ -0,0 +1,19 @@
+[send-file-form-iso-2022-jp.tentative.html]
+  [Upload file-for-upload-in-form.txt (ASCII) in ISO-2022-JP form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-.txt (x-user-defined) in ISO-2022-JP form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-☺😂.txt (windows-1252) in ISO-2022-JP form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in ISO-2022-JP form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-☺😂.txt (Unicode) in ISO-2022-JP form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in ISO-2022-JP form]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/FileAPI/file/send-file-form-utf-8.html.ini
@@ -0,0 +1,19 @@
+[send-file-form-utf-8.html]
+  [Upload file-for-upload-in-form.txt (ASCII) in UTF-8 form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-.txt (x-user-defined) in UTF-8 form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-☺😂.txt (windows-1252) in UTF-8 form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in UTF-8 form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-☺😂.txt (Unicode) in UTF-8 form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in UTF-8 form]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/FileAPI/file/send-file-form-windows-1252.tentative.html.ini
@@ -0,0 +1,19 @@
+[send-file-form-windows-1252.tentative.html]
+  [Upload file-for-upload-in-form.txt (ASCII) in windows-1252 form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-.txt (x-user-defined) in windows-1252 form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-☺😂.txt (windows-1252) in windows-1252 form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in windows-1252 form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-☺😂.txt (Unicode) in windows-1252 form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in windows-1252 form]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/FileAPI/file/send-file-form-x-user-defined.tentative.html.ini
@@ -0,0 +1,19 @@
+[send-file-form-x-user-defined.tentative.html]
+  [Upload file-for-upload-in-form.txt (ASCII) in x-user-defined form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-.txt (x-user-defined) in x-user-defined form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-☺😂.txt (windows-1252) in x-user-defined form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in x-user-defined form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-☺😂.txt (Unicode) in x-user-defined form]
+    expected: FAIL
+
+  [Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in x-user-defined form]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/FileAPI/file/send-file-form.html.ini
@@ -0,0 +1,4 @@
+[send-file-form.html]
+  [Upload file-for-upload-in-form.txt (ASCII) in UTF-8 form]
+    expected: FAIL
+
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -564344,17 +564344,17 @@
    "90d51a5e46cc58404dd5ec1e9e4e10934a6c0707",
    "support"
   ],
   "fetch/api/resources/data.json": [
    "6418064de426ecf8f0e508c751e60a0079ba044d",
    "support"
   ],
   "fetch/api/resources/echo-content.py": [
-   "df8169fcbb5312760a7bff3bd3c9b2e0612a5013",
+   "edc7a1d75d7c438ca3cca59f81d03058b3c2758f",
    "support"
   ],
   "fetch/api/resources/empty.txt": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "fetch/api/resources/infinite-slow-response.py": [
    "dee0fa986bf9ce4fd5cd5127a9945caf1b1a4e6f",
--- a/testing/web-platform/meta/html/dom/interfaces.https.html.ini
+++ b/testing/web-platform/meta/html/dom/interfaces.https.html.ini
@@ -1077,16 +1077,19 @@
     expected: FAIL
 
   [OffscreenCanvasRenderingContext2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, boolean)]
     expected: FAIL
 
   [OffscreenCanvasRenderingContext2D interface: operation ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, boolean)]
     expected: FAIL
 
+  [DataTransfer interface object length]
+    expected: FAIL
+
   [Window interface: attribute oncancel]
     expected: FAIL
 
   [Window interface: attribute oncuechange]
     expected: FAIL
 
   [Window interface: attribute onsecuritypolicyviolation]
     expected: FAIL
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/html/editing/dnd/datastore/datatransfer-constructor-001.html.ini
@@ -0,0 +1,4 @@
+[datatransfer-constructor-001.html]
+  [Verify DataTransfer constructor]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/html/editing/dnd/datastore/datatransfer-types.html.ini
@@ -0,0 +1,13 @@
+[datatransfer-types.html]
+  [type's state on DataTransfer creation]
+    expected: FAIL
+
+  [Relationship between types and items]
+    expected: FAIL
+
+  [type's identity]
+    expected: FAIL
+
+  [Verify type is a read-only attribute]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/html/semantics/forms/form-submission-0/submit-file.sub.html.ini
@@ -0,0 +1,4 @@
+[submit-file.sub.html]
+  [Posting a File]
+    expected: FAIL
+
--- a/testing/web-platform/tests/fetch/api/resources/echo-content.py
+++ b/testing/web-platform/tests/fetch/api/resources/echo-content.py
@@ -1,10 +1,9 @@
 def main(request, response):
 
     headers = [("X-Request-Method", request.method),
                ("X-Request-Content-Length", request.headers.get("Content-Length", "NO")),
-               ("X-Request-Content-Type", request.headers.get("Content-Type", "NO")),
-               # Avoid any kind of content sniffing on the response.
-               ("Content-Type", "text/plain")]
+               ("X-Request-Content-Type", request.headers.get("Content-Type", "NO"))]
+
     content = request.body
 
     return headers, content
--- a/toolkit/content/tests/chrome/window_browser_drop.xul
+++ b/toolkit/content/tests/chrome/window_browser_drop.xul
@@ -26,17 +26,17 @@ function dropOnRemoteBrowserAsync(browse
         let onload = function() {
           content.window.removeEventListener("load", onload);
           resolve();
         };
         content.window.addEventListener("load", onload);
       });
     }
 
-    let dataTransfer = new content.DataTransfer();
+    let dataTransfer = new content.DataTransfer("dragstart", false);
     for (let i = 0; i < data.length; i++) {
       let types = data[i];
       for (let j = 0; j < types.length; j++) {
         dataTransfer.mozSetDataAt(types[j].type, types[j].data, i);
       }
     }
     let event = content.document.createEvent("DragEvent");
     event.initDragEvent("drop", true, true, content, 0, 0, 0, 0, 0,
@@ -161,16 +161,28 @@ async function dropLinksOnBrowser(browse
                     [ { url: "http://www.mozilla.org/",
                         name: "Mozilla.org" },
                       { url: "http://www.example.com/",
                         name: "Example.com" } ],
                     [ [ { type: "text/x-moz-url",
                           data: "http://www.mozilla.org/\nMozilla.org\nhttp://www.example.com/\nExample.com" } ] ],
                     "text/x-moz-url with 2 URLs drop on browser " + type);
 
+  // Dropping multiple items should open multiple pages.
+  await expectLink(browser,
+                    [ { url: "http://www.example.com/",
+                        name: "Example.com" },
+                      { url: "http://www.mozilla.org/",
+                        name: "http://www.mozilla.org/" }],
+                    [ [ { type: "text/x-moz-url",
+                          data: "http://www.example.com/\nExample.com" } ],
+                      [ { type: "text/plain",
+                          data: "http://www.mozilla.org/" } ] ],
+                    "text/x-moz-url and text/plain drop on browser " + type);
+
   // Dropping single item with multiple types should open single page.
   await expectLink(browser,
                     [ { url: "http://www.example.org/",
                         name: "Example.com" } ],
                     [ [ { type: "text/plain",
                           data: "http://www.mozilla.org/" },
                         { type: "text/x-moz-url",
                           data: "http://www.example.org/\nExample.com" } ] ],