Bug 920377 part.6 Get rid of nsTransitionEvent r=roc
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 27 Sep 2013 15:20:55 +0900
changeset 163717 78f0a1cb042e3d5e9913acef737346008345e5a3
parent 163716 7fc126f540f8f5b1e72ae65ace3b7eeb2554b210
child 163718 99e55a7040fad62d3a60e2c488cca941cddf60c8
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs920377
milestone27.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 920377 part.6 Get rid of nsTransitionEvent r=roc
content/events/src/nsDOMEvent.cpp
content/events/src/nsDOMTransitionEvent.cpp
content/events/src/nsDOMTransitionEvent.h
content/events/src/nsEventDispatcher.cpp
dom/interfaces/events/nsIDOMEvent.idl
layout/style/nsTransitionManager.cpp
widget/ContentEvents.h
widget/EventForwards.h
--- a/content/events/src/nsDOMEvent.cpp
+++ b/content/events/src/nsDOMEvent.cpp
@@ -705,23 +705,23 @@ nsDOMEvent::DuplicatePrivateData()
         new nsSimpleGestureEvent(false, msg, nullptr, 0, 0.0);
       simpleGestureEvent->
         AssignSimpleGestureEventData(*oldSimpleGestureEvent, true);
       newEvent = simpleGestureEvent;
       break;
     }
     case NS_TRANSITION_EVENT:
     {
-      nsTransitionEvent* oldTransitionEvent =
-        static_cast<nsTransitionEvent*>(mEvent);
-      nsTransitionEvent* transitionEvent =
-         new nsTransitionEvent(false, msg,
-                               oldTransitionEvent->propertyName,
-                               oldTransitionEvent->elapsedTime,
-                               oldTransitionEvent->pseudoElement);
+      InternalTransitionEvent* oldTransitionEvent =
+        static_cast<InternalTransitionEvent*>(mEvent);
+      InternalTransitionEvent* transitionEvent =
+         new InternalTransitionEvent(false, msg,
+                                     oldTransitionEvent->propertyName,
+                                     oldTransitionEvent->elapsedTime,
+                                     oldTransitionEvent->pseudoElement);
       transitionEvent->AssignTransitionEventData(*oldTransitionEvent, true);
       newEvent = transitionEvent;
       break;
     }
     case NS_ANIMATION_EVENT:
     {
       InternalAnimationEvent* oldAnimationEvent =
         static_cast<InternalAnimationEvent*>(mEvent);
--- a/content/events/src/nsDOMTransitionEvent.cpp
+++ b/content/events/src/nsDOMTransitionEvent.cpp
@@ -2,24 +2,25 @@
 /* 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 "nsDOMTransitionEvent.h"
 #include "prtime.h"
 #include "mozilla/ContentEvents.h"
 
+using namespace mozilla;
+
 nsDOMTransitionEvent::nsDOMTransitionEvent(mozilla::dom::EventTarget* aOwner,
                                            nsPresContext *aPresContext,
-                                           nsTransitionEvent *aEvent)
+                                           InternalTransitionEvent* aEvent)
   : nsDOMEvent(aOwner, aPresContext,
-               aEvent ? aEvent : new nsTransitionEvent(false, 0,
-                                                       EmptyString(),
-                                                       0.0,
-                                                       EmptyString()))
+               aEvent ? aEvent :
+                        new InternalTransitionEvent(false, 0, EmptyString(),
+                                                    0.0, EmptyString()))
 {
   if (aEvent) {
     mEventIsInternal = false;
   }
   else {
     mEventIsInternal = true;
     mEvent->time = PR_Now();
   }
@@ -81,14 +82,14 @@ nsDOMTransitionEvent::GetPseudoElement(n
   aPseudoElement = TransitionEvent()->pseudoElement;
   return NS_OK;
 }
 
 nsresult
 NS_NewDOMTransitionEvent(nsIDOMEvent **aInstancePtrResult,
                          mozilla::dom::EventTarget* aOwner,
                          nsPresContext *aPresContext,
-                         nsTransitionEvent *aEvent)
+                         InternalTransitionEvent* aEvent)
 {
   nsDOMTransitionEvent *it =
     new nsDOMTransitionEvent(aOwner, aPresContext, aEvent);
   return CallQueryInterface(it, aInstancePtrResult);
 }
--- a/content/events/src/nsDOMTransitionEvent.h
+++ b/content/events/src/nsDOMTransitionEvent.h
@@ -13,17 +13,17 @@
 class nsAString;
 
 class nsDOMTransitionEvent : public nsDOMEvent,
                              public nsIDOMTransitionEvent
 {
 public:
   nsDOMTransitionEvent(mozilla::dom::EventTarget* aOwner,
                        nsPresContext *aPresContext,
-                       nsTransitionEvent *aEvent);
+                       mozilla::InternalTransitionEvent* aEvent);
   ~nsDOMTransitionEvent();
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_FORWARD_TO_NSDOMEVENT
   NS_DECL_NSIDOMTRANSITIONEVENT
 
   static already_AddRefed<nsDOMTransitionEvent>
   Constructor(const mozilla::dom::GlobalObject& aGlobal,
@@ -42,16 +42,16 @@ public:
   // GetPseudoElement(nsAString& aPreudoElement)
 
   float ElapsedTime()
   {
     return TransitionEvent()->elapsedTime;
   }
 
 private:
-  nsTransitionEvent* TransitionEvent() {
+  mozilla::InternalTransitionEvent* TransitionEvent() {
     NS_ABORT_IF_FALSE(mEvent->eventStructType == NS_TRANSITION_EVENT,
                       "unexpected struct type");
-    return static_cast<nsTransitionEvent*>(mEvent);
+    return static_cast<mozilla::InternalTransitionEvent*>(mEvent);
   }
 };
 
 #endif /* !defined(nsDOMTransitionEvent_h_) */
--- a/content/events/src/nsEventDispatcher.cpp
+++ b/content/events/src/nsEventDispatcher.cpp
@@ -739,17 +739,17 @@ nsEventDispatcher::CreateEvent(mozilla::
     case NS_SIMPLE_GESTURE_EVENT:
       return NS_NewDOMSimpleGestureEvent(aDOMEvent, aOwner, aPresContext,
                                          static_cast<nsSimpleGestureEvent*>(aEvent));
     case NS_TOUCH_EVENT:
       return NS_NewDOMTouchEvent(aDOMEvent, aOwner, aPresContext,
                                  static_cast<nsTouchEvent*>(aEvent));
     case NS_TRANSITION_EVENT:
       return NS_NewDOMTransitionEvent(aDOMEvent, aOwner, aPresContext,
-                                      static_cast<nsTransitionEvent*>(aEvent));
+               static_cast<InternalTransitionEvent*>(aEvent));
     case NS_ANIMATION_EVENT:
       return NS_NewDOMAnimationEvent(aDOMEvent, aOwner, aPresContext,
                static_cast<InternalAnimationEvent*>(aEvent));
     default:
       // For all other types of events, create a vanilla event object.
       return NS_NewDOMEvent(aDOMEvent, aOwner, aPresContext, aEvent);
     }
   }
--- a/dom/interfaces/events/nsIDOMEvent.idl
+++ b/dom/interfaces/events/nsIDOMEvent.idl
@@ -360,17 +360,17 @@ nsresult
 NS_NewDOMScrollAreaEvent(nsIDOMEvent** aInstancePtrResult,
                          mozilla::dom::EventTarget* aOwner,
                          nsPresContext* aPresContext,
                          nsScrollAreaEvent* aEvent);
 nsresult
 NS_NewDOMTransitionEvent(nsIDOMEvent** aInstancePtrResult,
                          mozilla::dom::EventTarget* aOwner,
                          nsPresContext* aPresContext,
-                         nsTransitionEvent* aEvent);
+                         mozilla::InternalTransitionEvent* aEvent);
 nsresult
 NS_NewDOMAnimationEvent(nsIDOMEvent** aInstancePtrResult,
                         mozilla::dom::EventTarget* aOwner,
                         nsPresContext* aPresContext,
                         mozilla::InternalAnimationEvent* aEvent);
 nsresult
 NS_NewDOMTouchEvent(nsIDOMEvent** aInstancePtrResult,
                     mozilla::dom::EventTarget* aOwner,
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -993,28 +993,28 @@ nsTransitionManager::SizeOfExcludingThis
 /* virtual */ size_t
 nsTransitionManager::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
 {
   return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
 }
 
 struct TransitionEventInfo {
   nsCOMPtr<nsIContent> mElement;
-  nsTransitionEvent mEvent;
+  InternalTransitionEvent mEvent;
 
   TransitionEventInfo(nsIContent *aElement, nsCSSProperty aProperty,
                       TimeDuration aDuration, const nsAString& aPseudoElement)
     : mElement(aElement),
       mEvent(true, NS_TRANSITION_END,
              NS_ConvertUTF8toUTF16(nsCSSProps::GetStringValue(aProperty)),
              aDuration.ToSeconds(), aPseudoElement)
   {
   }
 
-  // nsTransitionEvent doesn't support copy-construction, so we need
+  // InternalTransitionEvent doesn't support copy-construction, so we need
   // to ourselves in order to work with nsTArray
   TransitionEventInfo(const TransitionEventInfo &aOther)
     : mElement(aOther.mElement),
       mEvent(true, NS_TRANSITION_END,
              aOther.mEvent.propertyName, aOther.mEvent.elapsedTime,
              aOther.mEvent.pseudoElement)
   {
   }
--- a/widget/ContentEvents.h
+++ b/widget/ContentEvents.h
@@ -249,11 +249,10 @@ public:
 
 // TODO: Remove following typedefs
 typedef mozilla::InternalScriptErrorEvent nsScriptErrorEvent;
 typedef mozilla::InternalScrollPortEvent  nsScrollPortEvent;
 typedef mozilla::InternalScrollAreaEvent  nsScrollAreaEvent;
 typedef mozilla::InternalFormEvent        nsFormEvent;
 typedef mozilla::InternalClipboardEvent   nsClipboardEvent;
 typedef mozilla::InternalFocusEvent       nsFocusEvent;
-typedef mozilla::InternalTransitionEvent  nsTransitionEvent;
 
 #endif // mozilla_ContentEvents_h__
--- a/widget/EventForwards.h
+++ b/widget/EventForwards.h
@@ -129,11 +129,10 @@ typedef mozilla::WidgetGestureNotifyEven
 typedef mozilla::WidgetSimpleGestureEvent  nsSimpleGestureEvent;
 typedef mozilla::WidgetTouchEvent          nsTouchEvent;
 typedef mozilla::InternalScriptErrorEvent  nsScriptErrorEvent;
 typedef mozilla::InternalScrollPortEvent   nsScrollPortEvent;
 typedef mozilla::InternalScrollAreaEvent   nsScrollAreaEvent;
 typedef mozilla::InternalFormEvent         nsFormEvent;
 typedef mozilla::InternalClipboardEvent    nsClipboardEvent;
 typedef mozilla::InternalFocusEvent        nsFocusEvent;
-typedef mozilla::InternalTransitionEvent   nsTransitionEvent;
 
 #endif // mozilla_EventForwards_h__