Bug 1436508 part 15. Remove nsIDOMTransitionEvent. r=masayuki
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 09 Feb 2018 11:17:10 -0500
changeset 403187 9c5e16dfd42e
parent 403186 15f68311633e
child 403188 f882418b2d05
push id33416
push userarchaeopteryx@coole-files.de
push dateFri, 09 Feb 2018 22:32:39 +0000
treeherdermozilla-central@c2cddb0cbb20 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1436508
milestone60.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 1436508 part 15. Remove nsIDOMTransitionEvent. r=masayuki MozReview-Commit-ID: EWWqk9HAwqp
devtools/server/actors/object.js
dom/events/TransitionEvent.cpp
dom/events/TransitionEvent.h
dom/interfaces/events/moz.build
dom/interfaces/events/nsIDOMTransitionEvent.idl
xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
--- a/devtools/server/actors/object.js
+++ b/devtools/server/actors/object.js
@@ -1909,17 +1909,17 @@ DebuggerServer.ObjectActorPreviewers.Obj
       }
       if (rawObj.shiftKey) {
         modifiers.push("Shift");
       }
       preview.eventKind = "key";
       preview.modifiers = modifiers;
 
       props.push("key", "charCode", "keyCode");
-    } else if (rawObj instanceof Ci.nsIDOMTransitionEvent) {
+    } else if (obj.class == "TransitionEvent") {
       props.push("propertyName", "pseudoElement");
     } else if (obj.class == "AnimationEvent") {
       props.push("animationName", "pseudoElement");
     } else if (rawObj instanceof Ci.nsIDOMClipboardEvent) {
       props.push("clipboardData");
     }
 
     // Add event-specific properties.
--- a/dom/events/TransitionEvent.cpp
+++ b/dom/events/TransitionEvent.cpp
@@ -22,17 +22,16 @@ TransitionEvent::TransitionEvent(EventTa
   }
   else {
     mEventIsInternal = true;
     mEvent->mTime = PR_Now();
   }
 }
 
 NS_INTERFACE_MAP_BEGIN(TransitionEvent)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMTransitionEvent)
 NS_INTERFACE_MAP_END_INHERITING(Event)
 
 NS_IMPL_ADDREF_INHERITED(TransitionEvent, Event)
 NS_IMPL_RELEASE_INHERITED(TransitionEvent, Event)
 
 // static
 already_AddRefed<TransitionEvent>
 TransitionEvent::Constructor(const GlobalObject& aGlobal,
@@ -51,41 +50,32 @@ TransitionEvent::Constructor(const Globa
   internalEvent->mElapsedTime = aParam.mElapsedTime;
   internalEvent->mPseudoElement = aParam.mPseudoElement;
 
   e->SetTrusted(trusted);
   e->SetComposed(aParam.mComposed);
   return e.forget();
 }
 
-NS_IMETHODIMP
-TransitionEvent::GetPropertyName(nsAString& aPropertyName)
+void
+TransitionEvent::GetPropertyName(nsAString& aPropertyName) const
 {
   aPropertyName = mEvent->AsTransitionEvent()->mPropertyName;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-TransitionEvent::GetElapsedTime(float* aElapsedTime)
-{
-  *aElapsedTime = ElapsedTime();
-  return NS_OK;
 }
 
 float
 TransitionEvent::ElapsedTime()
 {
   return mEvent->AsTransitionEvent()->mElapsedTime;
 }
 
-NS_IMETHODIMP
-TransitionEvent::GetPseudoElement(nsAString& aPseudoElement)
+void
+TransitionEvent::GetPseudoElement(nsAString& aPseudoElement) const
 {
   aPseudoElement = mEvent->AsTransitionEvent()->mPseudoElement;
-  return NS_OK;
 }
 
 } // namespace dom
 } // namespace mozilla
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
--- a/dom/events/TransitionEvent.h
+++ b/dom/events/TransitionEvent.h
@@ -4,48 +4,43 @@
  * 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_TransitionEvent_h_
 #define mozilla_dom_TransitionEvent_h_
 
 #include "mozilla/EventForwards.h"
 #include "mozilla/dom/Event.h"
 #include "mozilla/dom/TransitionEventBinding.h"
-#include "nsIDOMTransitionEvent.h"
 #include "nsStringFwd.h"
 
 namespace mozilla {
 namespace dom {
 
-class TransitionEvent : public Event,
-                        public nsIDOMTransitionEvent
+class TransitionEvent : public Event
 {
 public:
   TransitionEvent(EventTarget* aOwner,
                   nsPresContext* aPresContext,
                   InternalTransitionEvent* aEvent);
 
   NS_DECL_ISUPPORTS_INHERITED
-  NS_FORWARD_TO_EVENT
-  NS_DECL_NSIDOMTRANSITIONEVENT
 
   static already_AddRefed<TransitionEvent>
   Constructor(const GlobalObject& aGlobal,
               const nsAString& aType,
               const TransitionEventInit& aParam,
               ErrorResult& aRv);
 
   virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
   {
     return TransitionEventBinding::Wrap(aCx, this, aGivenProto);
   }
 
-  // xpidl implementation
-  // GetPropertyName(nsAString& aPropertyName)
-  // GetPseudoElement(nsAString& aPreudoElement)
+  void GetPropertyName(nsAString& aPropertyName) const;
+  void GetPseudoElement(nsAString& aPreudoElement) const;
 
   float ElapsedTime();
 
 protected:
   ~TransitionEvent() {}
 };
 
 } // namespace dom
--- a/dom/interfaces/events/moz.build
+++ b/dom/interfaces/events/moz.build
@@ -18,15 +18,14 @@ XPIDL_SOURCES += [
     'nsIDOMFocusEvent.idl',
     'nsIDOMMouseEvent.idl',
     'nsIDOMMouseScrollEvent.idl',
     'nsIDOMNotifyPaintEvent.idl',
     'nsIDOMNSEvent.idl',
     'nsIDOMPaintRequest.idl',
     'nsIDOMScrollAreaEvent.idl',
     'nsIDOMSimpleGestureEvent.idl',
-    'nsIDOMTransitionEvent.idl',
     'nsIDOMUIEvent.idl',
     'nsIDOMWheelEvent.idl',
 ]
 
 XPIDL_MODULE = 'dom_events'
 
deleted file mode 100644
--- a/dom/interfaces/events/nsIDOMTransitionEvent.idl
+++ /dev/null
@@ -1,19 +0,0 @@
-/* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
-/* 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 "nsISupports.idl"
-
-/**
- * Transition events are defined in:
- * http://www.w3.org/TR/css3-transitions/#transition-events-
- * http://dev.w3.org/csswg/css3-transitions/#transition-events-
- */
-
-[builtinclass, uuid(ee3499bf-0f14-4bb6-829c-19ad24fd4a85)]
-interface nsIDOMTransitionEvent : nsISupports {
-  readonly attribute DOMString           propertyName;
-  readonly attribute float               elapsedTime;
-  readonly attribute DOMString           pseudoElement;
-};
--- a/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
+++ b/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
@@ -50,17 +50,16 @@
 #include "nsIDOMProcessingInstruction.h"
 #include "nsIDOMRange.h"
 #include "nsIDOMScreen.h"
 #include "nsIDOMScrollAreaEvent.h"
 #include "nsIDOMSerializer.h"
 #include "nsIDOMSimpleGestureEvent.h"
 #include "nsIDOMText.h"
 #include "nsIDOMTimeRanges.h"
-#include "nsIDOMTransitionEvent.h"
 #include "nsIDOMUIEvent.h"
 #include "nsIDOMValidityState.h"
 #include "nsIDOMWheelEvent.h"
 #include "nsIDOMXMLDocument.h"
 #include "nsIDOMXULCommandEvent.h"
 #include "nsIDOMXULElement.h"
 #include "nsIFrameLoader.h"
 #include "nsIListBoxObject.h"
@@ -136,17 +135,16 @@
 #include "mozilla/dom/SimpleGestureEventBinding.h"
 #include "mozilla/dom/StorageEventBinding.h"
 #include "mozilla/dom/StyleSheetBinding.h"
 #include "mozilla/dom/StyleSheetListBinding.h"
 #include "mozilla/dom/SVGElementBinding.h"
 #include "mozilla/dom/TextBinding.h"
 #include "mozilla/dom/TimeEventBinding.h"
 #include "mozilla/dom/TimeRangesBinding.h"
-#include "mozilla/dom/TransitionEventBinding.h"
 #include "mozilla/dom/TreeBoxObjectBinding.h"
 #include "mozilla/dom/UIEventBinding.h"
 #include "mozilla/dom/ValidityStateBinding.h"
 #include "mozilla/dom/WheelEventBinding.h"
 #include "mozilla/dom/XMLDocumentBinding.h"
 #include "mozilla/dom/XMLHttpRequestEventTargetBinding.h"
 #include "mozilla/dom/XMLHttpRequestUploadBinding.h"
 #include "mozilla/dom/XMLSerializerBinding.h"
@@ -256,17 +254,16 @@ const ComponentsInterfaceShimEntry kComp
   DEFINE_SHIM(Range),
   DEFINE_SHIM(Screen),
   DEFINE_SHIM(ScrollAreaEvent),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIScrollBoxObject, ScrollBoxObject),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMSerializer, XMLSerializer),
   DEFINE_SHIM(SimpleGestureEvent),
   DEFINE_SHIM(Text),
   DEFINE_SHIM(TimeRanges),
-  DEFINE_SHIM(TransitionEvent),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsITreeBoxObject, TreeBoxObject),
   DEFINE_SHIM(UIEvent),
   DEFINE_SHIM(ValidityState),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIWebBrowserPersistable, FrameLoader),
   DEFINE_SHIM(WheelEvent),
   DEFINE_SHIM(XMLDocument),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIXMLHttpRequestEventTarget, XMLHttpRequestEventTarget),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIXMLHttpRequestUpload, XMLHttpRequestUpload),