Bug 895274 part.243 Rename NS_TOUCH_END to eTouchEnd r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 15 Sep 2015 00:14:35 +0900
changeset 262347 aa8e1b6f6753c7f5d8413944b353bc2b18570a04
parent 262346 79b8d374b4fd3c310e3504831c188db145e30a17
child 262348 641727472a5c88c547a87e64ea6a9bd1124a2af1
push id29371
push userkwierso@gmail.com
push dateTue, 15 Sep 2015 00:13:11 +0000
treeherdermozilla-central@3eb37530c627 [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.243 Rename NS_TOUCH_END to eTouchEnd r=smaug
accessible/generic/Accessible.cpp
dom/base/nsDOMWindowUtils.cpp
dom/events/Event.cpp
dom/events/EventNameList.h
dom/events/EventStateManager.cpp
dom/events/TouchEvent.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/uikit/nsWindow.mm
widget/windows/nsWindow.cpp
--- a/accessible/generic/Accessible.cpp
+++ b/accessible/generic/Accessible.cpp
@@ -1833,17 +1833,18 @@ Accessible::DispatchClickEvent(nsIConten
   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(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::DispatchTouchEvent(eTouchEnd, x, y, aContent, frame,
+                                  presShell, widget);
   nsCoreUtils::DispatchMouseEvent(eMouseUp, x, y, aContent, frame,
                                   presShell, widget);
 }
 
 void
 Accessible::ScrollToPoint(uint32_t aCoordinateType, int32_t aX, int32_t aY)
 {
   nsIFrame* frame = GetFrame();
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -961,17 +961,17 @@ nsDOMWindowUtils::SendTouchEventCommon(c
     return NS_ERROR_NULL_POINTER;
   }
   EventMessage msg;
   if (aType.EqualsLiteral("touchstart")) {
     msg = eTouchStart;
   } else if (aType.EqualsLiteral("touchmove")) {
     msg = eTouchMove;
   } else if (aType.EqualsLiteral("touchend")) {
-    msg = NS_TOUCH_END;
+    msg = eTouchEnd;
   } else if (aType.EqualsLiteral("touchcancel")) {
     msg = NS_TOUCH_CANCEL;
   } else {
     return NS_ERROR_UNEXPECTED;
   }
   WidgetTouchEvent event(true, msg, widget);
   event.modifiers = nsContentUtils::GetWidgetModifiers(aModifiers);
   event.widget = widget;
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -799,17 +799,17 @@ Event::GetEventPopupControlState(WidgetE
   case eTouchEventClass:
     if (aEvent->mFlags.mIsTrusted) {
       switch (aEvent->mMessage) {
       case eTouchStart:
         if (PopupAllowedForEvent("touchstart")) {
           abuse = openControlled;
         }
         break;
-      case NS_TOUCH_END :
+      case eTouchEnd:
         if (PopupAllowedForEvent("touchend")) {
           abuse = openControlled;
         }
         break;
       default:
         break;
       }
     }
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -567,17 +567,17 @@ WINDOW_ONLY_EVENT(moznetworkdownload,
                   eBasicEventClass)
 #endif // MOZ_B2G
 
 TOUCH_EVENT(touchstart,
             eTouchStart,
             EventNameType_All,
             eTouchEventClass)
 TOUCH_EVENT(touchend,
-            NS_TOUCH_END,
+            eTouchEnd,
             EventNameType_All,
             eTouchEventClass)
 TOUCH_EVENT(touchmove,
             eTouchMove,
             EventNameType_All,
             eTouchEventClass )
 TOUCH_EVENT(touchcancel,
             NS_TOUCH_CANCEL,
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -1150,17 +1150,17 @@ CrossProcessSafeEvent(const WidgetEvent&
       return true;
     default:
       return false;
     }
   case eTouchEventClass:
     switch (aEvent.mMessage) {
     case eTouchStart:
     case eTouchMove:
-    case NS_TOUCH_END:
+    case eTouchEnd:
     case NS_TOUCH_CANCEL:
       return true;
     default:
       return false;
     }
   case eDragEventClass:
     switch (aEvent.mMessage) {
     case eDragOver:
--- a/dom/events/TouchEvent.cpp
+++ b/dom/events/TouchEvent.cpp
@@ -117,17 +117,17 @@ TouchEvent::InitTouchEvent(const nsAStri
   mChangedTouches = aChangedTouches;
 }
 
 TouchList*
 TouchEvent::Touches()
 {
   if (!mTouches) {
     WidgetTouchEvent* touchEvent = mEvent->AsTouchEvent();
-    if (mEvent->mMessage == NS_TOUCH_END ||
+    if (mEvent->mMessage == eTouchEnd ||
         mEvent->mMessage == NS_TOUCH_CANCEL) {
       // for touchend events, remove any changed touches from the touches array
       WidgetTouchEvent::AutoTouchArray unchangedTouches;
       const WidgetTouchEvent::TouchArray& touches = touchEvent->touches;
       for (uint32_t i = 0; i < touches.Length(); ++i) {
         if (!touches[i]->mChanged) {
           unchangedTouches.AppendElement(touches[i]);
         }
@@ -145,17 +145,17 @@ TouchEvent::TargetTouches()
 {
   if (!mTargetTouches) {
     WidgetTouchEvent::AutoTouchArray targetTouches;
     WidgetTouchEvent* touchEvent = mEvent->AsTouchEvent();
     const WidgetTouchEvent::TouchArray& touches = touchEvent->touches;
     for (uint32_t i = 0; i < touches.Length(); ++i) {
       // for touchend/cancel events, don't append to the target list if this is a
       // touch that is ending
-      if ((mEvent->mMessage != NS_TOUCH_END &&
+      if ((mEvent->mMessage != eTouchEnd &&
            mEvent->mMessage != NS_TOUCH_CANCEL) || !touches[i]->mChanged) {
         if (touches[i]->mTarget == mEvent->originalTarget) {
           targetTouches.AppendElement(touches[i]);
         }
       }
     }
     mTargetTouches = new TouchList(ToSupports(this), targetTouches);
   }
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -4129,17 +4129,17 @@ HTMLInputElement::PostHandleEventForRang
         break;
       }
       SetValueOfRangeForUserEvent(
         rangeFrame->GetValueAtEventPoint(aVisitor.mEvent->AsInputEvent()));
       aVisitor.mEvent->mFlags.mMultipleActionsPrevented = true;
       break;
 
     case eMouseUp:
-    case NS_TOUCH_END:
+    case eTouchEnd:
       if (!mIsDraggingRange) {
         break;
       }
       // We don't check to see whether we are the capturing content here and
       // call CancelRangeThumbDrag() if that is the case. We just finish off
       // the drag and set our final value (unless someone has called
       // preventDefault() and prevents us getting here).
       FinishRangeThumbDrag(aVisitor.mEvent->AsInputEvent());
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -2046,17 +2046,17 @@ TabChild::UpdateTapState(const WidgetTou
   switch (aEvent.mMessage) {
   case eTouchMove:
     if (std::abs(currentPoint.x - mGestureDownPoint.x) > sDragThreshold.width ||
         std::abs(currentPoint.y - mGestureDownPoint.y) > sDragThreshold.height) {
       CancelTapTracking();
     }
     return;
 
-  case NS_TOUCH_END:
+  case eTouchEnd:
     if (!TouchManager::gPreventMouseEvents) {
       APZCCallbackHelper::DispatchSynthesizedMouseEvent(
         eMouseMove, time, currentPoint, 0, mPuppetWidget);
       APZCCallbackHelper::DispatchSynthesizedMouseEvent(
         eMouseDown, time, currentPoint, 0, mPuppetWidget);
       APZCCallbackHelper::DispatchSynthesizedMouseEvent(
         eMouseUp, time, currentPoint, 0, mPuppetWidget);
     }
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -1829,17 +1829,17 @@ bool TabParent::SendRealTouchEvent(Widge
   if (mIsDestroyed) {
     return false;
   }
 
   // PresShell::HandleEventInternal adds touches on touch end/cancel.  This
   // confuses remote content and the panning and zooming logic into thinking
   // that the added touches are part of the touchend/cancel, when actually
   // they're not.
-  if (event.mMessage == NS_TOUCH_END || event.mMessage == NS_TOUCH_CANCEL) {
+  if (event.mMessage == eTouchEnd || event.mMessage == NS_TOUCH_CANCEL) {
     for (int i = event.touches.Length() - 1; i >= 0; i--) {
       if (!event.touches[i]->mChanged) {
         event.touches.RemoveElementAt(i);
       }
     }
   }
 
   ScrollableLayerGuid guid;
@@ -2985,17 +2985,17 @@ TabParent::InjectTouchEvent(const nsAStr
                             float* aRotationAngles,
                             float* aForces,
                             uint32_t aCount,
                             int32_t aModifiers)
 {
   EventMessage msg;
   nsContentUtils::GetEventMessageAndAtom(aType, eTouchEventClass, &msg);
   if (msg != eTouchStart && msg != eTouchMove &&
-      msg != NS_TOUCH_END && msg != NS_TOUCH_CANCEL) {
+      msg != eTouchEnd && 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
@@ -278,17 +278,17 @@ APZEventState::ProcessTouchEvent(const W
     } else {
       mPendingTouchPreventedResponse = true;
       mPendingTouchPreventedGuid = aGuid;
       mPendingTouchPreventedBlockId = aInputBlockId;
     }
     break;
   }
 
-  case NS_TOUCH_END:
+  case eTouchEnd:
     if (isTouchPrevented) {
       mTouchEndCancelled = true;
       mEndTouchIsClick = false;
     }
     // fall through
   case NS_TOUCH_CANCEL:
     mActiveElementManager->HandleTouchEndEvent(mEndTouchIsClick);
     // fall through
--- a/layout/base/AccessibleCaretEventHub.cpp
+++ b/layout/base/AccessibleCaretEventHub.cpp
@@ -576,20 +576,20 @@ AccessibleCaretEventHub::HandleTouchEven
     break;
 
   case eTouchMove:
     AC_LOGV("Before eTouchMove, state: %s", mState->Name());
     rv = mState->OnMove(this, point);
     AC_LOGV("After eTouchMove, state: %s, consume: %d", mState->Name(), rv);
     break;
 
-  case NS_TOUCH_END:
-    AC_LOGV("Before NS_TOUCH_END, state: %s", mState->Name());
+  case eTouchEnd:
+    AC_LOGV("Before eTouchEnd, state: %s", mState->Name());
     rv = mState->OnRelease(this);
-    AC_LOGV("After NS_TOUCH_END, state: %s, consume: %d", mState->Name(), rv);
+    AC_LOGV("After eTouchEnd, state: %s, consume: %d", mState->Name(), rv);
     break;
 
   case NS_TOUCH_CANCEL:
     AC_LOGV("Before NS_TOUCH_CANCEL, state: %s", mState->Name());
     rv = mState->OnRelease(this);
     AC_LOGV("After NS_TOUCH_CANCEL, state: %s, consume: %d", mState->Name(),
             rv);
     break;
--- a/layout/base/SelectionCarets.cpp
+++ b/layout/base/SelectionCarets.cpp
@@ -226,17 +226,17 @@ SelectionCarets::HandleEvent(WidgetEvent
       SetSelectionDirection(eDirNext);
       SetSelectionDragState(true);
       return nsEventStatus_eConsumeNoDefault;
     } else {
       mDragMode = NONE;
       mActiveTouchId = -1;
       LaunchLongTapDetector();
     }
-  } else if (aEvent->mMessage == NS_TOUCH_END ||
+  } else if (aEvent->mMessage == eTouchEnd ||
              aEvent->mMessage == NS_TOUCH_CANCEL ||
              aEvent->mMessage == eMouseUp) {
     CancelLongTapDetector();
     if (mDragMode != NONE) {
       // Only care about same id
       if (mActiveTouchId == nowTouchId) {
         SetSelectionDragState(false);
         mDragMode = NONE;
--- a/layout/base/TouchCaret.cpp
+++ b/layout/base/TouchCaret.cpp
@@ -761,17 +761,17 @@ TouchCaret::HandleEvent(WidgetEvent* aEv
 
   switch (aEvent->mMessage) {
     case eTouchStart:
       status = HandleTouchDownEvent(aEvent->AsTouchEvent());
       break;
     case eMouseDown:
       status = HandleMouseDownEvent(aEvent->AsMouseEvent());
       break;
-    case NS_TOUCH_END:
+    case eTouchEnd:
       status = HandleTouchUpEvent(aEvent->AsTouchEvent());
       break;
     case eMouseUp:
       status = HandleMouseUpEvent(aEvent->AsMouseEvent());
       break;
     case eTouchMove:
       status = HandleTouchMoveEvent(aEvent->AsTouchEvent());
       break;
--- a/layout/base/TouchManager.cpp
+++ b/layout/base/TouchManager.cpp
@@ -51,17 +51,17 @@ EvictTouchPoint(nsRefPtr<dom::Touch>& aT
     if (doc && (!aLimitToDocument || aLimitToDocument == doc)) {
       nsIPresShell* presShell = doc->GetShell();
       if (presShell) {
         nsIFrame* frame = presShell->GetRootFrame();
         if (frame) {
           nsPoint pt(aTouch->mRefPoint.x, aTouch->mRefPoint.y);
           nsCOMPtr<nsIWidget> widget = frame->GetView()->GetNearestWidget(&pt);
           if (widget) {
-            WidgetTouchEvent event(true, NS_TOUCH_END, widget);
+            WidgetTouchEvent event(true, eTouchEnd, widget);
             event.widget = widget;
             event.time = PR_IntervalNow();
             event.touches.AppendElement(aTouch);
             nsEventStatus status;
             widget->DispatchEvent(&event, status);
             return;
           }
         }
@@ -185,17 +185,17 @@ TouchManager::PreHandleEvent(WidgetEvent
           if (gPreventMouseEvents) {
             *aStatus = nsEventStatus_eConsumeNoDefault;
           }
           return false;
         }
       }
       break;
     }
-    case NS_TOUCH_END:
+    case eTouchEnd:
       aIsHandlingUserInput = true;
       // Fall through to touchcancel code
     case NS_TOUCH_CANCEL: {
       // Remove the changed touches
       // need to make sure we only remove touches that are ending here
       WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
       WidgetTouchEvent::TouchArray& touches = touchEvent->touches;
       for (uint32_t i = 0; i < touches.Length(); ++i) {
--- a/layout/base/gtest/TestAccessibleCaretEventHub.cpp
+++ b/layout/base/gtest/TestAccessibleCaretEventHub.cpp
@@ -168,17 +168,17 @@ public:
 
   static UniquePtr<WidgetEvent> CreateTouchMoveEvent(nscoord aX, nscoord aY)
   {
     return CreateTouchEvent(eTouchMove, aX, aY);
   }
 
   static UniquePtr<WidgetEvent> CreateTouchReleaseEvent(nscoord aX, nscoord aY)
   {
-    return CreateTouchEvent(NS_TOUCH_END, aX, aY);
+    return CreateTouchEvent(eTouchEnd, aX, aY);
   }
 
   static UniquePtr<WidgetEvent> CreateWheelEvent(EventMessage aMessage)
   {
     auto event = MakeUnique<WidgetWheelEvent>(true, aMessage, nullptr);
 
     return Move(event);
   }
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -488,17 +488,17 @@ public:
           esm->DispatchLegacyMouseScrollEvents(frame,
                                                aVisitor.mEvent->AsWheelEvent(),
                                                &aVisitor.mEventStatus);
         }
       }
       nsIFrame* frame = mPresShell->GetCurrentEventFrame();
       if (!frame &&
           (aVisitor.mEvent->mMessage == eMouseUp ||
-           aVisitor.mEvent->mMessage == NS_TOUCH_END)) {
+           aVisitor.mEvent->mMessage == eTouchEnd)) {
         // Redirect BUTTON_UP and TOUCH_END events to the root frame to ensure
         // that capturing is released.
         frame = mPresShell->GetRootFrame();
       }
       if (frame) {
         frame->HandleEvent(aVisitor.mPresContext,
                            aVisitor.mEvent->AsGUIEvent(),
                            &aVisitor.mEventStatus);
@@ -6675,17 +6675,17 @@ DispatchPointerFromMouseOrTouch(PresShel
   } else if (aEvent->mClass == eTouchEventClass) {
     WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
     // loop over all touches and dispatch pointer events on each touch
     // copy the event
     switch (touchEvent->mMessage) {
     case eTouchMove:
       pointerMessage = ePointerMove;
       break;
-    case NS_TOUCH_END:
+    case eTouchEnd:
       pointerMessage = ePointerUp;
       break;
     case eTouchStart:
       pointerMessage = ePointerDown;
       break;
     case NS_TOUCH_CANCEL:
       pointerMessage = ePointerCancel;
       break;
@@ -7475,17 +7475,17 @@ PresShell::HandleEvent(nsIFrame* aFrame,
       return NS_OK;
     }
 
     PresShell* shell =
         static_cast<PresShell*>(frame->PresContext()->PresShell());
     switch (aEvent->mMessage) {
       case eTouchMove:
       case NS_TOUCH_CANCEL:
-      case NS_TOUCH_END: {
+      case eTouchEnd: {
         // get the correct shell to dispatch to
         WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
         for (dom::Touch* touch : touchEvent->touches) {
           if (!touch) {
             break;
           }
 
           nsRefPtr<dom::Touch> oldTouch =
@@ -8059,17 +8059,17 @@ PresShell::DispatchTouchEventToDOM(Widge
                                    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 == eTouchStart) ||
                     (aEvent->mMessage == eTouchMove && aTouchIsNew) ||
-                    (aEvent->mMessage == NS_TOUCH_END);
+                    (aEvent->mMessage == eTouchEnd);
   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) {
     if (!touch || !touch->mChanged) {
       continue;
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -2658,18 +2658,17 @@ nsFrame::HandleEvent(nsPresContext* aPre
     return HandleDrag(aPresContext, aEvent, aEventStatus);
   }
 
   if ((aEvent->mClass == eMouseEventClass &&
        aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton) ||
       aEvent->mClass == eTouchEventClass) {
     if (aEvent->mMessage == eMouseDown || aEvent->mMessage == eTouchStart) {
       HandlePress(aPresContext, aEvent, aEventStatus);
-    } else if (aEvent->mMessage == eMouseUp ||
-               aEvent->mMessage == NS_TOUCH_END) {
+    } else if (aEvent->mMessage == eMouseUp || aEvent->mMessage == eTouchEnd) {
       HandleRelease(aPresContext, aEvent, aEventStatus);
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsFrame::GetDataForTableSelection(const nsFrameSelection* aFrameSelection,
--- a/layout/xul/nsResizerFrame.cpp
+++ b/layout/xul/nsResizerFrame.cpp
@@ -123,17 +123,17 @@ nsResizerFrame::HandleEvent(nsPresContex
         // we're tracking
         mTrackingMouseMove = true;
 
         nsIPresShell::SetCapturingContent(GetContent(), CAPTURE_IGNOREALLOWED);
       }
     }
     break;
 
-  case NS_TOUCH_END:
+  case eTouchEnd:
   case eMouseUp: {
     if (aEvent->mClass == eTouchEventClass ||
         (aEvent->mClass == eMouseEventClass &&
          aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton)) {
       // we're done tracking.
       mTrackingMouseMove = false;
 
       nsIPresShell::SetCapturingContent(nullptr, 0);
--- a/layout/xul/nsSliderFrame.cpp
+++ b/layout/xul/nsSliderFrame.cpp
@@ -535,17 +535,17 @@ nsSliderFrame::HandleEvent(nsPresContext
         return NS_OK;
       }
 
       // set it
       SetCurrentThumbPosition(scrollbar, pos, false, true); // with snapping
     }
     break;
 
-    case NS_TOUCH_END:
+    case eTouchEnd:
     case eMouseUp:
       if (ShouldScrollForEvent(aEvent)) {
         StopDrag();
         //we MUST call nsFrame HandleEvent for mouse ups to maintain the selection state and capture state.
         return nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
       }
 
     default:
@@ -1045,17 +1045,17 @@ nsSliderFrame::RemoveListener()
     RemoveSystemEventListener(NS_LITERAL_STRING("mousedown"), mMediator, false);
 }
 
 bool
 nsSliderFrame::ShouldScrollForEvent(WidgetGUIEvent* aEvent)
 {
   switch (aEvent->mMessage) {
     case eTouchStart:
-    case NS_TOUCH_END:
+    case eTouchEnd:
       return true;
     case eMouseDown:
     case eMouseUp: {
       uint16_t button = aEvent->AsMouseEvent()->button;
 #ifdef MOZ_WIDGET_GTK
       return (button == WidgetMouseEvent::eLeftButton) ||
              (button == WidgetMouseEvent::eRightButton && GetScrollToClick()) ||
              (button == WidgetMouseEvent::eMiddleButton && gMiddlePref && !GetScrollToClick());
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -367,17 +367,17 @@ NS_EVENT_MESSAGE(NS_SHOW_EVENT,         
 // 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(eTouchStart,            eTouchEventFirst)
 NS_EVENT_MESSAGE(eTouchMove,             eTouchEventFirst + 1)
-NS_EVENT_MESSAGE(NS_TOUCH_END,           eTouchEventFirst + 2)
+NS_EVENT_MESSAGE(eTouchEnd,              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)
 
 NS_EVENT_MESSAGE(eWheelEventFirst,       5400)
--- a/widget/InputData.cpp
+++ b/widget/InputData.cpp
@@ -37,17 +37,17 @@ MultiTouchInput::MultiTouchInput(const W
 
   switch (aTouchEvent.mMessage) {
     case eTouchStart:
       mType = MULTITOUCH_START;
       break;
     case eTouchMove:
       mType = MULTITOUCH_MOVE;
       break;
-    case NS_TOUCH_END:
+    case eTouchEnd:
       mType = MULTITOUCH_END;
       break;
     case NS_TOUCH_CANCEL:
       mType = MULTITOUCH_CANCEL;
       break;
     default:
       MOZ_ASSERT_UNREACHABLE("Did not assign a type to a MultiTouchInput");
       break;
@@ -85,17 +85,17 @@ MultiTouchInput::ToWidgetTouchEvent(nsIW
   switch (mType) {
   case MULTITOUCH_START:
     touchEventMessage = eTouchStart;
     break;
   case MULTITOUCH_MOVE:
     touchEventMessage = eTouchMove;
     break;
   case MULTITOUCH_END:
-    touchEventMessage = NS_TOUCH_END;
+    touchEventMessage = eTouchEnd;
     break;
   case MULTITOUCH_CANCEL:
     touchEventMessage = NS_TOUCH_CANCEL;
     break;
   default:
     MOZ_ASSERT_UNREACHABLE("Did not assign a type to WidgetTouchEvent in MultiTouchInput");
     break;
   }
--- a/widget/android/AndroidJavaWrappers.cpp
+++ b/widget/android/AndroidJavaWrappers.cpp
@@ -715,17 +715,17 @@ AndroidGeckoEvent::MakeTouchEvent(nsIWid
         }
         case AndroidMotionEvent::ACTION_HOVER_EXIT: {
             if (ToolTypes()[0] == AndroidMotionEvent::TOOL_TYPE_MOUSE) {
                 break;
             }
         }
         case AndroidMotionEvent::ACTION_UP:
         case AndroidMotionEvent::ACTION_POINTER_UP: {
-            type = NS_TOUCH_END;
+            type = eTouchEnd;
             // for pointer-up events we only want the data from
             // the one pointer that went up
             startIndex = PointerIndex();
             endIndex = startIndex + 1;
             break;
         }
         case AndroidMotionEvent::ACTION_OUTSIDE:
         case AndroidMotionEvent::ACTION_CANCEL: {
--- a/widget/uikit/nsWindow.mm
+++ b/widget/uikit/nsWindow.mm
@@ -219,17 +219,17 @@ private:
 }
 
 - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
 {
     ALOG("[ChildView[%p] touchesEnded", self);
     if (!mGeckoChild)
         return;
 
-    [self sendTouchEvent:NS_TOUCH_END touches:touches widget:mGeckoChild];
+    [self sendTouchEvent:eTouchEnd touches:touches widget:mGeckoChild];
     for (UITouch* touch : touches) {
         CFDictionaryRemoveValue(mTouches, touch);
     }
     if (CFDictionaryGetCount(mTouches) == 0) {
         mNextTouchID = 0;
     }
 }
 
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -6407,17 +6407,17 @@ bool nsWindow::OnTouch(WPARAM wParam, LP
         // 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
-        // NS_TOUCH_END event containing only the contact points that were removed.
+        // eTouchEnd event containing only the contact points that were removed.
         if (touchEndInput.mTimeStamp.IsNull()) {
           // Initialize a touch event to send.
           touchEndInput.mType = MultiTouchInput::MULTITOUCH_END;
           touchEndInput.mTime = ::GetMessageTime();
           touchEndInput.mTimeStamp = GetMessageTimeStamp(touchEndInput.mTime);
           ModifierKeyState modifierKeyState;
           touchEndInput.modifiers = modifierKeyState.GetModifiers();
         }