Bug 1445417 part 4. Remove nsIDOMDragEvent. r=mystor
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 16 Mar 2018 22:25:25 -0400
changeset 462195 a9a38fcd2c5978591a6b5d42a8dd03f0ba21ccaf
parent 462194 003c353b9112e54d5646d7374741b3d0254d29fa
child 462196 3ab4dce21458246a48ebd65839d1563781427a1c
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)
reviewersmystor
bugs1445417
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 1445417 part 4. Remove nsIDOMDragEvent. r=mystor MozReview-Commit-ID: 6hQ7mHLaLcx
dom/base/nsContentAreaDragDrop.cpp
dom/events/DragEvent.cpp
dom/events/DragEvent.h
dom/events/UIEvent.h
dom/interfaces/events/moz.build
dom/interfaces/events/nsIDOMDragEvent.idl
xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
--- a/dom/base/nsContentAreaDragDrop.cpp
+++ b/dom/base/nsContentAreaDragDrop.cpp
@@ -15,17 +15,16 @@
 // Interfaces needed to be included
 #include "nsCopySupport.h"
 #include "nsIDOMUIEvent.h"
 #include "nsISelection.h"
 #include "nsISelectionController.h"
 #include "nsIDOMNode.h"
 #include "nsIDOMNodeList.h"
 #include "nsIDOMEvent.h"
-#include "nsIDOMDragEvent.h"
 #include "nsPIDOMWindow.h"
 #include "nsIDOMRange.h"
 #include "nsIFormControl.h"
 #include "nsITransferable.h"
 #include "nsComponentManagerUtils.h"
 #include "nsXPCOM.h"
 #include "nsISupportsPrimitives.h"
 #include "nsServiceManagerUtils.h"
--- a/dom/events/DragEvent.cpp
+++ b/dom/events/DragEvent.cpp
@@ -25,23 +25,16 @@ DragEvent::DragEvent(EventTarget* aOwner
   else {
     mEventIsInternal = true;
     mEvent->mTime = PR_Now();
     mEvent->mRefPoint = LayoutDeviceIntPoint(0, 0);
     mEvent->AsMouseEvent()->inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
   }
 }
 
-NS_IMPL_ADDREF_INHERITED(DragEvent, MouseEvent)
-NS_IMPL_RELEASE_INHERITED(DragEvent, MouseEvent)
-
-NS_INTERFACE_MAP_BEGIN(DragEvent)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMDragEvent)
-NS_INTERFACE_MAP_END_INHERITING(MouseEvent)
-
 void
 DragEvent::InitDragEvent(const nsAString& aType,
                          bool aCanBubble,
                          bool aCancelable,
                          nsGlobalWindowInner* aView,
                          int32_t aDetail,
                          int32_t aScreenX,
                          int32_t aScreenY,
--- a/dom/events/DragEvent.h
+++ b/dom/events/DragEvent.h
@@ -2,42 +2,33 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
 #ifndef mozilla_dom_DragEvent_h_
 #define mozilla_dom_DragEvent_h_
 
-#include "nsIDOMDragEvent.h"
 #include "mozilla/dom/MouseEvent.h"
 #include "mozilla/dom/DragEventBinding.h"
 #include "mozilla/EventForwards.h"
 
 namespace mozilla {
 namespace dom {
 
 class DataTransfer;
 
-class DragEvent : public MouseEvent,
-                  public nsIDOMDragEvent
+class DragEvent : public MouseEvent
 {
 public:
   DragEvent(EventTarget* aOwner,
             nsPresContext* aPresContext,
             WidgetDragEvent* aEvent);
 
-  NS_DECL_ISUPPORTS_INHERITED
-
-  NS_DECL_NSIDOMDRAGEVENT
-
-  NS_FORWARD_TO_MOUSEEVENT
-  // And now pull in some things we just shadowed.
-  using UIEvent::GetRangeParent;
-  using UIEvent::RangeOffset;
+  NS_INLINE_DECL_REFCOUNTING_INHERITED(DragEvent, MouseEvent)
 
   virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
   {
     return DragEventBinding::Wrap(aCx, this, aGivenProto);
   }
 
   DragEvent* AsDragEvent() override
   {
--- a/dom/events/UIEvent.h
+++ b/dom/events/UIEvent.h
@@ -120,16 +120,18 @@ protected:
 
 } // namespace dom
 } // namespace mozilla
 
 #define NS_FORWARD_TO_UIEVENT                               \
   NS_FORWARD_NSIDOMUIEVENT(UIEvent::)                       \
   NS_FORWARD_TO_EVENT_NO_SERIALIZATION_NO_DUPLICATION       \
   using Event::GetCurrentTarget;  /* Forwarding shadows */  \
+  using UIEvent::GetRangeParent;                            \
+  using UIEvent::RangeOffset;                               \
   NS_IMETHOD DuplicatePrivateData() override                \
   {                                                         \
     return UIEvent::DuplicatePrivateData();                 \
   }                                                         \
   NS_IMETHOD_(void) Serialize(IPC::Message* aMsg,           \
                               bool aSerializeInterfaceType) \
     override                                                \
   {                                                         \
--- a/dom/interfaces/events/moz.build
+++ b/dom/interfaces/events/moz.build
@@ -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/.
 
 with Files("**"):
     BUG_COMPONENT = ("Core", "DOM: Events")
 
 XPIDL_SOURCES += [
     'nsIDOMCustomEvent.idl',
-    'nsIDOMDragEvent.idl',
     'nsIDOMEvent.idl',
     'nsIDOMEventListener.idl',
     'nsIDOMEventTarget.idl',
     'nsIDOMFocusEvent.idl',
     'nsIDOMMouseEvent.idl',
     'nsIDOMMouseScrollEvent.idl',
     'nsIDOMNotifyPaintEvent.idl',
     'nsIDOMNSEvent.idl',
deleted file mode 100644
--- a/dom/interfaces/events/nsIDOMDragEvent.idl
+++ /dev/null
@@ -1,13 +0,0 @@
-/* -*- Mode: C++; 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"
-#include "nsIDOMMouseEvent.idl"
-
-// FIXME: Bug 1445417, we should really remove this interface.
-[builtinclass, uuid(d5c0d4c2-c646-4b4b-836e-48408b9c7b80)]
-interface nsIDOMDragEvent : nsIDOMMouseEvent
-{
-};
--- a/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
+++ b/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
@@ -13,17 +13,16 @@
 #ifdef MOZ_WEBRTC
 #include "nsIDOMDataChannel.h"
 #endif
 #include "nsIDOMDOMCursor.h"
 #include "nsIDOMDOMException.h"
 #include "nsIDOMDOMRequest.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMDocumentFragment.h"
-#include "nsIDOMDragEvent.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMEvent.h"
 #include "nsIDOMEventTarget.h"
 #include "nsIDOMFileList.h"
 #include "nsIDOMFocusEvent.h"
 #include "nsIDOMGeoPositionError.h"
 #include "nsIDOMHTMLInputElement.h"
 #include "nsIDOMMouseEvent.h"
@@ -60,17 +59,16 @@
 #include "mozilla/dom/CSSValueListBinding.h"
 #include "mozilla/dom/CustomEventBinding.h"
 #include "mozilla/dom/DOMCursorBinding.h"
 #include "mozilla/dom/DOMExceptionBinding.h"
 #include "mozilla/dom/DOMParserBinding.h"
 #include "mozilla/dom/DOMRequestBinding.h"
 #include "mozilla/dom/DocumentBinding.h"
 #include "mozilla/dom/DocumentFragmentBinding.h"
-#include "mozilla/dom/DragEventBinding.h"
 #include "mozilla/dom/ElementBinding.h"
 #include "mozilla/dom/EventBinding.h"
 #include "mozilla/dom/EventTargetBinding.h"
 #include "mozilla/dom/FileListBinding.h"
 #include "mozilla/dom/FocusEventBinding.h"
 #include "mozilla/dom/FrameLoaderBinding.h"
 #include "mozilla/dom/HTMLAnchorElementBinding.h"
 #include "mozilla/dom/HTMLAreaElementBinding.h"
@@ -170,17 +168,16 @@ const ComponentsInterfaceShimEntry kComp
   DEFINE_SHIM(CharacterData),
   DEFINE_SHIM(Comment),
   DEFINE_SHIM(CustomEvent),
   DEFINE_SHIM(DOMCursor),
   DEFINE_SHIM(DOMException),
   DEFINE_SHIM(DOMRequest),
   DEFINE_SHIM(Document),
   DEFINE_SHIM(DocumentFragment),
-  DEFINE_SHIM(DragEvent),
   DEFINE_SHIM(Element),
   DEFINE_SHIM(Event),
   DEFINE_SHIM(EventTarget),
   DEFINE_SHIM(FileList),
   DEFINE_SHIM(FocusEvent),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIFrameLoader, FrameLoader),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMGeoPositionError, PositionError),
   DEFINE_SHIM(HTMLInputElement),