Bug 895274 part.29 Rename NS_MOUSE_EXIT_WIDGET to eMouseExitFromWidget r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Sat, 29 Aug 2015 08:58:31 +0900
changeset 259948 6949e818c397150c21e14c3d05edb55a86255eba
parent 259947 389f60113c0c037c562eb46f4dfa23feab74a20e
child 259949 881d177f345734dee4b9b6a82da9663357dd9da1
push id14932
push userryanvm@gmail.com
push dateSun, 30 Aug 2015 19:57:31 +0000
treeherderfx-team@5eda6b9070bc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs895274
milestone43.0a1
Bug 895274 part.29 Rename NS_MOUSE_EXIT_WIDGET to eMouseExitFromWidget r=smaug
dom/base/nsContentUtils.cpp
dom/events/EventStateManager.cpp
dom/html/HTMLInputElement.cpp
dom/ipc/TabParent.cpp
layout/base/nsPresShell.cpp
layout/xul/nsScrollBoxFrame.cpp
view/nsViewManager.cpp
widget/EventMessageList.h
widget/InputData.cpp
widget/WidgetEventImpl.cpp
widget/android/AndroidJavaWrappers.cpp
widget/android/nsWindow.cpp
widget/cocoa/nsChildView.mm
widget/gtk/nsWindow.cpp
widget/nsBaseWidget.cpp
widget/windows/nsWindow.cpp
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -7841,17 +7841,17 @@ nsContentUtils::SendMouseEvent(nsCOMPtr<
     msg = eMouseDown;
   else if (aType.EqualsLiteral("mouseup"))
     msg = eMouseUp;
   else if (aType.EqualsLiteral("mousemove"))
     msg = eMouseMove;
   else if (aType.EqualsLiteral("mouseover"))
     msg = eMouseEnterIntoWidget;
   else if (aType.EqualsLiteral("mouseout"))
-    msg = NS_MOUSE_EXIT_WIDGET;
+    msg = eMouseExitFromWidget;
   else if (aType.EqualsLiteral("contextmenu")) {
     msg = NS_CONTEXTMENU;
     contextMenuKey = (aButton == 0);
   } else if (aType.EqualsLiteral("MozMouseHittest"))
     msg = NS_MOUSE_MOZHITTEST;
   else
     return NS_ERROR_FAILURE;
 
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -495,17 +495,17 @@ EventStateManager::PreHandleEvent(nsPres
   mCurrentTargetContent = nullptr;
 
   // Do not take account eMouseEnterIntoWidget/ExitFromWidget so that loading
   // a page when user is not active doesn't change the state to active.
   WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
   if (aEvent->mFlags.mIsTrusted &&
       ((mouseEvent && mouseEvent->IsReal() &&
         mouseEvent->mMessage != eMouseEnterIntoWidget &&
-        mouseEvent->mMessage != NS_MOUSE_EXIT_WIDGET) ||
+        mouseEvent->mMessage != eMouseExitFromWidget) ||
        aEvent->mClass == eWheelEventClass ||
        aEvent->mClass == eKeyboardEventClass)) {
     if (gMouseOrKeyboardEventCounter == 0) {
       nsCOMPtr<nsIObserverService> obs =
         mozilla::services::GetObserverService();
       if (obs) {
         obs->NotifyObservers(nullptr, "user-interaction-active", nullptr);
         UpdateUserActivityTimer();
@@ -587,24 +587,25 @@ EventStateManager::PreHandleEvent(nsPres
     // In some cases on e10s eMouseEnterIntoWidget
     // event was sent twice into child process of content.
     // (From specific widget code (sending is not permanent) and
     // from ESM::DispatchMouseOrPointerEvent (sending is permanent)).
     // Flag mNoCrossProcessBoundaryForwarding helps to
     // suppress sending accidental event from widget code.
     aEvent->mFlags.mNoCrossProcessBoundaryForwarding = true;
     break;
-  case NS_MOUSE_EXIT_WIDGET:
-    // If this is a remote frame, we receive NS_MOUSE_EXIT_WIDGET from the parent
-    // the mouse exits our content. Since the parent may update the cursor
-    // while the mouse is outside our frame, and since PuppetWidget caches the
-    // current cursor internally, re-entering our content (say from over a
-    // window edge) wont update the cursor if the cached value and the current
-    // cursor match. So when the mouse exits a remote frame, clear the cached
-    // widget cursor so a proper update will occur when the mouse re-enters.
+  case eMouseExitFromWidget:
+    // If this is a remote frame, we receive eMouseExitFromWidget from the
+    // parent the mouse exits our content. Since the parent may update the
+    // cursor while the mouse is outside our frame, and since PuppetWidget
+    // caches the current cursor internally, re-entering our content (say from
+    // over a window edge) wont update the cursor if the cached value and the
+    // current cursor match. So when the mouse exits a remote frame, clear the
+    // cached widget cursor so a proper update will occur when the mouse
+    // re-enters.
     if (XRE_IsContentProcess()) {
       ClearCachedWidgetCursor(mCurrentTarget);
     }
 
     // Flag helps to suppress double event sending into process of content.
     // For more information see comment above, at eMouseEnterIntoWidget case.
     aEvent->mFlags.mNoCrossProcessBoundaryForwarding = true;
 
@@ -1170,17 +1171,17 @@ CrossProcessSafeEvent(const WidgetEvent&
     return true;
   case eMouseEventClass:
     switch (aEvent.mMessage) {
     case eMouseDown:
     case eMouseUp:
     case eMouseMove:
     case NS_CONTEXTMENU:
     case eMouseEnterIntoWidget:
-    case NS_MOUSE_EXIT_WIDGET:
+    case eMouseExitFromWidget:
       return true;
     default:
       return false;
     }
   case eTouchEventClass:
     switch (aEvent.mMessage) {
     case NS_TOUCH_START:
     case NS_TOUCH_MOVE:
@@ -3786,17 +3787,17 @@ EventStateManager::DispatchMouseOrPointe
     targetFrame = mPresContext->GetPrimaryFrameFor(aTargetContent);
 
     // If we are entering/leaving remote content, dispatch a mouse enter/exit
     // event to the remote frame.
     if (IsRemoteTarget(aTargetContent)) {
       if (aMessage == NS_MOUSE_OUT) {
         // For remote content, send a "top-level" widget mouse exit event.
         nsAutoPtr<WidgetMouseEvent> remoteEvent;
-        CreateMouseOrPointerWidgetEvent(aMouseEvent, NS_MOUSE_EXIT_WIDGET,
+        CreateMouseOrPointerWidgetEvent(aMouseEvent, eMouseExitFromWidget,
                                         aRelatedContent, remoteEvent);
         remoteEvent->exit = WidgetMouseEvent::eTopLevel;
 
         // mCurrentTarget is set to the new target, so we must reset it to the
         // old target and then dispatch a cross-process event. (mCurrentTarget
         // will be set back below.) HandleCrossProcessEvent will query for the
         // proper target via GetEventTarget which will return mCurrentTarget.
         mCurrentTarget = targetFrame;
@@ -4161,17 +4162,17 @@ EventStateManager::GenerateMouseEnterExi
           helper->mLastOverElement = targetElement;
         }
         NotifyMouseOut(aMouseEvent, nullptr);
       }
     }
     break;
   case NS_POINTER_LEAVE:
   case NS_POINTER_CANCEL:
-  case NS_MOUSE_EXIT_WIDGET:
+  case eMouseExitFromWidget:
     {
       // This is actually the window mouse exit or pointer leave event. We're not moving
       // into any new element.
 
       OverOutElementsWrapper* helper = GetWrapperByEventID(aMouseEvent);
       if (helper->mLastOverFrame &&
           nsContentUtils::GetTopLevelWidget(aMouseEvent->widget) !=
           nsContentUtils::GetTopLevelWidget(helper->mLastOverFrame->GetNearestWidget())) {
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -3023,17 +3023,17 @@ HTMLInputElement::NeedToInitializeEditor
   if (!IsSingleLineTextControl(false) ||
       aVisitor.mEvent->mClass == eMutationEventClass) {
     return false;
   }
 
   switch (aVisitor.mEvent->mMessage) {
   case eMouseMove:
   case eMouseEnterIntoWidget:
-  case NS_MOUSE_EXIT_WIDGET:
+  case eMouseExitFromWidget:
   case NS_MOUSE_OVER:
   case NS_MOUSE_OUT:
   case NS_SCROLLPORT_UNDERFLOW:
   case NS_SCROLLPORT_OVERFLOW:
     return false;
   default:
     return true;
   }
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -1385,17 +1385,17 @@ bool TabParent::SendRealMouseEvent(Widge
     // become the current cursor.  When we mouseexit, we stop.
     if (eMouseEnterIntoWidget == event.mMessage) {
       mTabSetsCursor = true;
       if (mCustomCursor) {
         widget->SetCursor(mCustomCursor, mCustomCursorHotspotX, mCustomCursorHotspotY);
       } else if (mCursor != nsCursor(-1)) {
         widget->SetCursor(mCursor);
       }
-    } else if (NS_MOUSE_EXIT_WIDGET == event.mMessage) {
+    } else if (eMouseExitFromWidget == event.mMessage) {
       mTabSetsCursor = false;
     }
   }
 
   if (eMouseMove == event.mMessage) {
     if (event.reason == WidgetMouseEvent::eSynthesized) {
       return SendSynthMouseMoveEvent(event);
     } else {
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -6366,17 +6366,17 @@ PresShell::UpdateActivePointerState(Widg
       if(pointerEvent->inputSource != nsIDOMMouseEvent::MOZ_SOURCE_TOUCH) {
         gActivePointersIds->Put(pointerEvent->pointerId,
                                 new PointerInfo(false, pointerEvent->inputSource, pointerEvent->isPrimary));
       } else {
         gActivePointersIds->Remove(pointerEvent->pointerId);
       }
     }
     break;
-  case NS_MOUSE_EXIT_WIDGET:
+  case eMouseExitFromWidget:
     // In this case we have to remove information about disappeared mouse pointers
     if (WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent()) {
       gActivePointersIds->Remove(mouseEvent->pointerId);
     }
     break;
   default:
     break;
   }
@@ -6587,17 +6587,17 @@ PresShell::RecordMouseLocation(WidgetGUI
              this, aEvent->widget);
     }
     printf("[ps=%p]setting mouse location to (%d,%d)\n",
            this, mMouseLocation.x, mMouseLocation.y);
 #endif
     if (aEvent->mMessage == eMouseEnterIntoWidget) {
       SynthesizeMouseMove(false);
     }
-  } else if (aEvent->mMessage == NS_MOUSE_EXIT_WIDGET) {
+  } else if (aEvent->mMessage == eMouseExitFromWidget) {
     // Although we only care about the mouse moving into an area for which this
     // pres shell doesn't receive mouse move events, we don't check which widget
     // the mouse exit was for since this seems to vary by platform.  Hopefully
     // this won't matter at all since we'll get the mouse move or enter after
     // the mouse exit when the mouse moves from one of our widgets into another.
     mMouseLocation = nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE);
 #ifdef DEBUG_MOUSE_LOCATION
     printf("[ps=%p]got mouse exit for %p\n",
@@ -7308,17 +7308,17 @@ PresShell::HandleEvent(nsIFrame* aFrame,
 
     // all touch events except for touchstart use a captured target
     if (aEvent->mClass == eTouchEventClass &&
         aEvent->mMessage != NS_TOUCH_START) {
       captureRetarget = true;
     }
 
     WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
-    bool isWindowLevelMouseExit = (aEvent->mMessage == NS_MOUSE_EXIT_WIDGET) &&
+    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) {
--- a/layout/xul/nsScrollBoxFrame.cpp
+++ b/layout/xul/nsScrollBoxFrame.cpp
@@ -90,17 +90,17 @@ nsAutoRepeatBoxFrame::HandleEvent(nsPres
     case eMouseEnterIntoWidget:
     case NS_MOUSE_OVER:
       if (IsActivatedOnHover()) {
         StartRepeat();
         mTrustedEvent = aEvent->mFlags.mIsTrusted;
       }
       break;
 
-    case NS_MOUSE_EXIT_WIDGET:
+    case eMouseExitFromWidget:
     case NS_MOUSE_OUT:
       // always stop on mouse exit
       StopRepeat();
       // Not really necessary but do this to be safe
       mTrustedEvent = false;
       break;
 
     case NS_MOUSE_CLICK: {
--- a/view/nsViewManager.cpp
+++ b/view/nsViewManager.cpp
@@ -749,17 +749,17 @@ nsViewManager::DispatchEvent(WidgetGUIEv
 
   WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
   if ((mouseEvent &&
        // Ignore mouse events that we synthesize.
        mouseEvent->reason == WidgetMouseEvent::eReal &&
        // Ignore mouse exit and enter (we'll get moves if the user
        // is really moving the mouse) since we get them when we
        // create and destroy widgets.
-       mouseEvent->mMessage != NS_MOUSE_EXIT_WIDGET &&
+       mouseEvent->mMessage != eMouseExitFromWidget &&
        mouseEvent->mMessage != eMouseEnterIntoWidget) ||
       aEvent->HasKeyEventMessage() ||
       aEvent->HasIMEEventMessage() ||
       aEvent->mMessage == NS_PLUGIN_INPUT_EVENT) {
     gLastUserEventTime = PR_IntervalToMicroseconds(PR_IntervalNow());
   }
 
   // Find the view whose coordinates system we're in.
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -45,17 +45,17 @@ NS_EVENT_MESSAGE(eOnline,               
 
 NS_EVENT_MESSAGE(eLanguageChange,       eWindowEventFirst + 70)
 
 NS_EVENT_MESSAGE(eMouseEventFirst,      300)
 NS_EVENT_MESSAGE(eMouseMove,            eMouseEventFirst)
 NS_EVENT_MESSAGE(eMouseUp,              eMouseEventFirst + 1)
 NS_EVENT_MESSAGE(eMouseDown,            eMouseEventFirst + 2)
 NS_EVENT_MESSAGE(eMouseEnterIntoWidget, eMouseEventFirst + 22)
-NS_EVENT_MESSAGE(NS_MOUSE_EXIT_WIDGET,  eMouseEventFirst + 23)
+NS_EVENT_MESSAGE(eMouseExitFromWidget,  eMouseEventFirst + 23)
 NS_EVENT_MESSAGE(NS_MOUSE_DOUBLECLICK,  eMouseEventFirst + 24)
 NS_EVENT_MESSAGE(NS_MOUSE_CLICK,        eMouseEventFirst + 27)
 NS_EVENT_MESSAGE(NS_MOUSE_ACTIVATE,     eMouseEventFirst + 30)
 NS_EVENT_MESSAGE(NS_MOUSE_OVER,         eMouseEventFirst + 31)
 NS_EVENT_MESSAGE(NS_MOUSE_OUT,          eMouseEventFirst + 32)
 NS_EVENT_MESSAGE(NS_MOUSE_MOZHITTEST,   eMouseEventFirst + 33)
 NS_EVENT_MESSAGE(NS_MOUSEENTER,         eMouseEventFirst + 34)
 NS_EVENT_MESSAGE(NS_MOUSELEAVE,         eMouseEventFirst + 35)
--- a/widget/InputData.cpp
+++ b/widget/InputData.cpp
@@ -190,17 +190,17 @@ MultiTouchInput::MultiTouchInput(const W
     break;
   case eMouseUp:
     mType = MULTITOUCH_END;
     break;
   // The mouse pointer has been interrupted in an implementation-specific
   // manner, such as a synchronous event or action cancelling the touch, or a
   // touch point leaving the document window and going into a non-document
   // area capable of handling user interactions.
-  case NS_MOUSE_EXIT_WIDGET:
+  case eMouseExitFromWidget:
     mType = MULTITOUCH_CANCEL;
     break;
   default:
     NS_WARNING("Did not assign a type to a MultiTouchInput");
     break;
   }
 
   mTouches.AppendElement(SingleTouchData(0,
--- a/widget/WidgetEventImpl.cpp
+++ b/widget/WidgetEventImpl.cpp
@@ -78,17 +78,17 @@ bool
 WidgetEvent::HasMouseEventMessage() const
 {
   switch (mMessage) {
     case eMouseDown:
     case eMouseUp:
     case NS_MOUSE_CLICK:
     case NS_MOUSE_DOUBLECLICK:
     case eMouseEnterIntoWidget:
-    case NS_MOUSE_EXIT_WIDGET:
+    case eMouseExitFromWidget:
     case NS_MOUSE_ACTIVATE:
     case NS_MOUSE_OVER:
     case NS_MOUSE_OUT:
     case NS_MOUSE_MOZHITTEST:
     case eMouseMove:
       return true;
     default:
       return false;
--- a/widget/android/AndroidJavaWrappers.cpp
+++ b/widget/android/AndroidJavaWrappers.cpp
@@ -835,17 +835,17 @@ AndroidGeckoEvent::MakeMouseEvent(nsIWid
         switch (Action()) {
             case AndroidMotionEvent::ACTION_HOVER_MOVE:
                 msg = eMouseMove;
                 break;
             case AndroidMotionEvent::ACTION_HOVER_ENTER:
                 msg = eMouseEnterIntoWidget;
                 break;
             case AndroidMotionEvent::ACTION_HOVER_EXIT:
-                msg = NS_MOUSE_EXIT_WIDGET;
+                msg = eMouseExitFromWidget;
                 break;
             default:
                 break;
         }
     }
 
     WidgetMouseEvent event(true, msg, widget,
                            WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -379,17 +379,17 @@ nsWindow::Show(bool aState)
         return NS_OK;
 
     mIsVisible = aState;
 
     if (IsTopLevel()) {
         // XXX should we bring this to the front when it's shown,
         // if it's a toplevel widget?
 
-        // XXX we should synthesize a NS_MOUSE_EXIT_WIDGET (for old top
+        // XXX we should synthesize a eMouseExitFromWidget (for old top
         // window)/eMouseEnterIntoWidget (for new top window) since we need
         // to pretend that the top window always has focus.  Not sure
         // if Show() is the right place to do this, though.
 
         if (aState) {
             // It just became visible, so send a resize update if necessary
             // and bring it to the front.
             Resize(0, 0, gAndroidBounds.width, gAndroidBounds.height, false);
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -4647,17 +4647,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
                              type:(WidgetMouseEvent::exitType)aType
 {
   if (!mGeckoChild)
     return;
 
   NSPoint windowEventLocation = nsCocoaUtils::EventLocationForWindow(aEvent, [self window]);
   NSPoint localEventLocation = [self convertPoint:windowEventLocation fromView:nil];
 
-  EventMessage msg = aEnter ? eMouseEnterIntoWidget : NS_MOUSE_EXIT_WIDGET;
+  EventMessage msg = aEnter ? eMouseEnterIntoWidget : eMouseExitFromWidget;
   WidgetMouseEvent event(true, msg, mGeckoChild, WidgetMouseEvent::eReal);
   event.refPoint = LayoutDeviceIntPoint::FromUntyped(
     mGeckoChild->CocoaPointsToDevPixels(localEventLocation));
 
   event.exit = aType;
 
   nsEventStatus status; // ignored
   mGeckoChild->DispatchEvent(&event, status);
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -2479,17 +2479,18 @@ nsWindow::OnLeaveNotifyEvent(GdkEventCro
     // that window.
     //
     // XXXkt However, we will miss toplevel exits when the pointer directly
     // leaves a foreign (plugin) child window without passing over a visible
     // portion of a Gecko window.
     if (aEvent->subwindow != nullptr)
         return;
 
-    WidgetMouseEvent event(true, NS_MOUSE_EXIT_WIDGET, this, WidgetMouseEvent::eReal);
+    WidgetMouseEvent event(true, eMouseExitFromWidget, this,
+                           WidgetMouseEvent::eReal);
 
     event.refPoint.x = nscoord(aEvent->x);
     event.refPoint.y = nscoord(aEvent->y);
 
     event.time = aEvent->time;
     event.timeStamp = GetEventTimeStamp(aEvent->time);
 
     event.exit = is_top_level_mouse_exit(mGdkWindow, aEvent)
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -2643,17 +2643,17 @@ case _value: eventName.AssignLiteral(_na
     _ASSIGN_eventName(NS_FORM_RESET,"NS_FORM_RESET");
     _ASSIGN_eventName(NS_FORM_SUBMIT,"NS_FORM_SUBMIT");
     _ASSIGN_eventName(NS_IMAGE_ABORT,"NS_IMAGE_ABORT");
     _ASSIGN_eventName(NS_LOAD_ERROR,"NS_LOAD_ERROR");
     _ASSIGN_eventName(eKeyDown,"eKeyDown");
     _ASSIGN_eventName(eKeyPress,"eKeyPress");
     _ASSIGN_eventName(eKeyUp,"eKeyUp");
     _ASSIGN_eventName(eMouseEnterIntoWidget,"eMouseEnterIntoWidget");
-    _ASSIGN_eventName(NS_MOUSE_EXIT_WIDGET,"NS_MOUSE_EXIT_WIDGET");
+    _ASSIGN_eventName(eMouseExitFromWidget,"eMouseExitFromWidget");
     _ASSIGN_eventName(eMouseDown,"eMouseDown");
     _ASSIGN_eventName(eMouseUp,"eMouseUp");
     _ASSIGN_eventName(NS_MOUSE_CLICK,"NS_MOUSE_CLICK");
     _ASSIGN_eventName(NS_MOUSE_DOUBLECLICK,"NS_MOUSE_DBLCLICK");
     _ASSIGN_eventName(eMouseMove,"eMouseMove");
     _ASSIGN_eventName(NS_LOAD,"NS_LOAD");
     _ASSIGN_eventName(NS_POPSTATE,"NS_POPSTATE");
     _ASSIGN_eventName(NS_BEFORE_SCRIPT_EXECUTE,"NS_BEFORE_SCRIPT_EXECUTE");
@@ -2803,17 +2803,17 @@ nsBaseWidget::debug_DumpEvent(FILE *    
                               int32_t               aWindowID)
 {
   if (aGuiEvent->mMessage == eMouseMove) {
     if (!debug_GetCachedBoolPref("nglayout.debug.motion_event_dumping"))
       return;
   }
 
   if (aGuiEvent->mMessage == eMouseEnterIntoWidget ||
-      aGuiEvent->mMessage == NS_MOUSE_EXIT_WIDGET) {
+      aGuiEvent->mMessage == eMouseExitFromWidget) {
     if (!debug_GetCachedBoolPref("nglayout.debug.crossing_event_dumping"))
       return;
   }
 
   if (!debug_GetCachedBoolPref("nglayout.debug.event_dumping"))
     return;
 
   NS_LossyConvertUTF16toASCII tempString(debug_GuiEventToString(aGuiEvent).get());
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -4024,22 +4024,22 @@ nsWindow::DispatchMouseEvent(EventMessag
     InkCollector::sInkCollector->SetTarget(mWnd);
   }
 
   switch (aEventMessage) {
     case eMouseDown:
       CaptureMouse(true);
       break;
 
-    // eMouseMove and NS_MOUSE_EXIT_WIDGET are here because we need to make
+    // eMouseMove and eMouseExitFromWidget are here because we need to make
     // sure capture flag isn't left on after a drag where we wouldn't see a
     // button up message (see bug 324131).
     case eMouseUp:
     case eMouseMove:
-    case NS_MOUSE_EXIT_WIDGET:
+    case eMouseExitFromWidget:
       if (!(wParam & (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)) && sIsInMouseCapture)
         CaptureMouse(false);
       break;
 
     default:
       break;
 
   } // switch
@@ -4125,17 +4125,17 @@ nsWindow::DispatchMouseEvent(EventMessag
       // Set last Click time on MouseDown only
       sLastMouseDownTime = curMsgTime;
       break;
     case eMouseMove:
       if (!insideMovementThreshold) {
         sLastClickCount = 0;
       }
       break;
-    case NS_MOUSE_EXIT_WIDGET:
+    case eMouseExitFromWidget:
       event.exit = IsTopLevelMouseExit(mWnd) ?
                      WidgetMouseEvent::eTopLevel : WidgetMouseEvent::eChild;
       break;
     default:
       break;
   }
   event.clickCount = sLastClickCount;
 
@@ -4190,17 +4190,17 @@ nsWindow::DispatchMouseEvent(EventMessag
           break;
         default:
           break;
       }
       break;
     case eMouseMove:
       pluginEvent.event = WM_MOUSEMOVE;
       break;
-    case NS_MOUSE_EXIT_WIDGET:
+    case eMouseExitFromWidget:
       pluginEvent.event = WM_MOUSELEAVE;
       break;
     default:
       pluginEvent.event = WM_NULL;
       break;
   }
 
   pluginEvent.wParam = wParam;     // plugins NEED raw OS event flags!
@@ -4220,31 +4220,32 @@ nsWindow::DispatchMouseEvent(EventMessag
       GetBounds(rect);
       rect.x = 0;
       rect.y = 0;
 
       if (rect.Contains(LayoutDeviceIntPoint::ToUntyped(event.refPoint))) {
         if (sCurrentWindow == nullptr || sCurrentWindow != this) {
           if ((nullptr != sCurrentWindow) && (!sCurrentWindow->mInDtor)) {
             LPARAM pos = sCurrentWindow->lParamToClient(lParamToScreen(lParam));
-            sCurrentWindow->DispatchMouseEvent(NS_MOUSE_EXIT_WIDGET, wParam, pos, false, 
+            sCurrentWindow->DispatchMouseEvent(eMouseExitFromWidget,
+                                               wParam, pos, false, 
                                                WidgetMouseEvent::eLeftButton,
                                                aInputSource);
           }
           sCurrentWindow = this;
           if (!mInDtor) {
             LPARAM pos = sCurrentWindow->lParamToClient(lParamToScreen(lParam));
             sCurrentWindow->DispatchMouseEvent(eMouseEnterIntoWidget,
                                                wParam, pos, false,
                                                WidgetMouseEvent::eLeftButton,
                                                aInputSource);
           }
         }
       }
-    } else if (aEventMessage == NS_MOUSE_EXIT_WIDGET) {
+    } else if (aEventMessage == eMouseExitFromWidget) {
       if (sCurrentWindow == this) {
         sCurrentWindow = nullptr;
       }
     }
 
     result = ConvertStatus(DispatchInputEvent(&event));
 
     if (nsToolkit::gMouseTrailer)
@@ -5131,17 +5132,17 @@ nsWindow::ProcessMessage(UINT msg, WPARA
       if (userMovedMouse) {
         DispatchPendingEvents();
       }
     }
     break;
 
     case WM_NCMOUSEMOVE:
       // If we receive a mouse move event on non-client chrome, make sure and
-      // send an NS_MOUSE_EXIT_WIDGET event as well.
+      // send an eMouseExitFromWidget event as well.
       if (mMousePresent && !sIsInMouseCapture)
         SendMessage(mWnd, WM_MOUSELEAVE, 0, 0);
     break;
 
     case WM_LBUTTONDOWN:
     {
       result = DispatchMouseEvent(eMouseDown, wParam, lParam,
                                   false, WidgetMouseEvent::eLeftButton,
@@ -5168,25 +5169,25 @@ nsWindow::ProcessMessage(UINT msg, WPARA
       // We need to check mouse button states and put them in for
       // wParam.
       WPARAM mouseState = (GetKeyState(VK_LBUTTON) ? MK_LBUTTON : 0)
         | (GetKeyState(VK_MBUTTON) ? MK_MBUTTON : 0)
         | (GetKeyState(VK_RBUTTON) ? MK_RBUTTON : 0);
       // Synthesize an event position because we don't get one from
       // WM_MOUSELEAVE.
       LPARAM pos = lParamToClient(::GetMessagePos());
-      DispatchMouseEvent(NS_MOUSE_EXIT_WIDGET, mouseState, pos, false,
+      DispatchMouseEvent(eMouseExitFromWidget, mouseState, pos, false,
                          WidgetMouseEvent::eLeftButton, MOUSE_INPUT_SOURCE());
     }
     break;
 
     case MOZ_WM_PEN_LEAVES_HOVER_OF_DIGITIZER:
     {
       LPARAM pos = lParamToClient(::GetMessagePos());
-      DispatchMouseEvent(NS_MOUSE_EXIT_WIDGET, wParam, pos, false,
+      DispatchMouseEvent(eMouseExitFromWidget, wParam, pos, false,
                          WidgetMouseEvent::eLeftButton,
                          nsIDOMMouseEvent::MOZ_SOURCE_PEN);
       InkCollector::sInkCollector->ClearTarget();
     }
     break;
 
     case WM_CONTEXTMENU:
     {