Bug 895274 part.264 Rename NS_SIMPLE_GESTURE_SWIPE to eSwipeGesture r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 15 Sep 2015 00:14:37 +0900
changeset 262351 9443d9e5318e8a792b817f745a58fce6bf11f95f
parent 262350 a61c8be5100bcaac9f792e6d8d11bd1098725ff7
child 262352 7d3ff6e1cdfea1ce6fbdfdfb9eb9a72fc93557a2
push id64985
push usermasayuki@d-toybox.com
push dateMon, 14 Sep 2015 15:14:49 +0000
treeherdermozilla-inbound@b3f5c61b22ee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs895274
milestone43.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 895274 part.264 Rename NS_SIMPLE_GESTURE_SWIPE to eSwipeGesture r=smaug
dom/base/nsDOMWindowUtils.cpp
dom/events/EventNameList.h
widget/EventMessageList.h
widget/cocoa/SwipeTracker.mm
widget/cocoa/nsChildView.mm
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -1299,19 +1299,19 @@ nsDOMWindowUtils::SendSimpleGestureEvent
   if (aType.EqualsLiteral("MozSwipeGestureMayStart"))
     msg = NS_SIMPLE_GESTURE_SWIPE_MAY_START;
   else if (aType.EqualsLiteral("MozSwipeGestureStart"))
     msg = NS_SIMPLE_GESTURE_SWIPE_START;
   else if (aType.EqualsLiteral("MozSwipeGestureUpdate"))
     msg = NS_SIMPLE_GESTURE_SWIPE_UPDATE;
   else if (aType.EqualsLiteral("MozSwipeGestureEnd"))
     msg = NS_SIMPLE_GESTURE_SWIPE_END;
-  else if (aType.EqualsLiteral("MozSwipeGesture"))
-    msg = NS_SIMPLE_GESTURE_SWIPE;
-  else if (aType.EqualsLiteral("MozMagnifyGestureStart")) {
+  else if (aType.EqualsLiteral("MozSwipeGesture")) {
+    msg = eSwipeGesture;
+  } else if (aType.EqualsLiteral("MozMagnifyGestureStart")) {
     msg = eMagnifyGestureStart;
   } else if (aType.EqualsLiteral("MozMagnifyGestureUpdate")) {
     msg = eMagnifyGestureUpdate;
   } else if (aType.EqualsLiteral("MozMagnifyGesture")) {
     msg = eMagnifyGesture;
   } else if (aType.EqualsLiteral("MozRotateGestureStart")) {
     msg = eRotateGestureStart;
   } else if (aType.EqualsLiteral("MozRotateGestureUpdate")) {
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -859,17 +859,17 @@ NON_IDL_EVENT(MozSwipeGestureUpdate,
               NS_SIMPLE_GESTURE_SWIPE_UPDATE,
               EventNameType_None,
               eSimpleGestureEventClass)
 NON_IDL_EVENT(MozSwipeGestureEnd,
               NS_SIMPLE_GESTURE_SWIPE_END,
               EventNameType_None,
               eSimpleGestureEventClass)
 NON_IDL_EVENT(MozSwipeGesture,
-              NS_SIMPLE_GESTURE_SWIPE,
+              eSwipeGesture,
               EventNameType_None,
               eSimpleGestureEventClass)
 NON_IDL_EVENT(MozMagnifyGestureStart,
               eMagnifyGestureStart,
               EventNameType_None,
               eSimpleGestureEventClass)
 NON_IDL_EVENT(MozMagnifyGestureUpdate,
               eMagnifyGestureUpdate,
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -271,17 +271,17 @@ NS_EVENT_MESSAGE(ePaintEventFirst,      
 NS_EVENT_MESSAGE(eAfterPaint,           ePaintEventFirst)
 
 // Simple gesture events
 NS_EVENT_MESSAGE(NS_SIMPLE_GESTURE_EVENT_START,    3500)
 NS_EVENT_MESSAGE(NS_SIMPLE_GESTURE_SWIPE_MAY_START,NS_SIMPLE_GESTURE_EVENT_START)
 NS_EVENT_MESSAGE(NS_SIMPLE_GESTURE_SWIPE_START,    NS_SIMPLE_GESTURE_EVENT_START + 1)
 NS_EVENT_MESSAGE(NS_SIMPLE_GESTURE_SWIPE_UPDATE,   NS_SIMPLE_GESTURE_EVENT_START + 2)
 NS_EVENT_MESSAGE(NS_SIMPLE_GESTURE_SWIPE_END,      NS_SIMPLE_GESTURE_EVENT_START + 3)
-NS_EVENT_MESSAGE(NS_SIMPLE_GESTURE_SWIPE,          NS_SIMPLE_GESTURE_EVENT_START + 4)
+NS_EVENT_MESSAGE(eSwipeGesture,         NS_SIMPLE_GESTURE_EVENT_START + 4)
 NS_EVENT_MESSAGE(eMagnifyGestureStart,  NS_SIMPLE_GESTURE_EVENT_START + 5)
 NS_EVENT_MESSAGE(eMagnifyGestureUpdate, NS_SIMPLE_GESTURE_EVENT_START + 6)
 NS_EVENT_MESSAGE(eMagnifyGesture,       NS_SIMPLE_GESTURE_EVENT_START + 7)
 NS_EVENT_MESSAGE(eRotateGestureStart,   NS_SIMPLE_GESTURE_EVENT_START + 8)
 NS_EVENT_MESSAGE(eRotateGestureUpdate,  NS_SIMPLE_GESTURE_EVENT_START + 9)
 NS_EVENT_MESSAGE(eRotateGesture,        NS_SIMPLE_GESTURE_EVENT_START + 10)
 NS_EVENT_MESSAGE(eTapGesture,           NS_SIMPLE_GESTURE_EVENT_START + 11)
 NS_EVENT_MESSAGE(ePressTapGesture,      NS_SIMPLE_GESTURE_EVENT_START + 12)
--- a/widget/cocoa/SwipeTracker.mm
+++ b/widget/cocoa/SwipeTracker.mm
@@ -122,17 +122,17 @@ SwipeTracker::ProcessEvent(const PanGest
     double elapsedSeconds = std::max(0.008, (aEvent.mTimeStamp - mLastEventTimeStamp).ToSeconds());
     mCurrentVelocity = delta / elapsedSeconds;
     mLastEventTimeStamp = aEvent.mTimeStamp;
   } else {
     mEventsAreControllingSwipe = false;
     bool didSwipeSucceed = SwipingInAllowedDirection() && ComputeSwipeSuccess();
     double targetValue = 0.0;
     if (didSwipeSucceed) {
-      SendSwipeEvent(NS_SIMPLE_GESTURE_SWIPE, mSwipeDirection, 0.0);
+      SendSwipeEvent(eSwipeGesture, mSwipeDirection, 0.0);
       targetValue = SwipeSuccessTargetValue();
     }
     StartAnimating(targetValue);
   }
 
   return nsEventStatus_eConsumeNoDefault;
 }
 
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -4162,18 +4162,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
     return;
 
   nsAutoRetainCocoaObject kungFuDeathGrip(self);
 
   float deltaX = [anEvent deltaX];  // left=1.0, right=-1.0
   float deltaY = [anEvent deltaY];  // up=1.0, down=-1.0
 
   // Setup the "swipe" event.
-  WidgetSimpleGestureEvent geckoEvent(true, NS_SIMPLE_GESTURE_SWIPE,
-                                      mGeckoChild);
+  WidgetSimpleGestureEvent geckoEvent(true, eSwipeGesture, mGeckoChild);
   [self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
 
   // Record the left/right direction.
   if (deltaX > 0.0)
     geckoEvent.direction |= nsIDOMSimpleGestureEvent::DIRECTION_LEFT;
   else if (deltaX < 0.0)
     geckoEvent.direction |= nsIDOMSimpleGestureEvent::DIRECTION_RIGHT;