Bug 1259667 - part4: rename WidgetSimpleGestureEvent.clickCount to mClickCount. r?masayuki draft
authorTetsuharu OHZEKI <saneyuki.snyk@gmail.com>
Tue, 10 May 2016 04:16:54 +0900
changeset 364911 71e5c5fc95f12e4d7a85ab201dda64a222fc64de
parent 364910 89811eff26af72938a747d1b8431bd2cdc090bb2
child 364912 6545ef50af14089823aca9d079c2e7bb05003fb7
push id17599
push usersaneyuki.snyk@gmail.com
push dateMon, 09 May 2016 19:17:36 +0000
reviewersmasayuki
bugs1259667
milestone49.0a1
Bug 1259667 - part4: rename WidgetSimpleGestureEvent.clickCount to mClickCount. r?masayuki MozReview-Commit-ID: 8YaPzAGsmYd
dom/base/nsDOMWindowUtils.cpp
dom/events/SimpleGestureEvent.cpp
widget/TouchEvents.h
widget/cocoa/nsChildView.mm
widget/windows/nsWinGesture.cpp
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -1292,17 +1292,17 @@ nsDOMWindowUtils::SendSimpleGestureEvent
   } else {
     return NS_ERROR_FAILURE;
   }
 
   WidgetSimpleGestureEvent event(true, msg, widget);
   event.mModifiers = nsContentUtils::GetWidgetModifiers(aModifiers);
   event.mDirection = aDirection;
   event.delta = aDelta;
-  event.clickCount = aClickCount;
+  event.mClickCount = aClickCount;
   event.mTime = PR_IntervalNow();
 
   nsPresContext* presContext = GetPresContext();
   if (!presContext)
     return NS_ERROR_FAILURE;
 
   event.mRefPoint =
     nsContentUtils::ToWidgetPoint(CSSPoint(aX, aY), offset, presContext);
--- a/dom/events/SimpleGestureEvent.cpp
+++ b/dom/events/SimpleGestureEvent.cpp
@@ -87,17 +87,17 @@ SimpleGestureEvent::GetDelta(double* aDe
   NS_ENSURE_ARG_POINTER(aDelta);
   *aDelta = Delta();
   return NS_OK;
 }
 
 uint32_t
 SimpleGestureEvent::ClickCount()
 {
-  return mEvent->AsSimpleGestureEvent()->clickCount;
+  return mEvent->AsSimpleGestureEvent()->mClickCount;
 }
 
 NS_IMETHODIMP
 SimpleGestureEvent::GetClickCount(uint32_t* aClickCount)
 {
   NS_ENSURE_ARG_POINTER(aClickCount);
   *aClickCount = ClickCount();
   return NS_OK;
@@ -129,17 +129,17 @@ SimpleGestureEvent::InitSimpleGestureEve
                              aScreenX, aScreenY, aClientX, aClientY,
                              aCtrlKeyArg, aAltKeyArg, aShiftKeyArg,
                              aMetaKeyArg, aButton, aRelatedTarget);
 
   WidgetSimpleGestureEvent* simpleGestureEvent = mEvent->AsSimpleGestureEvent();
   simpleGestureEvent->mAllowedDirections = aAllowedDirectionsArg;
   simpleGestureEvent->mDirection = aDirectionArg;
   simpleGestureEvent->delta = aDeltaArg;
-  simpleGestureEvent->clickCount = aClickCountArg;
+  simpleGestureEvent->mClickCount = aClickCountArg;
 }
 
 } // namespace dom
 } // namespace mozilla
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
--- a/widget/TouchEvents.h
+++ b/widget/TouchEvents.h
@@ -95,27 +95,27 @@ public:
   }
 
   WidgetSimpleGestureEvent(bool aIsTrusted, EventMessage aMessage,
                            nsIWidget* aWidget)
     : WidgetMouseEventBase(aIsTrusted, aMessage, aWidget,
                            eSimpleGestureEventClass)
     , mAllowedDirections(0)
     , mDirection(0)
-    , clickCount(0)
+    , mClickCount(0)
     , delta(0.0)
   {
   }
 
   WidgetSimpleGestureEvent(const WidgetSimpleGestureEvent& aOther)
     : WidgetMouseEventBase(aOther.IsTrusted(), aOther.mMessage,
                            aOther.mWidget, eSimpleGestureEventClass)
     , mAllowedDirections(aOther.mAllowedDirections)
     , mDirection(aOther.mDirection)
-    , clickCount(0)
+    , mClickCount(0)
     , delta(aOther.delta)
   {
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eSimpleGestureEventClass,
                "Duplicate() must be overridden by sub class");
@@ -127,30 +127,30 @@ public:
     return result;
   }
 
   // See nsIDOMSimpleGestureEvent for values
   uint32_t mAllowedDirections;
   // See nsIDOMSimpleGestureEvent for values
   uint32_t mDirection;
   // The number of taps for tap events
-  uint32_t clickCount;
+  uint32_t mClickCount;
   // Delta for magnify and rotate events
   double delta;
 
   // XXX Not tested by test_assign_event_data.html
   void AssignSimpleGestureEventData(const WidgetSimpleGestureEvent& aEvent,
                                     bool aCopyTargets)
   {
     AssignMouseEventBaseData(aEvent, aCopyTargets);
 
     // mAllowedDirections isn't copied
     mDirection = aEvent.mDirection;
     delta = aEvent.delta;
-    clickCount = aEvent.clickCount;
+    mClickCount = aEvent.mClickCount;
   }
 };
 
 /******************************************************************************
  * mozilla::WidgetTouchEvent
  ******************************************************************************/
 
 class WidgetTouchEvent : public WidgetInputEvent
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -4273,17 +4273,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
     return;
   }
 
   nsAutoRetainCocoaObject kungFuDeathGrip(self);
 
   // Setup the "double tap" event.
   WidgetSimpleGestureEvent geckoEvent(true, eTapGesture, mGeckoChild);
   [self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
-  geckoEvent.clickCount = 1;
+  geckoEvent.mClickCount = 1;
 
   // Send the event.
   mGeckoChild->DispatchWindowEvent(geckoEvent);
 
   // Clear the gesture state
   mGestureState = eGestureState_None;
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
--- a/widget/windows/nsWinGesture.cpp
+++ b/widget/windows/nsWinGesture.cpp
@@ -393,23 +393,23 @@ nsWinGesture::ProcessGestureMessage(HWND
       }
     }
     break;
 
     case GID_TWOFINGERTAP:
       // Normally maps to "restore" from whatever you may have recently changed.
       // A simple double click.
       evt.mMessage = eTapGesture;
-      evt.clickCount = 1;
+      evt.mClickCount = 1;
       break;
 
     case GID_PRESSANDTAP:
       // Two finger right click. Defaults to right click if it falls through.
       evt.mMessage = ePressTapGesture;
-      evt.clickCount = 1;
+      evt.mClickCount = 1;
       break;
   }
 
   return true;
 }
 
 bool
 nsWinGesture::ProcessPanMessage(HWND hWnd, WPARAM wParam, LPARAM lParam)