Backed out changeset 8427667b7c9a (bug 1452569) for wpt failures on /dom/interfaces.html. CLOSED TREE
authorCosmin Sabou <csabou@mozilla.com>
Mon, 27 Aug 2018 12:23:22 +0300
changeset 481798 315e96b7fc527ecf3b85c8a634663bf6bb19fd00
parent 481797 5e3078b8f344be3a775b87ea5d1b16449e078960
child 481799 68454690d5b06835f541ef2477a5844e875be3c2
push id232
push userfmarier@mozilla.com
push dateWed, 05 Sep 2018 20:45:54 +0000
bugs1452569
milestone63.0a1
backs out8427667b7c9aef4aa8ece1f27254ac9332c6a62c
Backed out changeset 8427667b7c9a (bug 1452569) for wpt failures on /dom/interfaces.html. CLOSED TREE
dom/events/Event.cpp
dom/events/Event.h
dom/webidl/Event.webidl
testing/web-platform/meta/dom/events/AddEventListenerOptions-passive.html.ini
testing/web-platform/meta/dom/events/Event-constructors.html.ini
testing/web-platform/meta/dom/events/Event-defaultPrevented-after-dispatch.html.ini
testing/web-platform/meta/dom/events/Event-initEvent.html.ini
testing/web-platform/meta/dom/events/Event-returnValue.html.ini
testing/web-platform/meta/dom/events/EventTarget-dispatchEvent-returnvalue.html.ini
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -998,30 +998,16 @@ Event::DefaultPrevented(CallerType aCall
 
   // If preventDefault() has been called by content, return true.  Otherwise,
   // i.e., preventDefault() has been called by chrome, return true only when
   // this is called by chrome.
   return mEvent->DefaultPreventedByContent() ||
          aCallerType == CallerType::System;
 }
 
-bool
-Event::ReturnValue(CallerType aCallerType) const
-{
-  return !DefaultPrevented(aCallerType);
-}
-
-void
-Event::SetReturnValue(bool aReturnValue, CallerType aCallerType)
-{
-  if (!aReturnValue) {
-    PreventDefaultInternal(aCallerType == CallerType::System);
-  }
-}
-
 double
 Event::TimeStamp()
 {
   if (!sReturnHighResTimeStamp) {
     // In the situation where you have set a very old, not-very-supported
     // non-default preference, we will always reduce the precision,
     // regardless of system principal or not.
     // The timestamp is absolute, so we supply a zero context mix-in.
--- a/dom/events/Event.h
+++ b/dom/events/Event.h
@@ -276,20 +276,16 @@ public:
     return mEvent->mFlags.mDefaultPreventedByContent;
   }
 
   bool MultipleActionsPrevented() const
   {
     return mEvent->mFlags.mMultipleActionsPrevented;
   }
 
-  bool ReturnValue(CallerType aCallerType) const;
-
-  void SetReturnValue(bool aReturnValue, CallerType aCallerType);
-
   bool IsTrusted() const
   {
     return mEvent->IsTrusted();
   }
 
   bool IsSynthesized() const
   {
     return mEvent->mFlags.mIsSynthesizedForTests;
--- a/dom/webidl/Event.webidl
+++ b/dom/webidl/Event.webidl
@@ -32,18 +32,16 @@ interface Event {
   void stopPropagation();
   void stopImmediatePropagation();
 
   [Pure]
   readonly attribute boolean bubbles;
   [Pure]
   readonly attribute boolean cancelable;
   [NeedsCallerType]
-  attribute boolean returnValue;
-  [NeedsCallerType]
   void preventDefault();
   [Pure, NeedsCallerType]
   readonly attribute boolean defaultPrevented;
   [ChromeOnly, Pure]
   readonly attribute boolean defaultPreventedByChrome;
   [ChromeOnly, Pure]
   readonly attribute boolean defaultPreventedByContent;
   [Pure]
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/dom/events/AddEventListenerOptions-passive.html.ini
@@ -0,0 +1,4 @@
+[AddEventListenerOptions-passive.html]
+  [returnValue should be ignored if-and-only-if the passive option is true]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/dom/events/Event-constructors.html.ini
@@ -0,0 +1,7 @@
+[Event-constructors.html]
+  [Event constructors 2]
+    expected: FAIL
+
+  [Event constructors 3]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/dom/events/Event-defaultPrevented-after-dispatch.html.ini
@@ -0,0 +1,4 @@
+[Event-defaultPrevented-after-dispatch.html]
+  [Default prevention via returnValue]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/dom/events/Event-initEvent.html.ini
@@ -0,0 +1,13 @@
+[Event-initEvent.html]
+  [Properties of initEvent(type, true, true)]
+    expected: FAIL
+
+  [Properties of initEvent(type, true, false)]
+    expected: FAIL
+
+  [Properties of initEvent(type, false, true)]
+    expected: FAIL
+
+  [Properties of initEvent(type, false, false)]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/dom/events/Event-returnValue.html.ini
@@ -0,0 +1,19 @@
+[Event-returnValue.html]
+  [When an event is created, returnValue should be initialized to true.]
+    expected: FAIL
+
+  [preventDefault() should not change returnValue if cancelable is false.]
+    expected: FAIL
+
+  [returnValue=false should have no effect if cancelable is false.]
+    expected: FAIL
+
+  [preventDefault() should change returnValue if cancelable is true.]
+    expected: FAIL
+
+  [initEvent should unset returnValue.]
+    expected: FAIL
+
+  [returnValue=true should have no effect once the canceled flag was set.]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/dom/events/EventTarget-dispatchEvent-returnvalue.html.ini
@@ -0,0 +1,7 @@
+[EventTarget-dispatchEvent-returnvalue.html]
+  [Return value of EventTarget.dispatchEvent() affected by preventDefault().]
+    expected: FAIL
+
+  [Return value of EventTarget.dispatchEvent() affected by returnValue.]
+    expected: FAIL
+