Bug 1259675 - Clean up InternalTransitionEvent r=masayuki
authortakayuki_yamaguchi <tyamguchi.gentoo@gmail.com>
Sat, 26 Mar 2016 16:26:35 +0900
changeset 290568 cdf83aa2b0ba8f1b0b0f2b7402660307abd04b43
parent 290567 24ac6ea7fdae65b5dd524702237bb59a354f4c29
child 290569 feb85260ffb750c7e0a3096e1ffd7134249d4e67
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1259675
milestone48.0a1
Bug 1259675 - Clean up InternalTransitionEvent r=masayuki MozReview-Commit-ID: 8fTJ4Z9yJGl
dom/events/TransitionEvent.cpp
layout/style/nsTransitionManager.h
widget/ContentEvents.h
--- a/dom/events/TransitionEvent.cpp
+++ b/dom/events/TransitionEvent.cpp
@@ -42,48 +42,48 @@ TransitionEvent::Constructor(const Globa
 {
   nsCOMPtr<EventTarget> t = do_QueryInterface(aGlobal.GetAsSupports());
   RefPtr<TransitionEvent> e = new TransitionEvent(t, nullptr, nullptr);
   bool trusted = e->Init(t);
 
   e->InitEvent(aType, aParam.mBubbles, aParam.mCancelable);
 
   InternalTransitionEvent* internalEvent = e->mEvent->AsTransitionEvent();
-  internalEvent->propertyName = aParam.mPropertyName;
-  internalEvent->elapsedTime = aParam.mElapsedTime;
-  internalEvent->pseudoElement = aParam.mPseudoElement;
+  internalEvent->mPropertyName = aParam.mPropertyName;
+  internalEvent->mElapsedTime = aParam.mElapsedTime;
+  internalEvent->mPseudoElement = aParam.mPseudoElement;
 
   e->SetTrusted(trusted);
   return e.forget();
 }
 
 NS_IMETHODIMP
 TransitionEvent::GetPropertyName(nsAString& aPropertyName)
 {
-  aPropertyName = mEvent->AsTransitionEvent()->propertyName;
+  aPropertyName = mEvent->AsTransitionEvent()->mPropertyName;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 TransitionEvent::GetElapsedTime(float* aElapsedTime)
 {
   *aElapsedTime = ElapsedTime();
   return NS_OK;
 }
 
 float
 TransitionEvent::ElapsedTime()
 {
-  return mEvent->AsTransitionEvent()->elapsedTime;
+  return mEvent->AsTransitionEvent()->mElapsedTime;
 }
 
 NS_IMETHODIMP
 TransitionEvent::GetPseudoElement(nsAString& aPseudoElement)
 {
-  aPseudoElement = mEvent->AsTransitionEvent()->pseudoElement;
+  aPseudoElement = mEvent->AsTransitionEvent()->mPseudoElement;
   return NS_OK;
 }
 
 } // namespace dom
 } // namespace mozilla
 
 using namespace mozilla;
 using namespace mozilla::dom;
--- a/layout/style/nsTransitionManager.h
+++ b/layout/style/nsTransitionManager.h
@@ -245,20 +245,20 @@ struct TransitionEventInfo {
                       const TimeStamp& aTimeStamp,
                       dom::Animation* aAnimation)
     : mElement(aElement)
     , mAnimation(aAnimation)
     , mEvent(true, eTransitionEnd)
     , mTimeStamp(aTimeStamp)
   {
     // XXX Looks like nobody initialize WidgetEvent::time
-    mEvent.propertyName =
+    mEvent.mPropertyName =
       NS_ConvertUTF8toUTF16(nsCSSProps::GetStringValue(aProperty));
-    mEvent.elapsedTime = aDuration.ToSeconds();
-    mEvent.pseudoElement =
+    mEvent.mElapsedTime = aDuration.ToSeconds();
+    mEvent.mPseudoElement =
       AnimationCollection<dom::CSSTransition>::PseudoTypeAsString(aPseudoType);
   }
 
   // InternalTransitionEvent doesn't support copy-construction, so we need
   // to ourselves in order to work with nsTArray
   TransitionEventInfo(const TransitionEventInfo& aOther)
     : mElement(aOther.mElement)
     , mAnimation(aOther.mAnimation)
--- a/widget/ContentEvents.h
+++ b/widget/ContentEvents.h
@@ -237,44 +237,44 @@ class InternalTransitionEvent : public W
 public:
   virtual InternalTransitionEvent* AsTransitionEvent() override
   {
     return this;
   }
 
   InternalTransitionEvent(bool aIsTrusted, EventMessage aMessage)
     : WidgetEvent(aIsTrusted, aMessage, eTransitionEventClass)
-    , elapsedTime(0.0)
+    , mElapsedTime(0.0)
   {
     mFlags.mCancelable = false;
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eTransitionEventClass,
                "Duplicate() must be overridden by sub class");
     InternalTransitionEvent* result =
       new InternalTransitionEvent(false, mMessage);
     result->AssignTransitionEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
-  nsString propertyName;
-  float elapsedTime;
-  nsString pseudoElement;
+  nsString mPropertyName;
+  nsString mPseudoElement;
+  float mElapsedTime;
 
   void AssignTransitionEventData(const InternalTransitionEvent& aEvent,
                                  bool aCopyTargets)
   {
     AssignEventData(aEvent, aCopyTargets);
 
-    propertyName = aEvent.propertyName;
-    elapsedTime = aEvent.elapsedTime;
-    pseudoElement = aEvent.pseudoElement;
+    mPropertyName = aEvent.mPropertyName;
+    mElapsedTime = aEvent.mElapsedTime;
+    mPseudoElement = aEvent.mPseudoElement;
   }
 };
 
 /******************************************************************************
  * mozilla::InternalAnimationEvent
  ******************************************************************************/
 
 class InternalAnimationEvent : public WidgetEvent