Bug 1259667 - part2: rename WidgetSimpleGestureEvent.allowedDirections to mAllowedDirections. r?masayuki draft
authorTetsuharu OHZEKI <saneyuki.snyk@gmail.com>
Tue, 10 May 2016 04:16:54 +0900
changeset 364909 fd775e404e3e3276b1997ba9f9c4d2b97a48057a
parent 364908 b16a696494f9423cfdd81a41694151a764cdeaf8
child 364910 89811eff26af72938a747d1b8431bd2cdc090bb2
push id17599
push usersaneyuki.snyk@gmail.com
push dateMon, 09 May 2016 19:17:36 +0000
reviewersmasayuki
bugs1259667
milestone49.0a1
Bug 1259667 - part2: rename WidgetSimpleGestureEvent.allowedDirections to mAllowedDirections. r?masayuki MozReview-Commit-ID: 412YeoUoqIy
dom/events/SimpleGestureEvent.cpp
widget/TouchEvents.h
widget/cocoa/SwipeTracker.mm
widget/cocoa/nsChildView.mm
--- a/dom/events/SimpleGestureEvent.cpp
+++ b/dom/events/SimpleGestureEvent.cpp
@@ -38,31 +38,31 @@ NS_IMPL_RELEASE_INHERITED(SimpleGestureE
 
 NS_INTERFACE_MAP_BEGIN(SimpleGestureEvent)
   NS_INTERFACE_MAP_ENTRY(nsIDOMSimpleGestureEvent)
 NS_INTERFACE_MAP_END_INHERITING(MouseEvent)
 
 uint32_t
 SimpleGestureEvent::AllowedDirections()
 {
-  return mEvent->AsSimpleGestureEvent()->allowedDirections;
+  return mEvent->AsSimpleGestureEvent()->mAllowedDirections;
 }
 
 NS_IMETHODIMP
 SimpleGestureEvent::GetAllowedDirections(uint32_t* aAllowedDirections)
 {
   NS_ENSURE_ARG_POINTER(aAllowedDirections);
   *aAllowedDirections = AllowedDirections();
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SimpleGestureEvent::SetAllowedDirections(uint32_t aAllowedDirections)
 {
-  mEvent->AsSimpleGestureEvent()->allowedDirections = aAllowedDirections;
+  mEvent->AsSimpleGestureEvent()->mAllowedDirections = aAllowedDirections;
   return NS_OK;
 }
 
 uint32_t
 SimpleGestureEvent::Direction()
 {
   return mEvent->AsSimpleGestureEvent()->direction;
 }
@@ -126,17 +126,17 @@ SimpleGestureEvent::InitSimpleGestureEve
 {
   MouseEvent::InitMouseEvent(aTypeArg, aCanBubbleArg, aCancelableArg,
                              aViewArg, aDetailArg,
                              aScreenX, aScreenY, aClientX, aClientY,
                              aCtrlKeyArg, aAltKeyArg, aShiftKeyArg,
                              aMetaKeyArg, aButton, aRelatedTarget);
 
   WidgetSimpleGestureEvent* simpleGestureEvent = mEvent->AsSimpleGestureEvent();
-  simpleGestureEvent->allowedDirections = aAllowedDirectionsArg;
+  simpleGestureEvent->mAllowedDirections = aAllowedDirectionsArg;
   simpleGestureEvent->direction = aDirectionArg;
   simpleGestureEvent->delta = aDeltaArg;
   simpleGestureEvent->clickCount = aClickCountArg;
 }
 
 } // namespace dom
 } // namespace mozilla
 
--- a/widget/TouchEvents.h
+++ b/widget/TouchEvents.h
@@ -93,27 +93,27 @@ public:
   {
     return this;
   }
 
   WidgetSimpleGestureEvent(bool aIsTrusted, EventMessage aMessage,
                            nsIWidget* aWidget)
     : WidgetMouseEventBase(aIsTrusted, aMessage, aWidget,
                            eSimpleGestureEventClass)
-    , allowedDirections(0)
+    , mAllowedDirections(0)
     , direction(0)
     , clickCount(0)
     , delta(0.0)
   {
   }
 
   WidgetSimpleGestureEvent(const WidgetSimpleGestureEvent& aOther)
     : WidgetMouseEventBase(aOther.IsTrusted(), aOther.mMessage,
                            aOther.mWidget, eSimpleGestureEventClass)
-    , allowedDirections(aOther.allowedDirections)
+    , mAllowedDirections(aOther.mAllowedDirections)
     , direction(aOther.direction)
     , clickCount(0)
     , delta(aOther.delta)
   {
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
@@ -123,31 +123,31 @@ public:
     WidgetSimpleGestureEvent* result =
       new WidgetSimpleGestureEvent(false, mMessage, nullptr);
     result->AssignSimpleGestureEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   // See nsIDOMSimpleGestureEvent for values
-  uint32_t allowedDirections;
+  uint32_t mAllowedDirections;
   // See nsIDOMSimpleGestureEvent for values
   uint32_t direction;
   // The number of taps for tap events
   uint32_t clickCount;
   // 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);
 
-    // allowedDirections isn't copied
+    // mAllowedDirections isn't copied
     direction = aEvent.direction;
     delta = aEvent.delta;
     clickCount = aEvent.clickCount;
   }
 };
 
 /******************************************************************************
  * mozilla::WidgetTouchEvent
--- a/widget/cocoa/SwipeTracker.mm
+++ b/widget/cocoa/SwipeTracker.mm
@@ -208,13 +208,13 @@ SwipeTracker::CreateSwipeGestureEvent(Ev
 
 bool
 SwipeTracker::SendSwipeEvent(EventMessage aMsg, uint32_t aDirection, double aDelta)
 {
   WidgetSimpleGestureEvent geckoEvent =
     CreateSwipeGestureEvent(aMsg, &mWidget, mEventPosition);
   geckoEvent.direction = aDirection;
   geckoEvent.delta = aDelta;
-  geckoEvent.allowedDirections = mAllowedDirections;
+  geckoEvent.mAllowedDirections = mAllowedDirections;
   return mWidget.DispatchWindowEvent(geckoEvent);
 }
 
 } // namespace mozilla
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -2574,20 +2574,20 @@ nsChildView::SendMayStartSwipe(const moz
   // This event also reports back the directions that we can swipe in.
   LayoutDeviceIntPoint position =
     RoundedToInt(aSwipeStartEvent.mPanStartPoint * ScreenToLayoutDeviceScale(1));
   WidgetSimpleGestureEvent geckoEvent =
     SwipeTracker::CreateSwipeGestureEvent(eSwipeGestureMayStart, this,
                                           position);
   geckoEvent.direction = direction;
   geckoEvent.delta = 0.0;
-  geckoEvent.allowedDirections = 0;
+  geckoEvent.mAllowedDirections = 0;
   bool shouldStartSwipe = DispatchWindowEvent(geckoEvent); // event cancelled == swipe should start
 
-  SwipeInfo result = { shouldStartSwipe, geckoEvent.allowedDirections };
+  SwipeInfo result = { shouldStartSwipe, geckoEvent.mAllowedDirections };
   return result;
 }
 
 void
 nsChildView::TrackScrollEventAsSwipe(const mozilla::PanGestureInput& aSwipeStartEvent,
                                      uint32_t aAllowedDirections)
 {
   // If a swipe is currently being tracked kill it -- it's been interrupted