Bug 895274 part.257 Rename NS_SIMPLE_GESTURE_TAP to eTapGesture r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 15 Sep 2015 00:14:36 +0900
changeset 283034 820d0930ab430c74ccb7e60dd0968647bc2e6889
parent 283033 85a692a19853eb3f3f6594ebedbe9170d8dbd103
child 283035 9981f3b651a401d639ee0f881ce71185117ff956
push id8456
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:31:52 +0000
treeherdermozilla-aurora@7f2f0fb041b1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs895274
milestone43.0a1
Bug 895274 part.257 Rename NS_SIMPLE_GESTURE_TAP to eTapGesture 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
@@ -1313,19 +1313,19 @@ nsDOMWindowUtils::SendSimpleGestureEvent
   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"))
-    msg = NS_SIMPLE_GESTURE_TAP;
-  else if (aType.EqualsLiteral("MozPressTapGesture")) {
+  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")) {
     msg = eEdgeUICompleted;
   } else {
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -887,17 +887,17 @@ NON_IDL_EVENT(MozRotateGestureUpdate,
               NS_SIMPLE_GESTURE_ROTATE_UPDATE,
               EventNameType_None,
               eSimpleGestureEventClass)
 NON_IDL_EVENT(MozRotateGesture,
               NS_SIMPLE_GESTURE_ROTATE,
               EventNameType_None,
               eSimpleGestureEventClass)
 NON_IDL_EVENT(MozTapGesture,
-              NS_SIMPLE_GESTURE_TAP,
+              eTapGesture,
               EventNameType_None,
               eSimpleGestureEventClass)
 NON_IDL_EVENT(MozPressTapGesture,
               ePressTapGesture,
               EventNameType_None,
               eSimpleGestureEventClass)
 NON_IDL_EVENT(MozEdgeUIStarted,
               eEdgeUIStarted,
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -278,17 +278,17 @@ NS_EVENT_MESSAGE(NS_SIMPLE_GESTURE_SWIPE
 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(NS_SIMPLE_GESTURE_TAP,            NS_SIMPLE_GESTURE_EVENT_START + 11)
+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)
 NS_EVENT_MESSAGE(ePluginInputEvent,     ePluginEventFirst)
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -4256,18 +4256,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 
   if (!anEvent || !mGeckoChild) {
     return;
   }
 
   nsAutoRetainCocoaObject kungFuDeathGrip(self);
 
   // Setup the "double tap" event.
-  WidgetSimpleGestureEvent geckoEvent(true, NS_SIMPLE_GESTURE_TAP,
-                                      mGeckoChild);
+  WidgetSimpleGestureEvent geckoEvent(true, eTapGesture, mGeckoChild);
   [self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
   geckoEvent.clickCount = 1;
 
   // Send the event.
   mGeckoChild->DispatchWindowEvent(geckoEvent);
 
   // Clear the gesture state
   mGestureState = eGestureState_None;
--- a/widget/windows/nsWinGesture.cpp
+++ b/widget/windows/nsWinGesture.cpp
@@ -389,23 +389,21 @@ nsWinGesture::ProcessGestureMessage(HWND
       else if (gi.dwFlags & GF_END)
         evt.mMessage = NS_SIMPLE_GESTURE_ROTATE;
       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 = NS_SIMPLE_GESTURE_TAP;
+      // Normally maps to "restore" from whatever you may have recently changed.
+      // A simple double click.
+      evt.mMessage = eTapGesture;
       evt.clickCount = 1;
-    }
-    break;
+      break;
 
     case GID_PRESSANDTAP:
       // Two finger right click. Defaults to right click if it falls through.
       evt.mMessage = ePressTapGesture;
       evt.clickCount = 1;
       break;
   }