Bug 1161950 - Remove support for createEvent("CloseEvent") / initCloseEvent, r=smaug
authorAndrea Marchesini <amarchesini@mozilla.com>
Thu, 14 May 2015 12:25:36 +0100
changeset 243795 dc5dd3099b4651fcb0f245aa31c301c878e66fb5
parent 243794 892d01cf7756816bf8d2ce0167bf0f4079a5b2a3
child 243796 c672d7cfaa80d63fb6e5fe996d1a677bfe5df3db
push id28753
push userkwierso@gmail.com
push dateThu, 14 May 2015 22:33:43 +0000
treeherdermozilla-central@07e2e15703cb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1161950
milestone41.0a1
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
Bug 1161950 - Remove support for createEvent("CloseEvent") / initCloseEvent, r=smaug
dom/events/EventDispatcher.cpp
dom/webidl/CloseEvent.webidl
testing/web-platform/meta/websockets/interfaces/CloseEvent/historical.html.ini
--- a/dom/events/EventDispatcher.cpp
+++ b/dom/events/EventDispatcher.cpp
@@ -853,23 +853,16 @@ EventDispatcher::CreateEvent(EventTarget
     PageTransitionEventInit init;
     nsRefPtr<PageTransitionEvent> event =
       PageTransitionEvent::Constructor(aOwner, EmptyString(), init);
     event.forget(aDOMEvent);
     return NS_OK;
   }
   if (aEventType.LowerCaseEqualsLiteral("scrollareaevent"))
     return NS_NewDOMScrollAreaEvent(aDOMEvent, aOwner, aPresContext, nullptr);
-  if (aEventType.LowerCaseEqualsLiteral("closeevent")) {
-    CloseEventInit init;
-    nsRefPtr<CloseEvent> event =
-      CloseEvent::Constructor(aOwner, EmptyString(), init);
-    event.forget(aDOMEvent);
-    return NS_OK;
-  }
   // XXXkhuey Chrome supports popstateevent here, even though it provides no
   // initPopStateEvent method.  This is nuts ... but copying it is unlikely to
   // break the web.
   if (aEventType.LowerCaseEqualsLiteral("popstateevent")) {
     AutoJSContext cx;
     RootedDictionary<PopStateEventInit> init(cx);
     nsRefPtr<PopStateEvent> event =
       PopStateEvent::Constructor(aOwner, EmptyString(), init);
--- a/dom/webidl/CloseEvent.webidl
+++ b/dom/webidl/CloseEvent.webidl
@@ -10,25 +10,17 @@
  * http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#closeevent
  */
 
 [Constructor(DOMString type, optional CloseEventInit eventInitDict),LegacyEventInit]
 interface CloseEvent : Event
 {
   readonly attribute boolean wasClean;
   readonly attribute unsigned short code;
-  readonly attribute DOMString? reason;
-
-  [Throws]
-  void initCloseEvent(DOMString aType,
-                      boolean aCanBubble,
-                      boolean aCancelable,
-                      boolean aWasClean,
-                      unsigned short aReasonCode,
-                      DOMString? aReason);
+  readonly attribute DOMString reason;
 };
 
 dictionary CloseEventInit : EventInit
 {
   boolean wasClean = false;
   unsigned short code = 0;
   DOMString reason = "";
 };
deleted file mode 100644
--- a/testing/web-platform/meta/websockets/interfaces/CloseEvent/historical.html.ini
+++ /dev/null
@@ -1,10 +0,0 @@
-[historical.html]
-  type: testharness
-  [createEvent("CloseEvent")]
-    bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1161950
-    expected: FAIL
-
-  [initCloseEvent]
-    bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1161950
-    expected: FAIL
-