Bug 895274 part.38 Rename NS_MOUSE_MOZLONGTAP to eMouseLongTap r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Sat, 29 Aug 2015 08:58:33 +0900
changeset 259951 5899c44ed9ce7f54da590ce89d8922d34e4b7ac9
parent 259950 be7520290d1273ee2c9245f1347f97933d50b216
child 259952 b45aad1fa02830e971c0eaf145a5b236a9c312cd
push id29296
push userryanvm@gmail.com
push dateSun, 30 Aug 2015 19:45:10 +0000
treeherdermozilla-central@2ad5077d86ba [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.38 Rename NS_MOUSE_MOZLONGTAP to eMouseLongTap r=smaug
gfx/layers/apz/util/APZCCallbackHelper.cpp
gfx/layers/apz/util/APZEventState.cpp
layout/base/AccessibleCaretEventHub.cpp
layout/base/SelectionCarets.cpp
layout/base/TouchCaret.cpp
layout/base/gtest/TestAccessibleCaretEventHub.cpp
widget/EventMessageList.h
widget/android/nsWindow.cpp
--- a/gfx/layers/apz/util/APZCCallbackHelper.cpp
+++ b/gfx/layers/apz/util/APZCCallbackHelper.cpp
@@ -492,17 +492,17 @@ APZCCallbackHelper::DispatchWidgetEvent(
 nsEventStatus
 APZCCallbackHelper::DispatchSynthesizedMouseEvent(EventMessage aMsg,
                                                   uint64_t aTime,
                                                   const LayoutDevicePoint& aRefPoint,
                                                   Modifiers aModifiers,
                                                   nsIWidget* aWidget)
 {
   MOZ_ASSERT(aMsg == eMouseMove || aMsg == eMouseDown ||
-             aMsg == eMouseUp || aMsg == NS_MOUSE_MOZLONGTAP);
+             aMsg == eMouseUp || aMsg == eMouseLongTap);
 
   WidgetMouseEvent event(true, aMsg, nullptr,
                          WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
   event.refPoint = LayoutDeviceIntPoint(aRefPoint.x, aRefPoint.y);
   event.time = aTime;
   event.button = WidgetMouseEvent::eLeftButton;
   event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
   event.ignoreRootScrollFrame = true;
--- a/gfx/layers/apz/util/APZEventState.cpp
+++ b/gfx/layers/apz/util/APZEventState.cpp
@@ -232,17 +232,19 @@ APZEventState::ProcessLongTap(const nsCO
 
   // If no one handle context menu, fire MOZLONGTAP event
   if (!eventHandled) {
     LayoutDevicePoint currentPoint =
         APZCCallbackHelper::ApplyCallbackTransform(aPoint, aGuid)
       * widget->GetDefaultScale();
     int time = 0;
     nsEventStatus status =
-        APZCCallbackHelper::DispatchSynthesizedMouseEvent(NS_MOUSE_MOZLONGTAP, time, currentPoint, aModifiers, widget);
+        APZCCallbackHelper::DispatchSynthesizedMouseEvent(eMouseLongTap, time,
+                                                          currentPoint,
+                                                          aModifiers, widget);
     eventHandled = (status == nsEventStatus_eConsumeNoDefault);
     APZES_LOG("MOZLONGTAP event handled: %d\n", eventHandled);
   }
 
   mContentReceivedInputBlockCallback->Run(aGuid, aInputBlockId, eventHandled);
 }
 
 void
--- a/layout/base/AccessibleCaretEventHub.cpp
+++ b/layout/base/AccessibleCaretEventHub.cpp
@@ -516,20 +516,20 @@ AccessibleCaretEventHub::HandleMouseEven
 
   case eMouseUp:
     AC_LOGV("Before eMouseUp, state: %s", mState->Name());
     rv = mState->OnRelease(this);
     AC_LOGV("After eMouseUp, state: %s, consume: %d", mState->Name(),
             rv);
     break;
 
-  case NS_MOUSE_MOZLONGTAP:
-    AC_LOGV("Before NS_MOUSE_MOZLONGTAP, state: %s", mState->Name());
+  case eMouseLongTap:
+    AC_LOGV("Before eMouseLongTap, state: %s", mState->Name());
     rv = mState->OnLongTap(this, point);
-    AC_LOGV("After NS_MOUSE_MOZLONGTAP, state: %s, consume: %d", mState->Name(),
+    AC_LOGV("After eMouseLongTap, state: %s, consume: %d", mState->Name(),
             rv);
     break;
 
   default:
     break;
   }
 
   return rv;
--- a/layout/base/SelectionCarets.cpp
+++ b/layout/base/SelectionCarets.cpp
@@ -266,25 +266,25 @@ SelectionCarets::HandleEvent(WidgetEvent
     }
 
     nsPoint delta = mDownPoint - ptInRoot;
     if (NS_hypot(delta.x, delta.y) >
           nsPresContext::AppUnitsPerCSSPixel() * kMoveStartTolerancePx) {
       CancelLongTapDetector();
     }
 
-  } else if (aEvent->mMessage == NS_MOUSE_MOZLONGTAP) {
+  } else if (aEvent->mMessage == eMouseLongTap) {
     if (!mVisible || !sSelectionCaretDetectsLongTap) {
-      SELECTIONCARETS_LOG("SelectWord from NS_MOUSE_MOZLONGTAP");
+      SELECTIONCARETS_LOG("SelectWord from eMouseLongTap");
 
       mDownPoint = ptInRoot;
       nsresult wordSelected = SelectWord();
 
       if (NS_FAILED(wordSelected)) {
-        SELECTIONCARETS_LOG("SelectWord from NS_MOUSE_MOZLONGTAP failed!");
+        SELECTIONCARETS_LOG("SelectWord from eMouseLongTap failed!");
         return nsEventStatus_eIgnore;
       }
 
       return nsEventStatus_eConsumeNoDefault;
     }
   }
   return nsEventStatus_eIgnore;
 }
--- a/layout/base/TouchCaret.cpp
+++ b/layout/base/TouchCaret.cpp
@@ -788,17 +788,17 @@ TouchCaret::HandleEvent(WidgetEvent* aEv
     case eKeyPress:
     case NS_WHEEL_WHEEL:
     case NS_WHEEL_START:
     case NS_WHEEL_STOP:
       // Disable touch caret while key/wheel event is received.
       TOUCHCARET_LOG("Receive key/wheel event %d", aEvent->mMessage);
       SetVisibility(false);
       break;
-    case NS_MOUSE_MOZLONGTAP:
+    case eMouseLongTap:
       if (mState == TOUCHCARET_TOUCHDRAG_ACTIVE) {
         // Disable long tap event from APZ while dragging the touch caret.
         status = nsEventStatus_eConsumeNoDefault;
       }
       break;
     default:
       break;
   }
--- a/layout/base/gtest/TestAccessibleCaretEventHub.cpp
+++ b/layout/base/gtest/TestAccessibleCaretEventHub.cpp
@@ -136,17 +136,17 @@ public:
 
   static UniquePtr<WidgetEvent> CreateMouseReleaseEvent(nscoord aX, nscoord aY)
   {
     return CreateMouseEvent(eMouseUp, aX, aY);
   }
 
   static UniquePtr<WidgetEvent> CreateLongTapEvent(nscoord aX, nscoord aY)
   {
-    return CreateMouseEvent(NS_MOUSE_MOZLONGTAP, aX, aY);
+    return CreateMouseEvent(eMouseLongTap, aX, aY);
   }
 
   static UniquePtr<WidgetEvent> CreateTouchEvent(EventMessage aMessage,
                                                  nscoord aX,
                                                  nscoord aY)
   {
     auto event = MakeUnique<WidgetTouchEvent>(true, aMessage, nullptr);
     int32_t identifier = 0;
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -55,17 +55,17 @@ NS_EVENT_MESSAGE(eMouseDoubleClick,     
 NS_EVENT_MESSAGE(eMouseClick,           eMouseEventFirst + 27)
 // eMouseActivate is fired when the widget is activated by a click.
 NS_EVENT_MESSAGE(eMouseActivate,        eMouseEventFirst + 30)
 NS_EVENT_MESSAGE(eMouseOver,            eMouseEventFirst + 31)
 NS_EVENT_MESSAGE(eMouseOut,             eMouseEventFirst + 32)
 NS_EVENT_MESSAGE(eMouseHitTest,         eMouseEventFirst + 33)
 NS_EVENT_MESSAGE(eMouseEnter,           eMouseEventFirst + 34)
 NS_EVENT_MESSAGE(eMouseLeave,           eMouseEventFirst + 35)
-NS_EVENT_MESSAGE(NS_MOUSE_MOZLONGTAP,   eMouseEventFirst + 36)
+NS_EVENT_MESSAGE(eMouseLongTap,         eMouseEventFirst + 36)
 
 // Pointer spec events
 NS_EVENT_MESSAGE(NS_POINTER_EVENT_START,  4400)
 NS_EVENT_MESSAGE(NS_POINTER_MOVE,         NS_POINTER_EVENT_START)
 NS_EVENT_MESSAGE(NS_POINTER_UP,           NS_POINTER_EVENT_START + 1)
 NS_EVENT_MESSAGE(NS_POINTER_DOWN,         NS_POINTER_EVENT_START + 2)
 NS_EVENT_MESSAGE(NS_POINTER_OVER,         NS_POINTER_EVENT_START + 22)
 NS_EVENT_MESSAGE(NS_POINTER_OUT,          NS_POINTER_EVENT_START + 23)
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -1016,17 +1016,17 @@ nsWindow::OnLongTapEvent(AndroidGeckoEve
 
     CSSPoint pt;
     const nsTArray<nsIntPoint>& points = ae->Points();
     if (points.Length() > 0) {
         pt = CSSPoint(points[0].x, points[0].y);
     }
 
     // Send the LongTap event to Gecko.
-    WidgetMouseEvent event(true, NS_MOUSE_MOZLONGTAP, this,
+    WidgetMouseEvent event(true, eMouseLongTap, this,
         WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
     event.button = WidgetMouseEvent::eLeftButton;
     event.refPoint =
         RoundedToInt(pt * GetDefaultScale()) - WidgetToScreenOffset();
     event.clickCount = 1;
     event.time = ae->Time();
     event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
     event.ignoreRootScrollFrame = true;