Bug 895274 part.241 Rename NS_TOUCH_START to eTouchStart r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 15 Sep 2015 00:14:34 +0900
changeset 294944 a92cec9902d70d52289ee2205b3f5f925c332e3c
parent 294943 823a3bba6c8bfedc3fcfddca882a79fce66c6235
child 294945 79b8d374b4fd3c310e3504831c188db145e30a17
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.241 Rename NS_TOUCH_START to eTouchStart r=smaug
accessible/generic/Accessible.cpp
dom/base/nsDOMWindowUtils.cpp
dom/events/Event.cpp
dom/events/EventNameList.h
dom/events/EventStateManager.cpp
dom/html/HTMLInputElement.cpp
dom/ipc/TabChild.cpp
dom/ipc/TabParent.cpp
gfx/layers/apz/util/APZEventState.cpp
layout/base/AccessibleCaretEventHub.cpp
layout/base/SelectionCarets.cpp
layout/base/TouchCaret.cpp
layout/base/TouchManager.cpp
layout/base/gtest/TestAccessibleCaretEventHub.cpp
layout/base/nsPresShell.cpp
layout/generic/nsFrame.cpp
layout/xul/nsResizerFrame.cpp
layout/xul/nsSliderFrame.cpp
widget/EventMessageList.h
widget/InputData.cpp
widget/android/AndroidJavaWrappers.cpp
widget/android/nsWindow.cpp
widget/nsBaseWidget.cpp
widget/uikit/nsWindow.mm
widget/windows/nsWindow.cpp
--- a/accessible/generic/Accessible.cpp
+++ b/accessible/generic/Accessible.cpp
@@ -1829,17 +1829,18 @@ Accessible::DispatchClickEvent(nsIConten
 
   nsSize size = frame->GetSize();
 
   nsRefPtr<nsPresContext> presContext = presShell->GetPresContext();
   int32_t x = presContext->AppUnitsToDevPixels(point.x + size.width / 2);
   int32_t y = presContext->AppUnitsToDevPixels(point.y + size.height / 2);
 
   // Simulate a touch interaction by dispatching touch events with mouse events.
-  nsCoreUtils::DispatchTouchEvent(NS_TOUCH_START, x, y, aContent, frame, presShell, widget);
+  nsCoreUtils::DispatchTouchEvent(eTouchStart, x, y, aContent, frame,
+                                  presShell, widget);
   nsCoreUtils::DispatchMouseEvent(eMouseDown, x, y, aContent, frame,
                                   presShell, widget);
   nsCoreUtils::DispatchTouchEvent(NS_TOUCH_END, x, y, aContent, frame, presShell, widget);
   nsCoreUtils::DispatchMouseEvent(eMouseUp, x, y, aContent, frame,
                                   presShell, widget);
 }
 
 void
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -957,17 +957,17 @@ nsDOMWindowUtils::SendTouchEventCommon(c
   // get the widget to send the event to
   nsPoint offset;
   nsCOMPtr<nsIWidget> widget = GetWidget(&offset);
   if (!widget) {
     return NS_ERROR_NULL_POINTER;
   }
   EventMessage msg;
   if (aType.EqualsLiteral("touchstart")) {
-    msg = NS_TOUCH_START;
+    msg = eTouchStart;
   } else if (aType.EqualsLiteral("touchmove")) {
     msg = NS_TOUCH_MOVE;
   } else if (aType.EqualsLiteral("touchend")) {
     msg = NS_TOUCH_END;
   } else if (aType.EqualsLiteral("touchcancel")) {
     msg = NS_TOUCH_CANCEL;
   } else {
     return NS_ERROR_UNEXPECTED;
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -794,17 +794,17 @@ Event::GetEventPopupControlState(WidgetE
       default:
         break;
       }
     }
     break;
   case eTouchEventClass:
     if (aEvent->mFlags.mIsTrusted) {
       switch (aEvent->mMessage) {
-      case NS_TOUCH_START :
+      case eTouchStart:
         if (PopupAllowedForEvent("touchstart")) {
           abuse = openControlled;
         }
         break;
       case NS_TOUCH_END :
         if (PopupAllowedForEvent("touchend")) {
           abuse = openControlled;
         }
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -563,17 +563,17 @@ WINDOW_ONLY_EVENT(moznetworkupload,
                   eBasicEventClass)
 WINDOW_ONLY_EVENT(moznetworkdownload,
                   eNetworkDownload,
                   EventNameType_None,
                   eBasicEventClass)
 #endif // MOZ_B2G
 
 TOUCH_EVENT(touchstart,
-            NS_TOUCH_START,
+            eTouchStart,
             EventNameType_All,
             eTouchEventClass)
 TOUCH_EVENT(touchend,
             NS_TOUCH_END,
             EventNameType_All,
             eTouchEventClass)
 TOUCH_EVENT(touchmove,
             NS_TOUCH_MOVE,
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -1148,17 +1148,17 @@ CrossProcessSafeEvent(const WidgetEvent&
     case eMouseEnterIntoWidget:
     case eMouseExitFromWidget:
       return true;
     default:
       return false;
     }
   case eTouchEventClass:
     switch (aEvent.mMessage) {
-    case NS_TOUCH_START:
+    case eTouchStart:
     case NS_TOUCH_MOVE:
     case NS_TOUCH_END:
     case NS_TOUCH_CANCEL:
       return true;
     default:
       return false;
     }
   case eDragEventClass:
@@ -1184,18 +1184,17 @@ EventStateManager::HandleCrossProcessEve
     return false;
   }
 
   // Collect the remote event targets we're going to forward this
   // event to.
   //
   // NB: the elements of |targets| must be unique, for correctness.
   nsAutoTArray<nsCOMPtr<nsIContent>, 1> targets;
-  if (aEvent->mClass != eTouchEventClass ||
-      aEvent->mMessage == NS_TOUCH_START) {
+  if (aEvent->mClass != eTouchEventClass || aEvent->mMessage == eTouchStart) {
     // If this event only has one target, and it's remote, add it to
     // the array.
     nsIFrame* frame = GetEventTarget();
     nsIContent* target = frame ? frame->GetContent() : nullptr;
     if (IsRemoteTarget(target)) {
       targets.AppendElement(target);
     }
   } else {
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -4082,17 +4082,17 @@ HTMLInputElement::PostHandleEventForRang
   if (!rangeFrame && mIsDraggingRange) {
     CancelRangeThumbDrag();
     return;
   }
 
   switch (aVisitor.mEvent->mMessage)
   {
     case eMouseDown:
-    case NS_TOUCH_START: {
+    case eTouchStart: {
       if (mIsDraggingRange) {
         break;
       }
       if (nsIPresShell::GetCapturingContent()) {
         break; // don't start drag if someone else is already capturing
       }
       WidgetInputEvent* inputEvent = aVisitor.mEvent->AsInputEvent();
       if (inputEvent->IsShift() || inputEvent->IsControl() ||
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -1998,17 +1998,17 @@ TabChild::UpdateTapState(const WidgetTou
                                 "ui.click_hold_context_menus.delay", 500);
   }
 
   if (aEvent.touches.Length() == 0) {
     return;
   }
 
   bool currentlyTrackingTouch = (mActivePointerId >= 0);
-  if (aEvent.mMessage == NS_TOUCH_START) {
+  if (aEvent.mMessage == eTouchStart) {
     if (currentlyTrackingTouch || aEvent.touches.Length() > 1) {
       // We're tracking a possible tap for another point, or we saw a
       // touchstart for a later pointer after we canceled tracking of
       // the first point.  Ignore this one.
       return;
     }
     if (aStatus == nsEventStatus_eConsumeNoDefault ||
         TouchManager::gPreventMouseEvents ||
@@ -2123,17 +2123,17 @@ TabChild::RecvRealTouchEvent(const Widge
   TABC_LOG("Receiving touch event of type %d\n", aEvent.mMessage);
 
   WidgetTouchEvent localEvent(aEvent);
   localEvent.widget = mPuppetWidget;
 
   APZCCallbackHelper::ApplyCallbackTransform(localEvent, aGuid,
       mPuppetWidget->GetDefaultScale());
 
-  if (localEvent.mMessage == NS_TOUCH_START && AsyncPanZoomEnabled()) {
+  if (localEvent.mMessage == eTouchStart && AsyncPanZoomEnabled()) {
     if (gfxPrefs::TouchActionEnabled()) {
       APZCCallbackHelper::SendSetAllowedTouchBehaviorNotification(mPuppetWidget,
           localEvent, aInputBlockId, mSetAllowedTouchBehaviorCallback);
     }
     nsCOMPtr<nsIDocument> document = GetDocument();
     APZCCallbackHelper::SendSetTargetAPZCNotification(mPuppetWidget, document,
         localEvent, aGuid, aInputBlockId);
   }
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -2984,17 +2984,17 @@ TabParent::InjectTouchEvent(const nsAStr
                             uint32_t* aRys,
                             float* aRotationAngles,
                             float* aForces,
                             uint32_t aCount,
                             int32_t aModifiers)
 {
   EventMessage msg;
   nsContentUtils::GetEventMessageAndAtom(aType, eTouchEventClass, &msg);
-  if (msg != NS_TOUCH_START && msg != NS_TOUCH_MOVE &&
+  if (msg != eTouchStart && msg != NS_TOUCH_MOVE &&
       msg != NS_TOUCH_END && msg != NS_TOUCH_CANCEL) {
     return NS_ERROR_FAILURE;
   }
 
   nsCOMPtr<nsIWidget> widget = GetWidget();
   if (!widget) {
     return NS_ERROR_FAILURE;
   }
--- a/gfx/layers/apz/util/APZEventState.cpp
+++ b/gfx/layers/apz/util/APZEventState.cpp
@@ -249,25 +249,25 @@ APZEventState::ProcessLongTap(const nsCO
 }
 
 void
 APZEventState::ProcessTouchEvent(const WidgetTouchEvent& aEvent,
                                  const ScrollableLayerGuid& aGuid,
                                  uint64_t aInputBlockId,
                                  nsEventStatus aApzResponse)
 {
-  if (aEvent.mMessage == NS_TOUCH_START && aEvent.touches.Length() > 0) {
+  if (aEvent.mMessage == eTouchStart && aEvent.touches.Length() > 0) {
     mActiveElementManager->SetTargetElement(aEvent.touches[0]->GetTarget());
   }
 
   bool isTouchPrevented = TouchManager::gPreventMouseEvents ||
       aEvent.mFlags.mMultipleActionsPrevented;
   bool sentContentResponse = false;
   switch (aEvent.mMessage) {
-  case NS_TOUCH_START: {
+  case eTouchStart: {
     mTouchEndCancelled = false;
     if (mPendingTouchPreventedResponse) {
       // We can enter here if we get two TOUCH_STARTs in a row and didn't
       // respond to the first one. Respond to it now.
       mContentReceivedInputBlockCallback(mPendingTouchPreventedGuid,
           mPendingTouchPreventedBlockId, false);
       sentContentResponse = true;
       mPendingTouchPreventedResponse = false;
--- a/layout/base/AccessibleCaretEventHub.cpp
+++ b/layout/base/AccessibleCaretEventHub.cpp
@@ -564,20 +564,20 @@ AccessibleCaretEventHub::HandleTouchEven
 {
   nsEventStatus rv = nsEventStatus_eIgnore;
 
   int32_t id = (mActiveTouchId == kInvalidTouchId ?
                 aEvent->touches[0]->Identifier() : mActiveTouchId);
   nsPoint point = GetTouchEventPosition(aEvent, id);
 
   switch (aEvent->mMessage) {
-  case NS_TOUCH_START:
-    AC_LOGV("Before NS_TOUCH_START, state: %s", mState->Name());
+  case eTouchStart:
+    AC_LOGV("Before eTouchStart, state: %s", mState->Name());
     rv = mState->OnPress(this, point, id);
-    AC_LOGV("After NS_TOUCH_START, state: %s, consume: %d", mState->Name(), rv);
+    AC_LOGV("After eTouchStart, state: %s, consume: %d", mState->Name(), rv);
     break;
 
   case NS_TOUCH_MOVE:
     AC_LOGV("Before NS_TOUCH_MOVE, state: %s", mState->Name());
     rv = mState->OnMove(this, point);
     AC_LOGV("After NS_TOUCH_MOVE, state: %s, consume: %d", mState->Name(), rv);
     break;
 
--- a/layout/base/SelectionCarets.cpp
+++ b/layout/base/SelectionCarets.cpp
@@ -199,21 +199,21 @@ SelectionCarets::HandleEvent(WidgetEvent
   // Get event coordinate relative to root frame
   nsIFrame* rootFrame = mPresShell->GetRootFrame();
   if (!rootFrame) {
     return nsEventStatus_eIgnore;
   }
   nsPoint ptInRoot =
     nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, movePoint, rootFrame);
 
-  if (aEvent->mMessage == NS_TOUCH_START ||
+  if (aEvent->mMessage == eTouchStart ||
       (aEvent->mMessage == eMouseDown &&
        mouseEvent->button == WidgetMouseEvent::eLeftButton)) {
     // If having a active touch, ignore other touch down event
-    if (aEvent->mMessage == NS_TOUCH_START && mActiveTouchId >= 0) {
+    if (aEvent->mMessage == eTouchStart && mActiveTouchId >= 0) {
       return nsEventStatus_eConsumeNoDefault;
     }
 
     mActiveTouchId = nowTouchId;
     mDownPoint = ptInRoot;
     if (IsOnStartFrameInner(ptInRoot)) {
       mDragMode = START_FRAME;
       mCaretCenterToDownPointOffsetY = GetCaretYCenterPosition() - ptInRoot.y;
--- a/layout/base/TouchCaret.cpp
+++ b/layout/base/TouchCaret.cpp
@@ -755,17 +755,17 @@ TouchCaret::HandleEvent(WidgetEvent* aEv
   MOZ_ASSERT(NS_IsMainThread());
   if (!IsDisplayable()) {
     return nsEventStatus_eIgnore;
   }
 
   nsEventStatus status = nsEventStatus_eIgnore;
 
   switch (aEvent->mMessage) {
-    case NS_TOUCH_START:
+    case eTouchStart:
       status = HandleTouchDownEvent(aEvent->AsTouchEvent());
       break;
     case eMouseDown:
       status = HandleMouseDownEvent(aEvent->AsMouseEvent());
       break;
     case NS_TOUCH_END:
       status = HandleTouchUpEvent(aEvent->AsTouchEvent());
       break;
@@ -1090,17 +1090,17 @@ TouchCaret::HandleTouchDownEvent(WidgetT
           }
         }
       }
       break;
 
     case TOUCHCARET_MOUSEDRAG_ACTIVE:
     case TOUCHCARET_TOUCHDRAG_ACTIVE:
     case TOUCHCARET_TOUCHDRAG_INACTIVE:
-      // Consume NS_TOUCH_START event.
+      // Consume eTouchStart event.
       status = nsEventStatus_eConsumeNoDefault;
       break;
   }
 
   // Cache active touch IDs in TOUCHDRAG states.
   if (mState == TOUCHCARET_TOUCHDRAG_ACTIVE ||
       mState == TOUCHCARET_TOUCHDRAG_INACTIVE) {
     mTouchesId.Clear();
--- a/layout/base/TouchManager.cpp
+++ b/layout/base/TouchManager.cpp
@@ -97,17 +97,17 @@ TouchManager::EvictTouches()
 bool
 TouchManager::PreHandleEvent(WidgetEvent* aEvent,
                              nsEventStatus* aStatus,
                              bool& aTouchIsNew,
                              bool& aIsHandlingUserInput,
                              nsCOMPtr<nsIContent>& aCurrentEventContent)
 {
   switch (aEvent->mMessage) {
-    case NS_TOUCH_START: {
+    case eTouchStart: {
       aIsHandlingUserInput = true;
       WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
       // if there is only one touch in this touchstart event, assume that it is
       // the start of a new touch session and evict any old touches in the
       // queue
       if (touchEvent->touches.Length() == 1) {
         WidgetTouchEvent::AutoTouchArray touches;
         gCaptureTouchList->Enumerate(&AppendToTouchList, (void *)&touches);
--- a/layout/base/gtest/TestAccessibleCaretEventHub.cpp
+++ b/layout/base/gtest/TestAccessibleCaretEventHub.cpp
@@ -158,17 +158,17 @@ public:
       new dom::Touch(identifier, point, radius, rotationAngle, force));
     event->touches.AppendElement(touch);
 
     return Move(event);
   }
 
   static UniquePtr<WidgetEvent> CreateTouchPressEvent(nscoord aX, nscoord aY)
   {
-    return CreateTouchEvent(NS_TOUCH_START, aX, aY);
+    return CreateTouchEvent(eTouchStart, aX, aY);
   }
 
   static UniquePtr<WidgetEvent> CreateTouchMoveEvent(nscoord aX, nscoord aY)
   {
     return CreateTouchEvent(NS_TOUCH_MOVE, aX, aY);
   }
 
   static UniquePtr<WidgetEvent> CreateTouchReleaseEvent(nscoord aX, nscoord aY)
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -6678,17 +6678,17 @@ DispatchPointerFromMouseOrTouch(PresShel
     // copy the event
     switch (touchEvent->mMessage) {
     case NS_TOUCH_MOVE:
       pointerMessage = ePointerMove;
       break;
     case NS_TOUCH_END:
       pointerMessage = ePointerUp;
       break;
-    case NS_TOUCH_START:
+    case eTouchStart:
       pointerMessage = ePointerDown;
       break;
     case NS_TOUCH_CANCEL:
       pointerMessage = ePointerCancel;
       break;
     default:
       return NS_OK;
     }
@@ -7280,34 +7280,33 @@ PresShell::HandleEvent(nsIFrame* aFrame,
       }
       else {
         ClearMouseCapture(nullptr);
         capturingContent = nullptr;
       }
     }
 
     // all touch events except for touchstart use a captured target
-    if (aEvent->mClass == eTouchEventClass &&
-        aEvent->mMessage != NS_TOUCH_START) {
+    if (aEvent->mClass == eTouchEventClass && aEvent->mMessage != eTouchStart) {
       captureRetarget = true;
     }
 
     WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
     bool isWindowLevelMouseExit = (aEvent->mMessage == eMouseExitFromWidget) &&
       (mouseEvent && mouseEvent->exit == WidgetMouseEvent::eTopLevel);
 
     // Get the frame at the event point. However, don't do this if we're
     // capturing and retargeting the event because the captured frame will
     // be used instead below. Also keep using the root frame if we're dealing
     // with a window-level mouse exit event since we want to start sending
     // mouse out events at the root EventStateManager.
     if (!captureRetarget && !isWindowLevelMouseExit) {
       nsPoint eventPoint;
       uint32_t flags = 0;
-      if (aEvent->mMessage == NS_TOUCH_START) {
+      if (aEvent->mMessage == eTouchStart) {
         flags |= INPUT_IGNORE_ROOT_SCROLL_FRAME;
         WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
         // if this is a continuing session, ensure that all these events are
         // in the same document by taking the target of the events already in
         // the capture list
         nsCOMPtr<nsIContent> anyTarget;
         if (TouchManager::gCaptureTouchList->Count() > 0 && touchEvent->touches.Length() > 1) {
           TouchManager::gCaptureTouchList->Enumerate(&FindAnyTarget, &anyTarget);
@@ -8058,17 +8057,17 @@ void
 PresShell::DispatchTouchEventToDOM(WidgetEvent* aEvent,
                                    nsEventStatus* aStatus,
                                    nsPresShellEventCB* aEventCB,
                                    bool aTouchIsNew)
 {
   // calling preventDefault on touchstart or the first touchmove for a
   // point prevents mouse events. calling it on the touchend should
   // prevent click dispatching.
-  bool canPrevent = (aEvent->mMessage == NS_TOUCH_START) ||
+  bool canPrevent = (aEvent->mMessage == eTouchStart) ||
                     (aEvent->mMessage == NS_TOUCH_MOVE && aTouchIsNew) ||
                     (aEvent->mMessage == NS_TOUCH_END);
   bool preventDefault = false;
   nsEventStatus tmpStatus = nsEventStatus_eIgnore;
   WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
 
   // loop over all touches and dispatch events on any that have changed
   for (dom::Touch* touch : touchEvent->touches) {
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -2656,18 +2656,17 @@ nsFrame::HandleEvent(nsPresContext* aPre
     // XXX If the second argument of HandleDrag() is WidgetMouseEvent,
     //     the implementation becomes simpler.
     return HandleDrag(aPresContext, aEvent, aEventStatus);
   }
 
   if ((aEvent->mClass == eMouseEventClass &&
        aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton) ||
       aEvent->mClass == eTouchEventClass) {
-    if (aEvent->mMessage == eMouseDown ||
-        aEvent->mMessage == NS_TOUCH_START) {
+    if (aEvent->mMessage == eMouseDown || aEvent->mMessage == eTouchStart) {
       HandlePress(aPresContext, aEvent, aEventStatus);
     } else if (aEvent->mMessage == eMouseUp ||
                aEvent->mMessage == NS_TOUCH_END) {
       HandleRelease(aPresContext, aEvent, aEventStatus);
     }
   }
   return NS_OK;
 }
--- a/layout/xul/nsResizerFrame.cpp
+++ b/layout/xul/nsResizerFrame.cpp
@@ -57,17 +57,17 @@ nsResizerFrame::HandleEvent(nsPresContex
   if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
     return NS_OK;
   }
 
   nsWeakFrame weakFrame(this);
   bool doDefault = true;
 
   switch (aEvent->mMessage) {
-    case NS_TOUCH_START:
+    case eTouchStart:
     case eMouseDown: {
       if (aEvent->mClass == eTouchEventClass ||
           (aEvent->mClass == eMouseEventClass &&
            aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton)) {
         nsCOMPtr<nsIBaseWindow> window;
         nsIPresShell* presShell = aPresContext->GetPresShell();
         nsIContent* contentToResize =
           GetContentToResize(presShell, getter_AddRefs(window));
--- a/layout/xul/nsSliderFrame.cpp
+++ b/layout/xul/nsSliderFrame.cpp
@@ -1044,17 +1044,17 @@ nsSliderFrame::RemoveListener()
   thumbFrame->GetContent()->
     RemoveSystemEventListener(NS_LITERAL_STRING("mousedown"), mMediator, false);
 }
 
 bool
 nsSliderFrame::ShouldScrollForEvent(WidgetGUIEvent* aEvent)
 {
   switch (aEvent->mMessage) {
-    case NS_TOUCH_START:
+    case eTouchStart:
     case NS_TOUCH_END:
       return true;
     case eMouseDown:
     case eMouseUp: {
       uint16_t button = aEvent->AsMouseEvent()->button;
 #ifdef MOZ_WIDGET_GTK
       return (button == WidgetMouseEvent::eLeftButton) ||
              (button == WidgetMouseEvent::eRightButton && GetScrollToClick()) ||
@@ -1071,17 +1071,17 @@ nsSliderFrame::ShouldScrollForEvent(Widg
 
 bool
 nsSliderFrame::ShouldScrollToClickForEvent(WidgetGUIEvent* aEvent)
 {
   if (!ShouldScrollForEvent(aEvent)) {
     return false;
   }
 
-  if (aEvent->mMessage == NS_TOUCH_START) {
+  if (aEvent->mMessage == eTouchStart) {
     return GetScrollToClick();
   }
 
   if (aEvent->mMessage != eMouseDown) {
     return false;
   }
 
 #if defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK)
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -365,17 +365,17 @@ NS_EVENT_MESSAGE(eDeviceLight,          
 NS_EVENT_MESSAGE(NS_SHOW_EVENT,          5000)
 
 // Fullscreen DOM API
 NS_EVENT_MESSAGE(eFullscreenEventFirst,  5100)
 NS_EVENT_MESSAGE(eFullscreenChange,      eFullscreenEventFirst)
 NS_EVENT_MESSAGE(eFullscreenError,       eFullscreenEventFirst + 1)
 
 NS_EVENT_MESSAGE(eTouchEventFirst,       5200)
-NS_EVENT_MESSAGE(NS_TOUCH_START,         eTouchEventFirst)
+NS_EVENT_MESSAGE(eTouchStart,            eTouchEventFirst)
 NS_EVENT_MESSAGE(NS_TOUCH_MOVE,          eTouchEventFirst + 1)
 NS_EVENT_MESSAGE(NS_TOUCH_END,           eTouchEventFirst + 2)
 NS_EVENT_MESSAGE(NS_TOUCH_CANCEL,        eTouchEventFirst + 3)
 
 // Pointerlock DOM API
 NS_EVENT_MESSAGE(ePointerLockEventFirst, 5300)
 NS_EVENT_MESSAGE(ePointerLockChange,     ePointerLockEventFirst)
 NS_EVENT_MESSAGE(ePointerLockError,      ePointerLockEventFirst + 1)
--- a/widget/InputData.cpp
+++ b/widget/InputData.cpp
@@ -31,17 +31,17 @@ already_AddRefed<Touch> SingleTouchData:
 MultiTouchInput::MultiTouchInput(const WidgetTouchEvent& aTouchEvent)
   : InputData(MULTITOUCH_INPUT, aTouchEvent.time, aTouchEvent.timeStamp,
               aTouchEvent.modifiers)
 {
   MOZ_ASSERT(NS_IsMainThread(),
              "Can only copy from WidgetTouchEvent on main thread");
 
   switch (aTouchEvent.mMessage) {
-    case NS_TOUCH_START:
+    case eTouchStart:
       mType = MULTITOUCH_START;
       break;
     case NS_TOUCH_MOVE:
       mType = MULTITOUCH_MOVE;
       break;
     case NS_TOUCH_END:
       mType = MULTITOUCH_END;
       break;
@@ -79,17 +79,17 @@ WidgetTouchEvent
 MultiTouchInput::ToWidgetTouchEvent(nsIWidget* aWidget) const
 {
   MOZ_ASSERT(NS_IsMainThread(),
              "Can only convert To WidgetTouchEvent on main thread");
 
   EventMessage touchEventMessage = eVoidEvent;
   switch (mType) {
   case MULTITOUCH_START:
-    touchEventMessage = NS_TOUCH_START;
+    touchEventMessage = eTouchStart;
     break;
   case MULTITOUCH_MOVE:
     touchEventMessage = NS_TOUCH_MOVE;
     break;
   case MULTITOUCH_END:
     touchEventMessage = NS_TOUCH_END;
     break;
   case MULTITOUCH_CANCEL:
--- a/widget/android/AndroidJavaWrappers.cpp
+++ b/widget/android/AndroidJavaWrappers.cpp
@@ -696,17 +696,17 @@ AndroidGeckoEvent::MakeTouchEvent(nsIWid
     switch (Action()) {
         case AndroidMotionEvent::ACTION_HOVER_ENTER: {
             if (ToolTypes()[0] == AndroidMotionEvent::TOOL_TYPE_MOUSE) {
                 break;
             }
         }
         case AndroidMotionEvent::ACTION_DOWN:
         case AndroidMotionEvent::ACTION_POINTER_DOWN: {
-            type = NS_TOUCH_START;
+            type = eTouchStart;
             break;
         }
         case AndroidMotionEvent::ACTION_HOVER_MOVE: {
             if (ToolTypes()[0] == AndroidMotionEvent::TOOL_TYPE_MOUSE) {
                 break;
             }
         }
         case AndroidMotionEvent::ACTION_MOVE: {
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -1059,17 +1059,17 @@ bool nsWindow::OnMultitouchEvent(Android
         nsEventStatus status;
         DispatchEvent(&event, status);
         // We check mMultipleActionsPrevented because that's what <input type=range>
         // sets when someone starts dragging the thumb. It doesn't set the status
         // because it doesn't want to prevent the code that gives the input focus
         // from running.
         preventDefaultActions = (status == nsEventStatus_eConsumeNoDefault ||
                                 event.mFlags.mMultipleActionsPrevented);
-        isDownEvent = (event.mMessage == NS_TOUCH_START);
+        isDownEvent = (event.mMessage == eTouchStart);
     }
 
     if (isDownEvent && event.touches.Length() == 1) {
         // Since touch events don't get retargeted by PositionedEventTargeting.cpp
         // code on Fennec, we dispatch a dummy mouse event that *does* get
         // retargeted. The Fennec browser.js code can use this to activate the
         // highlight element in case the this touchstart is the start of a tap.
         WidgetMouseEvent hittest(true, eMouseHitTest, this,
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -972,17 +972,17 @@ nsBaseWidget::ProcessUntransformedAPZEve
   DispatchEvent(aEvent, status);
 
   if (mAPZC && !context.WasRoutedToChildProcess()) {
     // EventStateManager did not route the event into the child process.
     // It's safe to communicate to APZ that the event has been processed.
     // TODO: Eventually we'll be able to move the SendSetTargetAPZCNotification
     // call into APZEventState::Process*Event() as well.
     if (WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent()) {
-      if (touchEvent->mMessage == NS_TOUCH_START) {
+      if (touchEvent->mMessage == eTouchStart) {
         if (gfxPrefs::TouchActionEnabled()) {
           APZCCallbackHelper::SendSetAllowedTouchBehaviorNotification(this, *touchEvent,
               aInputBlockId, mSetAllowedTouchBehaviorCallback);
         }
         APZCCallbackHelper::SendSetTargetAPZCNotification(this, GetDocument(), *aEvent,
             aGuid, aInputBlockId);
       }
       mAPZEventState->ProcessTouchEvent(*touchEvent, aGuid, aInputBlockId, aApzResponse);
--- a/widget/uikit/nsWindow.mm
+++ b/widget/uikit/nsWindow.mm
@@ -196,17 +196,19 @@ private:
     ALOG("[ChildView[%p] touchesBegan", self);
     if (!mGeckoChild)
         return;
 
     for (UITouch* touch : touches) {
         CFDictionaryAddValue(mTouches, touch, (void*)mNextTouchID);
         mNextTouchID++;
     }
-    [self sendTouchEvent:NS_TOUCH_START touches:[event allTouches] widget:mGeckoChild];
+    [self sendTouchEvent:eTouchStart
+                 touches:[event allTouches]
+                  widget:mGeckoChild];
 }
 
 - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
 {
     ALOG("[ChildView[%p] touchesCancelled", self);
     [self sendTouchEvent:NS_TOUCH_CANCEL touches:touches widget:mGeckoChild];
     for (UITouch* touch : touches) {
         CFDictionaryRemoveValue(mTouches, touch);
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -6398,17 +6398,17 @@ bool nsWindow::OnTouch(WPARAM wParam, LP
         if (touchInput.mTimeStamp.IsNull()) {
           // Initialize a touch event to send.
           touchInput.mType = MultiTouchInput::MULTITOUCH_MOVE;
           touchInput.mTime = ::GetMessageTime();
           touchInput.mTimeStamp = GetMessageTimeStamp(touchInput.mTime);
           ModifierKeyState modifierKeyState;
           touchInput.modifiers = modifierKeyState.GetModifiers();
         }
-        // Pres shell expects this event to be a NS_TOUCH_START
+        // Pres shell expects this event to be a eTouchStart
         // if any new contact points have been added since the last event sent.
         if (pInputs[i].dwFlags & TOUCHEVENTF_DOWN) {
           touchInput.mType = MultiTouchInput::MULTITOUCH_START;
         }
         addToEvent = true;
       }
       if (pInputs[i].dwFlags & TOUCHEVENTF_UP) {
         // Pres shell expects removed contacts points to be delivered in a separate