Bug 895274 part.258 Rename NS_SIMPLE_GESTURE_ROTATE to eRotateGesture r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 15 Sep 2015 00:14:36 +0900
changeset 294961 9981f3b651a401d639ee0f881ce71185117ff956
parent 294960 820d0930ab430c74ccb7e60dd0968647bc2e6889
child 294962 65489def5c252d57208ad763df49178df268113f
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [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.258 Rename NS_SIMPLE_GESTURE_ROTATE to eRotateGesture r=smaug
dom/base/nsDOMWindowUtils.cpp
dom/events/EventNameList.h
widget/EventMessageList.h
widget/cocoa/nsChildView.mm
widget/windows/nsWinGesture.cpp
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -1311,19 +1311,19 @@ nsDOMWindowUtils::SendSimpleGestureEvent
   else if (aType.EqualsLiteral("MozMagnifyGestureUpdate"))
     msg = NS_SIMPLE_GESTURE_MAGNIFY_UPDATE;
   else if (aType.EqualsLiteral("MozMagnifyGesture"))
     msg = NS_SIMPLE_GESTURE_MAGNIFY;
   else if (aType.EqualsLiteral("MozRotateGestureStart"))
     msg = NS_SIMPLE_GESTURE_ROTATE_START;
   else if (aType.EqualsLiteral("MozRotateGestureUpdate"))
     msg = NS_SIMPLE_GESTURE_ROTATE_UPDATE;
-  else if (aType.EqualsLiteral("MozRotateGesture"))
-    msg = NS_SIMPLE_GESTURE_ROTATE;
-  else if (aType.EqualsLiteral("MozTapGesture")) {
+  else if (aType.EqualsLiteral("MozRotateGesture")) {
+    msg = eRotateGesture;
+  } else if (aType.EqualsLiteral("MozTapGesture")) {
     msg = eTapGesture;
   } else if (aType.EqualsLiteral("MozPressTapGesture")) {
     msg = ePressTapGesture;
   } else if (aType.EqualsLiteral("MozEdgeUIStarted")) {
     msg = eEdgeUIStarted;
   } else if (aType.EqualsLiteral("MozEdgeUICanceled")) {
     msg = eEdgeUICanceled;
   } else if (aType.EqualsLiteral("MozEdgeUICompleted")) {
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -883,17 +883,17 @@ NON_IDL_EVENT(MozRotateGestureStart,
               NS_SIMPLE_GESTURE_ROTATE_START,
               EventNameType_None,
               eSimpleGestureEventClass)
 NON_IDL_EVENT(MozRotateGestureUpdate,
               NS_SIMPLE_GESTURE_ROTATE_UPDATE,
               EventNameType_None,
               eSimpleGestureEventClass)
 NON_IDL_EVENT(MozRotateGesture,
-              NS_SIMPLE_GESTURE_ROTATE,
+              eRotateGesture,
               EventNameType_None,
               eSimpleGestureEventClass)
 NON_IDL_EVENT(MozTapGesture,
               eTapGesture,
               EventNameType_None,
               eSimpleGestureEventClass)
 NON_IDL_EVENT(MozPressTapGesture,
               ePressTapGesture,
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -277,17 +277,17 @@ NS_EVENT_MESSAGE(NS_SIMPLE_GESTURE_SWIPE
 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(NS_SIMPLE_GESTURE_MAGNIFY_START,  NS_SIMPLE_GESTURE_EVENT_START + 5)
 NS_EVENT_MESSAGE(NS_SIMPLE_GESTURE_MAGNIFY_UPDATE, NS_SIMPLE_GESTURE_EVENT_START + 6)
 NS_EVENT_MESSAGE(NS_SIMPLE_GESTURE_MAGNIFY,        NS_SIMPLE_GESTURE_EVENT_START + 7)
 NS_EVENT_MESSAGE(NS_SIMPLE_GESTURE_ROTATE_START,   NS_SIMPLE_GESTURE_EVENT_START + 8)
 NS_EVENT_MESSAGE(NS_SIMPLE_GESTURE_ROTATE_UPDATE,  NS_SIMPLE_GESTURE_EVENT_START + 9)
-NS_EVENT_MESSAGE(NS_SIMPLE_GESTURE_ROTATE,         NS_SIMPLE_GESTURE_EVENT_START + 10)
+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)
 NS_EVENT_MESSAGE(eEdgeUIStarted,        NS_SIMPLE_GESTURE_EVENT_START + 13)
 NS_EVENT_MESSAGE(eEdgeUICanceled,       NS_SIMPLE_GESTURE_EVENT_START + 14)
 NS_EVENT_MESSAGE(eEdgeUICompleted,      NS_SIMPLE_GESTURE_EVENT_START + 15)
 
 // These are used to send native events to plugins.
 NS_EVENT_MESSAGE(ePluginEventFirst,     3600)
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -4347,18 +4347,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
       // Send the event.
       mGeckoChild->DispatchWindowEvent(geckoEvent);
     }
     break;
 
   case eGestureState_RotateGesture:
     {
       // Setup the "rotate" event.
-      WidgetSimpleGestureEvent geckoEvent(true, NS_SIMPLE_GESTURE_ROTATE,
-                                          mGeckoChild);
+      WidgetSimpleGestureEvent geckoEvent(true, eRotateGesture, mGeckoChild);
       [self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
       geckoEvent.delta = -mCumulativeRotation;
       if (mCumulativeRotation > 0.0) {
         geckoEvent.direction = nsIDOMSimpleGestureEvent::ROTATION_COUNTERCLOCKWISE;
       } else {
         geckoEvent.direction = nsIDOMSimpleGestureEvent::ROTATION_CLOCKWISE;
       }
 
--- a/widget/windows/nsWinGesture.cpp
+++ b/widget/windows/nsWinGesture.cpp
@@ -381,19 +381,19 @@ nsWinGesture::ProcessGestureMessage(HWND
 
       if (evt.delta > 0)
         evt.direction = nsIDOMSimpleGestureEvent::ROTATION_COUNTERCLOCKWISE;
       else if (evt.delta < 0)
         evt.direction = nsIDOMSimpleGestureEvent::ROTATION_CLOCKWISE;
 
       if (gi.dwFlags & GF_BEGIN)
         evt.mMessage = NS_SIMPLE_GESTURE_ROTATE_START;
-      else if (gi.dwFlags & GF_END)
-        evt.mMessage = NS_SIMPLE_GESTURE_ROTATE;
-      else
+      else if (gi.dwFlags & GF_END) {
+        evt.mMessage = eRotateGesture;
+      } else
         evt.mMessage = NS_SIMPLE_GESTURE_ROTATE_UPDATE;
     }
     break;
 
     case GID_TWOFINGERTAP:
       // Normally maps to "restore" from whatever you may have recently changed.
       // A simple double click.
       evt.mMessage = eTapGesture;