Bug 895274 part.28 Rename NS_MOUSE_ENTER_WIDGET to eMouseEnterIntoWidget r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Sat, 29 Aug 2015 08:58:31 +0900
changeset 259947 389f60113c0c037c562eb46f4dfa23feab74a20e
parent 259946 e637f3ff6f3e3add6aa4ac4b7325e3983504cef7
child 259948 6949e818c397150c21e14c3d05edb55a86255eba
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.28 Rename NS_MOUSE_ENTER_WIDGET to eMouseEnterIntoWidget r=smaug
dom/base/nsContentUtils.cpp
dom/events/EventStateManager.cpp
dom/html/HTMLInputElement.cpp
dom/ipc/TabParent.cpp
layout/base/nsPresShell.cpp
layout/generic/nsPluginFrame.cpp
layout/xul/nsScrollBoxFrame.cpp
view/nsViewManager.cpp
widget/EventMessageList.h
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
@@ -7839,17 +7839,17 @@ nsContentUtils::SendMouseEvent(nsCOMPtr<
   bool contextMenuKey = false;
   if (aType.EqualsLiteral("mousedown"))
     msg = eMouseDown;
   else if (aType.EqualsLiteral("mouseup"))
     msg = eMouseUp;
   else if (aType.EqualsLiteral("mousemove"))
     msg = eMouseMove;
   else if (aType.EqualsLiteral("mouseover"))
-    msg = NS_MOUSE_ENTER_WIDGET;
+    msg = eMouseEnterIntoWidget;
   else if (aType.EqualsLiteral("mouseout"))
     msg = NS_MOUSE_EXIT_WIDGET;
   else if (aType.EqualsLiteral("contextmenu")) {
     msg = NS_CONTEXTMENU;
     contextMenuKey = (aButton == 0);
   } else if (aType.EqualsLiteral("MozMouseHittest"))
     msg = NS_MOUSE_MOZHITTEST;
   else
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -489,22 +489,22 @@ EventStateManager::PreHandleEvent(nsPres
                    !aTargetFrame->GetContent() ||
                    aTargetFrame->GetContent() == aTargetContent ||
                    aTargetFrame->GetContent()->GetFlattenedTreeParent() == aTargetContent,
                    "aTargetFrame should be related with aTargetContent");
 
   mCurrentTarget = aTargetFrame;
   mCurrentTargetContent = nullptr;
 
-  // Do not take account NS_MOUSE_ENTER_WIDGET/EXIT_WIDGET so that loading a page
-  // when user is not active doesn't change the state to active.
+  // 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 != NS_MOUSE_ENTER_WIDGET &&
+        mouseEvent->mMessage != eMouseEnterIntoWidget &&
         mouseEvent->mMessage != NS_MOUSE_EXIT_WIDGET) ||
        aEvent->mClass == eWheelEventClass ||
        aEvent->mClass == eKeyboardEventClass)) {
     if (gMouseOrKeyboardEventCounter == 0) {
       nsCOMPtr<nsIObserverService> obs =
         mozilla::services::GetObserverService();
       if (obs) {
         obs->NotifyObservers(nullptr, "user-interaction-active", nullptr);
@@ -578,18 +578,18 @@ EventStateManager::PreHandleEvent(nsPres
         // then fall through...
       case WidgetMouseEvent::eRightButton:
       case WidgetMouseEvent::eMiddleButton:
         SetClickCount(aPresContext, mouseEvent, aStatus);
         break;
     }
     break;
   }
-  case NS_MOUSE_ENTER_WIDGET:
-    // In some cases on e10s NS_MOUSE_ENTER_WIDGET
+  case eMouseEnterIntoWidget:
+    // 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:
@@ -600,17 +600,17 @@ EventStateManager::PreHandleEvent(nsPres
     // 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 NS_MOUSE_ENTER_WIDGET case.
+    // For more information see comment above, at eMouseEnterIntoWidget case.
     aEvent->mFlags.mNoCrossProcessBoundaryForwarding = true;
 
     // If the event is not a top-level window exit, then it's not
     // really an exit --- we may have traversed widget boundaries but
     // we're still in our toplevel window.
     if (mouseEvent->exit != WidgetMouseEvent::eTopLevel) {
       // Treat it as a synthetic move so we don't generate spurious
       // "exit" or "move" events.  Any necessary "out" or "over" events
@@ -1169,17 +1169,17 @@ CrossProcessSafeEvent(const WidgetEvent&
   case eWheelEventClass:
     return true;
   case eMouseEventClass:
     switch (aEvent.mMessage) {
     case eMouseDown:
     case eMouseUp:
     case eMouseMove:
     case NS_CONTEXTMENU:
-    case NS_MOUSE_ENTER_WIDGET:
+    case eMouseEnterIntoWidget:
     case NS_MOUSE_EXIT_WIDGET:
       return true;
     default:
       return false;
     }
   case eTouchEventClass:
     switch (aEvent.mMessage) {
     case NS_TOUCH_START:
@@ -3312,17 +3312,17 @@ EventStateManager::PostHandleEvent(nsPre
 
   case eKeyPress:
     {
       WidgetKeyboardEvent* keyEvent = aEvent->AsKeyboardEvent();
       PostHandleKeyboardEvent(keyEvent, *aStatus, dispatchedToContentProcess);
     }
     break;
 
-  case NS_MOUSE_ENTER_WIDGET:
+  case eMouseEnterIntoWidget:
     if (mCurrentTarget) {
       nsCOMPtr<nsIContent> targetContent;
       mCurrentTarget->GetContentForEvent(aEvent, getter_AddRefs(targetContent));
       SetContentState(targetContent, NS_EVENT_STATE_HOVER);
     }
     break;
 
 #ifdef XP_MACOSX
@@ -3798,17 +3798,17 @@ EventStateManager::DispatchMouseOrPointe
         // 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;
         HandleCrossProcessEvent(remoteEvent, &status);
       } else if (aMessage == NS_MOUSE_OVER) {
         nsAutoPtr<WidgetMouseEvent> remoteEvent;
-        CreateMouseOrPointerWidgetEvent(aMouseEvent, NS_MOUSE_ENTER_WIDGET,
+        CreateMouseOrPointerWidgetEvent(aMouseEvent, eMouseEnterIntoWidget,
                                         aRelatedContent, remoteEvent);
         HandleCrossProcessEvent(remoteEvent, &status);
       }
     }
   }
 
   mCurrentTargetContent = nullptr;
   mCurrentTarget = previousTarget;
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -3022,17 +3022,17 @@ HTMLInputElement::NeedToInitializeEditor
   // mousein/move/out, overflow/underflow, and DOM mutation events.
   if (!IsSingleLineTextControl(false) ||
       aVisitor.mEvent->mClass == eMutationEventClass) {
     return false;
   }
 
   switch (aVisitor.mEvent->mMessage) {
   case eMouseMove:
-  case NS_MOUSE_ENTER_WIDGET:
+  case eMouseEnterIntoWidget:
   case NS_MOUSE_EXIT_WIDGET:
   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
@@ -1378,17 +1378,17 @@ bool TabParent::SendRealMouseEvent(Widge
     return false;
   }
   event.refPoint += GetChildProcessOffset();
 
   nsCOMPtr<nsIWidget> widget = GetWidget();
   if (widget) {
     // When we mouseenter the tab, the tab's cursor should
     // become the current cursor.  When we mouseexit, we stop.
-    if (NS_MOUSE_ENTER_WIDGET == event.mMessage) {
+    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) {
       mTabSetsCursor = false;
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -6341,17 +6341,17 @@ nsIPresShell::GetPointerInfo(uint32_t aP
   }
   return false;
 }
 
 void
 PresShell::UpdateActivePointerState(WidgetGUIEvent* aEvent)
 {
   switch (aEvent->mMessage) {
-  case NS_MOUSE_ENTER_WIDGET:
+  case eMouseEnterIntoWidget:
     // In this case we have to know information about available mouse pointers
     if (WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent()) {
       gActivePointersIds->Put(mouseEvent->pointerId,
                               new PointerInfo(false, mouseEvent->inputSource, true));
     }
     break;
   case NS_POINTER_DOWN:
     // In this case we switch pointer to active state
@@ -6564,37 +6564,37 @@ PresShell::RecordMouseLocation(WidgetGUI
     if (rootPresShell) {
       rootPresShell->RecordMouseLocation(aEvent);
     }
     return;
   }
 
   if ((aEvent->mMessage == eMouseMove &&
        aEvent->AsMouseEvent()->reason == WidgetMouseEvent::eReal) ||
-      aEvent->mMessage == NS_MOUSE_ENTER_WIDGET ||
+      aEvent->mMessage == eMouseEnterIntoWidget ||
       aEvent->mMessage == eMouseDown ||
       aEvent->mMessage == eMouseUp) {
     nsIFrame* rootFrame = GetRootFrame();
     if (!rootFrame) {
       nsView* rootView = mViewManager->GetRootView();
       mMouseLocation = nsLayoutUtils::TranslateWidgetToView(mPresContext,
         aEvent->widget, aEvent->refPoint, rootView);
     } else {
       mMouseLocation =
         nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, rootFrame);
     }
 #ifdef DEBUG_MOUSE_LOCATION
-    if (aEvent->mMessage == NS_MOUSE_ENTER_WIDGET) {
+    if (aEvent->mMessage == eMouseEnterIntoWidget) {
       printf("[ps=%p]got mouse enter for %p\n",
              this, aEvent->widget);
     }
     printf("[ps=%p]setting mouse location to (%d,%d)\n",
            this, mMouseLocation.x, mMouseLocation.y);
 #endif
-    if (aEvent->mMessage == NS_MOUSE_ENTER_WIDGET) {
+    if (aEvent->mMessage == eMouseEnterIntoWidget) {
       SynthesizeMouseMove(false);
     }
   } else if (aEvent->mMessage == NS_MOUSE_EXIT_WIDGET) {
     // 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.
--- a/layout/generic/nsPluginFrame.cpp
+++ b/layout/generic/nsPluginFrame.cpp
@@ -1783,17 +1783,17 @@ nsPluginFrame::HandleEvent(nsPresContext
 
 #ifdef XP_WIN
   rv = nsPluginFrameSuper::HandleEvent(aPresContext, anEvent, anEventStatus);
   return rv;
 #endif
 
 #ifdef XP_MACOSX
   // we want to process some native mouse events in the cocoa event model
-  if ((anEvent->mMessage == NS_MOUSE_ENTER_WIDGET ||
+  if ((anEvent->mMessage == eMouseEnterIntoWidget ||
        anEvent->mMessage == NS_WHEEL_WHEEL) &&
       mInstanceOwner->GetEventModel() == NPEventModelCocoa) {
     *anEventStatus = mInstanceOwner->ProcessEvent(*anEvent);
     // Due to plugin code reentering Gecko, this frame may be dead at this
     // point.
     return rv;
   }
 
--- a/layout/xul/nsScrollBoxFrame.cpp
+++ b/layout/xul/nsScrollBoxFrame.cpp
@@ -82,17 +82,17 @@ nsAutoRepeatBoxFrame::HandleEvent(nsPres
   if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
     return NS_OK;
   }
 
   switch(aEvent->mMessage) {
     // repeat mode may be "hover" for repeating while the mouse is hovering
     // over the element, otherwise repetition is done while the element is
     // active (pressed).
-    case NS_MOUSE_ENTER_WIDGET:
+    case eMouseEnterIntoWidget:
     case NS_MOUSE_OVER:
       if (IsActivatedOnHover()) {
         StartRepeat();
         mTrustedEvent = aEvent->mFlags.mIsTrusted;
       }
       break;
 
     case NS_MOUSE_EXIT_WIDGET:
--- a/view/nsViewManager.cpp
+++ b/view/nsViewManager.cpp
@@ -750,17 +750,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 != NS_MOUSE_ENTER_WIDGET) ||
+       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.
   nsView* view = aView;
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -44,17 +44,17 @@ NS_EVENT_MESSAGE(eOnline,               
 // NS_BEFORERESIZE_EVENT used to be here (eWindowEventFirst + 66)
 
 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(NS_MOUSE_ENTER_WIDGET, eMouseEventFirst + 22)
+NS_EVENT_MESSAGE(eMouseEnterIntoWidget, eMouseEventFirst + 22)
 NS_EVENT_MESSAGE(NS_MOUSE_EXIT_WIDGET,  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)
--- a/widget/WidgetEventImpl.cpp
+++ b/widget/WidgetEventImpl.cpp
@@ -77,17 +77,17 @@ WidgetEvent::IsNativeEventDelivererForPl
 bool
 WidgetEvent::HasMouseEventMessage() const
 {
   switch (mMessage) {
     case eMouseDown:
     case eMouseUp:
     case NS_MOUSE_CLICK:
     case NS_MOUSE_DOUBLECLICK:
-    case NS_MOUSE_ENTER_WIDGET:
+    case eMouseEnterIntoWidget:
     case NS_MOUSE_EXIT_WIDGET:
     case NS_MOUSE_ACTIVATE:
     case NS_MOUSE_OVER:
     case NS_MOUSE_OUT:
     case NS_MOUSE_MOZHITTEST:
     case eMouseMove:
       return true;
     default:
--- a/widget/android/AndroidJavaWrappers.cpp
+++ b/widget/android/AndroidJavaWrappers.cpp
@@ -832,17 +832,17 @@ AndroidGeckoEvent::MakeMouseEvent(nsIWid
 {
     EventMessage msg = eVoidEvent;
     if (Points().Length() > 0) {
         switch (Action()) {
             case AndroidMotionEvent::ACTION_HOVER_MOVE:
                 msg = eMouseMove;
                 break;
             case AndroidMotionEvent::ACTION_HOVER_ENTER:
-                msg = NS_MOUSE_ENTER_WIDGET;
+                msg = eMouseEnterIntoWidget;
                 break;
             case AndroidMotionEvent::ACTION_HOVER_EXIT:
                 msg = NS_MOUSE_EXIT_WIDGET;
                 break;
             default:
                 break;
         }
     }
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -380,17 +380,17 @@ nsWindow::Show(bool aState)
 
     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
-        // window)/NS_MOUSE_ENTER_WIDGET (for new top window) since we need
+        // 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);
             BringToFront();
--- 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 ? NS_MOUSE_ENTER_WIDGET : NS_MOUSE_EXIT_WIDGET;
+  EventMessage msg = aEnter ? eMouseEnterIntoWidget : NS_MOUSE_EXIT_WIDGET;
   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
@@ -2436,17 +2436,18 @@ nsWindow::OnEnterNotifyEvent(GdkEventCro
 
     // Check before is_parent_ungrab_enter() as the button state may have
     // changed while a non-Gecko ancestor window had a pointer grab.
     DispatchMissedButtonReleases(aEvent);
 
     if (is_parent_ungrab_enter(aEvent))
         return;
 
-    WidgetMouseEvent event(true, NS_MOUSE_ENTER_WIDGET, this, WidgetMouseEvent::eReal);
+    WidgetMouseEvent event(true, eMouseEnterIntoWidget, this,
+                           WidgetMouseEvent::eReal);
 
     event.refPoint.x = nscoord(aEvent->x);
     event.refPoint.y = nscoord(aEvent->y);
 
     event.time = aEvent->time;
     event.timeStamp = GetEventTimeStamp(aEvent->time);
 
     LOG(("OnEnterNotify: %p\n", (void *)this));
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -2642,17 +2642,17 @@ case _value: eventName.AssignLiteral(_na
     _ASSIGN_eventName(NS_FORM_CHANGE,"NS_FORM_CHANGE");
     _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(NS_MOUSE_ENTER_WIDGET,"NS_MOUSE_ENTER_WIDGET");
+    _ASSIGN_eventName(eMouseEnterIntoWidget,"eMouseEnterIntoWidget");
     _ASSIGN_eventName(NS_MOUSE_EXIT_WIDGET,"NS_MOUSE_EXIT_WIDGET");
     _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");
@@ -2802,17 +2802,17 @@ nsBaseWidget::debug_DumpEvent(FILE *    
                               const nsAutoCString & aWidgetName,
                               int32_t               aWindowID)
 {
   if (aGuiEvent->mMessage == eMouseMove) {
     if (!debug_GetCachedBoolPref("nglayout.debug.motion_event_dumping"))
       return;
   }
 
-  if (aGuiEvent->mMessage == NS_MOUSE_ENTER_WIDGET ||
+  if (aGuiEvent->mMessage == eMouseEnterIntoWidget ||
       aGuiEvent->mMessage == NS_MOUSE_EXIT_WIDGET) {
     if (!debug_GetCachedBoolPref("nglayout.debug.crossing_event_dumping"))
       return;
   }
 
   if (!debug_GetCachedBoolPref("nglayout.debug.event_dumping"))
     return;
 
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -4227,17 +4227,18 @@ nsWindow::DispatchMouseEvent(EventMessag
             LPARAM pos = sCurrentWindow->lParamToClient(lParamToScreen(lParam));
             sCurrentWindow->DispatchMouseEvent(NS_MOUSE_EXIT_WIDGET, wParam, pos, false, 
                                                WidgetMouseEvent::eLeftButton,
                                                aInputSource);
           }
           sCurrentWindow = this;
           if (!mInDtor) {
             LPARAM pos = sCurrentWindow->lParamToClient(lParamToScreen(lParam));
-            sCurrentWindow->DispatchMouseEvent(NS_MOUSE_ENTER_WIDGET, wParam, pos, false,
+            sCurrentWindow->DispatchMouseEvent(eMouseEnterIntoWidget,
+                                               wParam, pos, false,
                                                WidgetMouseEvent::eLeftButton,
                                                aInputSource);
           }
         }
       }
     } else if (aEventMessage == NS_MOUSE_EXIT_WIDGET) {
       if (sCurrentWindow == this) {
         sCurrentWindow = nullptr;