Bug 895274 part.268 Rename NS_SIMPLE_GESTURE_SWIPE_MAY_START to eSwipeGestureMayStart r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 15 Sep 2015 00:14:38 +0900
changeset 262355 f2efb808b885285d98a7453a8b17b3878260ab9c
parent 262354 a158c3a14239946a596babf50b3886d34ca44792
child 262356 e69d4cf68a8729310ca15166fc3d8f0951753430
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.268 Rename NS_SIMPLE_GESTURE_SWIPE_MAY_START to eSwipeGestureMayStart r=smaug
dom/base/nsDOMWindowUtils.cpp
dom/events/EventNameList.h
widget/EventMessageList.h
widget/cocoa/nsChildView.mm
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -1291,19 +1291,19 @@ nsDOMWindowUtils::SendSimpleGestureEvent
 
   // get the widget to send the event to
   nsPoint offset;
   nsCOMPtr<nsIWidget> widget = GetWidget(&offset);
   if (!widget)
     return NS_ERROR_FAILURE;
 
   EventMessage msg;
-  if (aType.EqualsLiteral("MozSwipeGestureMayStart"))
-    msg = NS_SIMPLE_GESTURE_SWIPE_MAY_START;
-  else if (aType.EqualsLiteral("MozSwipeGestureStart")) {
+  if (aType.EqualsLiteral("MozSwipeGestureMayStart")) {
+    msg = eSwipeGestureMayStart;
+  } else if (aType.EqualsLiteral("MozSwipeGestureStart")) {
     msg = eSwipeGestureStart;
   } else if (aType.EqualsLiteral("MozSwipeGestureUpdate")) {
     msg = eSwipeGestureUpdate;
   } else if (aType.EqualsLiteral("MozSwipeGestureEnd")) {
     msg = eSwipeGestureEnd;
   } else if (aType.EqualsLiteral("MozSwipeGesture")) {
     msg = eSwipeGesture;
   } else if (aType.EqualsLiteral("MozMagnifyGestureStart")) {
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -843,17 +843,17 @@ NON_IDL_EVENT(gamepadconnected,
 NON_IDL_EVENT(gamepaddisconnected,
               eGamepadDisconnected,
               EventNameType_None,
               eBasicEventClass)
 #endif
 
 // Simple gesture events
 NON_IDL_EVENT(MozSwipeGestureMayStart,
-              NS_SIMPLE_GESTURE_SWIPE_MAY_START,
+              eSwipeGestureMayStart,
               EventNameType_None,
               eSimpleGestureEventClass)
 NON_IDL_EVENT(MozSwipeGestureStart,
               eSwipeGestureStart,
               EventNameType_None,
               eSimpleGestureEventClass)
 NON_IDL_EVENT(MozSwipeGestureUpdate,
               eSwipeGestureUpdate,
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -267,17 +267,17 @@ NS_EVENT_MESSAGE(eDurationChange,       
 NS_EVENT_MESSAGE(eVolumeChange,         eMediaEventFirst + 19)
 
 // paint notification events
 NS_EVENT_MESSAGE(ePaintEventFirst,      3400)
 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(eSwipeGestureMayStart, NS_SIMPLE_GESTURE_EVENT_START)
 NS_EVENT_MESSAGE(eSwipeGestureStart,    NS_SIMPLE_GESTURE_EVENT_START + 1)
 NS_EVENT_MESSAGE(eSwipeGestureUpdate,   NS_SIMPLE_GESTURE_EVENT_START + 2)
 NS_EVENT_MESSAGE(eSwipeGestureEnd,      NS_SIMPLE_GESTURE_EVENT_START + 3)
 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)
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -2594,17 +2594,18 @@ nsChildView::SendMayStartSwipe(const moz
     : (uint32_t)nsIDOMSimpleGestureEvent::DIRECTION_LEFT;
 
   // We're ready to start the animation. Tell Gecko about it, and at the same
   // time ask it if it really wants to start an animation for this event.
   // This event also reports back the directions that we can swipe in.
   LayoutDeviceIntPoint position =
     RoundedToInt(aSwipeStartEvent.mPanStartPoint * ScreenToLayoutDeviceScale(1));
   WidgetSimpleGestureEvent geckoEvent =
-    SwipeTracker::CreateSwipeGestureEvent(NS_SIMPLE_GESTURE_SWIPE_MAY_START, this, position);
+    SwipeTracker::CreateSwipeGestureEvent(eSwipeGestureMayStart, this,
+                                          position);
   geckoEvent.direction = direction;
   geckoEvent.delta = 0.0;
   geckoEvent.allowedDirections = 0;
   bool shouldStartSwipe = DispatchWindowEvent(geckoEvent); // event cancelled == swipe should start
 
   SwipeInfo result = { shouldStartSwipe, geckoEvent.allowedDirections };
   return result;
 }