Bug 1455052 part 13. Remove nsIDOMEvent. r=masayuki
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 20 Apr 2018 12:55:31 -0400
changeset 468314 27df0b6428b644d3a28092ccc6251d2fcfe655f0
parent 468313 b52ecaafe0df2f53a61c8179c49fb5742a2933a4
child 468315 30ed797c2454b1f5f259f1c26f85bd7a62380ef5
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1455052
milestone61.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 1455052 part 13. Remove nsIDOMEvent. r=masayuki MozReview-Commit-ID: 3gmGy4URet3
dom/events/Event.cpp
dom/events/Event.h
dom/interfaces/base/domstubs.idl
dom/interfaces/events/moz.build
dom/interfaces/events/nsIDOMEvent.idl
toolkit/components/windowwatcher/nsAutoWindowStateHelper.cpp
widget/nsIDragService.idl
widget/tests/TestAppShellSteadyState.cpp
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -133,17 +133,16 @@ Event::~Event()
     delete mEvent;
   }
 }
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Event)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
   NS_INTERFACE_MAP_ENTRY(Event)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMEvent)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(Event)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(Event)
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(Event)
 
 NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(Event)
--- a/dom/events/Event.h
+++ b/dom/events/Event.h
@@ -4,17 +4,16 @@
  * 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/. */
 
 #ifndef mozilla_dom_Event_h_
 #define mozilla_dom_Event_h_
 
 #include "mozilla/Attributes.h"
 #include "mozilla/BasicEvents.h"
-#include "nsIDOMEvent.h"
 #include "nsISupports.h"
 #include "nsCOMPtr.h"
 #include "nsPIDOMWindow.h"
 #include "nsPoint.h"
 #include "nsCycleCollectionParticipant.h"
 #include "mozilla/dom/BindingDeclarations.h"
 #include "mozilla/dom/EventBinding.h"
 #include "nsIScriptGlobalObject.h"
@@ -51,18 +50,18 @@ class XULCommandEvent;
 #include "mozilla/dom/GeneratedEventList.h"
 #undef GENERATED_EVENT
 
 // IID for Event
 #define NS_EVENT_IID                                            \
   { 0x71139716, 0x4d91, 0x4dee,                                 \
       { 0xba, 0xf9, 0xe3, 0x3b, 0x80, 0xc1, 0x61, 0x61 } }
 
-class Event : public nsIDOMEvent,
-              public nsWrapperCache
+class Event : public nsISupports
+            , public nsWrapperCache
 {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_EVENT_IID)
 
   Event(EventTarget* aOwner,
         nsPresContext* aPresContext,
         WidgetEvent* aEvent);
   explicit Event(nsPIDOMWindowInner* aWindow);
@@ -143,19 +142,16 @@ public:
   }
 
   // CustomEvent has a non-autogeneratable initCustomEvent.
   virtual CustomEvent* AsCustomEvent()
   {
     return nullptr;
   }
 
-  // nsIDOMEvent Interface
-  NS_DECL_NSIDOMEVENT
-
   void InitEvent(const nsAString& aEventTypeArg,
                  bool aCanBubbleArg,
                  bool aCancelableArg);
   void SetTarget(EventTarget* aTarget);
   virtual void DuplicatePrivateData();
   bool IsDispatchStopped();
   WidgetEvent* WidgetEventPtr();
   virtual void Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType);
--- a/dom/interfaces/base/domstubs.idl
+++ b/dom/interfaces/base/domstubs.idl
@@ -30,16 +30,15 @@ class DOMException;
 }
 %}
 
 // Base
 interface nsIDOMWindow;
 interface nsIDOMWindowCollection;
 
 // Events
-interface nsIDOMEvent;
 interface nsIDOMEventListener;
 
 // HTML
 interface nsIDOMHTMLHeadElement;
 
 // Range
 interface nsIDOMRange;
--- a/dom/interfaces/events/moz.build
+++ b/dom/interfaces/events/moz.build
@@ -3,14 +3,13 @@
 # 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/.
 
 with Files("**"):
     BUG_COMPONENT = ("Core", "DOM: Events")
 
 XPIDL_SOURCES += [
-    'nsIDOMEvent.idl',
     'nsIDOMEventListener.idl',
 ]
 
 XPIDL_MODULE = 'dom_events'
 
deleted file mode 100644
--- a/dom/interfaces/events/nsIDOMEvent.idl
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/. */
-
-#include "domstubs.idl"
-
-[ptr] native WidgetEvent(mozilla::WidgetEvent);
-[ptr] native DOMEventPtr(mozilla::dom::Event);
-[ptr] native IPCMessagePtr(IPC::Message);
-[ptr] native ConstIPCMessagePtr(const IPC::Message);
-[ptr] native PickleIterator(PickleIterator);
-[ptr] native EventTargetPtr(mozilla::dom::EventTarget);
-%{C++
-#ifdef ERROR
-#undef ERROR
-#endif
-
-#include "mozilla/EventForwards.h"
-class nsPresContext;
-class nsInvalidateRequestList;
-namespace mozilla {
-namespace dom {
-class Event;
-class EventTarget;
-} // namespace dom
-} // namespace mozilla
-%}
-
-webidl EventTarget;
-
-/**
- * The nsIDOMEvent interface is the primary datatype for all events in
- * the Document Object Model.
- *
- * For more information on this interface please see 
- * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html and
- * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
- */
-
-[shim(Event), uuid(f58daacf-4d1a-4002-8fd7-06b614dfbcf6)]
-interface nsIDOMEvent : nsISupports
-{
-  // PhaseType
-  /**
-   * The event isn't being dispatched.
-   */
-  const unsigned short      NONE                           = 0;
-  /**
-   * The current event phase is the capturing phase.
-   */
-  const unsigned short      CAPTURING_PHASE                = 1;
-
-  /**
-   * The event is currently being evaluated at the target EventTarget.
-   */
-  const unsigned short      AT_TARGET                      = 2;
-
-  /**
-   * The current event phase is the bubbling phase.
-   */
-  const unsigned short      BUBBLING_PHASE                 = 3;
-
-  const long ALT_MASK     = 0x00000001;
-  const long CONTROL_MASK = 0x00000002;
-  const long SHIFT_MASK   = 0x00000004;
-  const long META_MASK    = 0x00000008;
-
-};
--- a/toolkit/components/windowwatcher/nsAutoWindowStateHelper.cpp
+++ b/toolkit/components/windowwatcher/nsAutoWindowStateHelper.cpp
@@ -3,17 +3,16 @@
 /* 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/. */
 
 #include "nsAutoWindowStateHelper.h"
 
 #include "mozilla/dom/Event.h"
 #include "nsIDocument.h"
-#include "nsIDOMEvent.h"
 #include "nsIDOMWindow.h"
 #include "nsPIDOMWindow.h"
 #include "nsString.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 /****************************************************************
--- a/widget/nsIDragService.idl
+++ b/widget/nsIDragService.idl
@@ -6,17 +6,16 @@
 
 #include "nsIArray.idl"
 #include "nsISupports.idl"
 #include "nsIDragSession.idl"
 #include "nsIScriptableRegion.idl"
 #include "nsIContentPolicy.idl"
 
 interface nsIDOMNode;
-interface nsIDOMEvent;
 interface nsISelection;
 
 webidl DragEvent;
 
 %{C++
 #include "mozilla/EventForwards.h"
 
 namespace mozilla {
--- a/widget/tests/TestAppShellSteadyState.cpp
+++ b/widget/tests/TestAppShellSteadyState.cpp
@@ -3,17 +3,16 @@
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 #include "TestHarness.h"
 
 #include "nsIAppShell.h"
 #include "nsIAppShellService.h"
 #include "nsIDocument.h"
-#include "nsIDOMEvent.h"
 #include "nsIDOMEventListener.h"
 #include "nsIDOMWindow.h"
 #include "nsIDOMWindowUtils.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIRunnable.h"
 #include "nsIURI.h"
 #include "nsIWebBrowserChrome.h"
 #include "nsIXULWindow.h"