Bug 895274 part.36 Rename NS_MOUSEENTER to eMouseEnter r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Sat, 29 Aug 2015 08:58:33 +0900
changeset 259949 691fe61c6289fa27fd6b41a3bc210680992a5718
parent 259948 0d03f7de34c57ba40ca9a60d41f8ce5ca3a47aae
child 259950 be7520290d1273ee2c9245f1347f97933d50b216
push id29296
push userryanvm@gmail.com
push dateSun, 30 Aug 2015 19:45:10 +0000
treeherdermozilla-central@2ad5077d86ba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs895274
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 895274 part.36 Rename NS_MOUSEENTER to eMouseEnter r=smaug
dom/events/EventNameList.h
dom/events/EventStateManager.cpp
widget/EventMessageList.h
widget/MouseEvents.h
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -266,17 +266,17 @@ EVENT(loadstart,
       NS_LOADSTART,
       EventNameType_HTML,
       eBasicEventClass)
 EVENT(mousedown,
       eMouseDown,
       EventNameType_All,
       eMouseEventClass)
 EVENT(mouseenter,
-      NS_MOUSEENTER,
+      eMouseEnter,
       EventNameType_All,
       eMouseEventClass)
 EVENT(mouseleave,
       NS_MOUSELEAVE,
       EventNameType_All,
       eMouseEventClass)
 EVENT(mousemove,
       eMouseMove,
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -3737,17 +3737,17 @@ EventStateManager::DispatchMouseOrPointe
                                                nsIContent* aTargetContent,
                                                nsIContent* aRelatedContent)
 {
   // http://dvcs.w3.org/hg/webevents/raw-file/default/mouse-lock.html#methods
   // "[When the mouse is locked on an element...e]vents that require the concept
   // of a mouse cursor must not be dispatched (for example: mouseover, mouseout).
   if (sIsPointerLocked &&
       (aMessage == NS_MOUSELEAVE ||
-       aMessage == NS_MOUSEENTER ||
+       aMessage == eMouseEnter ||
        aMessage == eMouseOver ||
        aMessage == eMouseOut)) {
     mCurrentTargetContent = nullptr;
     nsCOMPtr<Element> pointerLockedElement =
       do_QueryReferent(EventStateManager::sPointerLockedElement);
     if (!pointerLockedElement) {
       NS_WARNING("Should have pointer locked element, but didn't.");
       return nullptr;
@@ -3848,17 +3848,17 @@ public:
         // mouseenter/leave is fired only on elements.
         current = current->GetParent();
       }
     }
   }
 
   ~EnterLeaveDispatcher()
   {
-    if (mEventMessage == NS_MOUSEENTER ||
+    if (mEventMessage == eMouseEnter ||
         mEventMessage == NS_POINTER_ENTER) {
       for (int32_t i = mTargets.Count() - 1; i >= 0; --i) {
         mESM->DispatchMouseOrPointerEvent(mMouseEvent, mEventMessage,
                                           mTargets[i], mRelatedTarget);
       }
     } else {
       for (int32_t i = 0; i < mTargets.Count(); ++i) {
         mESM->DispatchMouseOrPointerEvent(mMouseEvent, mEventMessage,
@@ -3986,17 +3986,17 @@ EventStateManager::NotifyMouseOver(Widge
   // DispatchMouseOrPointerEvent() call below, since NotifyMouseOut() resets it, bug 298477.
   nsCOMPtr<nsIContent> lastOverElement = wrapper->mLastOverElement;
 
   bool isPointer = aMouseEvent->mClass == ePointerEventClass;
   
   Maybe<EnterLeaveDispatcher> enterDispatcher;
   if (dispatch) {
     enterDispatcher.emplace(this, aContent, lastOverElement, aMouseEvent,
-                            isPointer ? NS_POINTER_ENTER : NS_MOUSEENTER);
+                            isPointer ? NS_POINTER_ENTER : eMouseEnter);
   }
 
   NotifyMouseOut(aMouseEvent, aContent);
 
   // Store the first mouseOver event we fire and don't refire mouseOver
   // to that element while the first mouseOver is still ongoing.
   wrapper->mFirstOverEventElement = aContent;
 
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -53,17 +53,17 @@ NS_EVENT_MESSAGE(eMouseEnterIntoWidget, 
 NS_EVENT_MESSAGE(eMouseExitFromWidget,  eMouseEventFirst + 23)
 NS_EVENT_MESSAGE(eMouseDoubleClick,     eMouseEventFirst + 24)
 NS_EVENT_MESSAGE(eMouseClick,           eMouseEventFirst + 27)
 // eMouseActivate is fired when the widget is activated by a click.
 NS_EVENT_MESSAGE(eMouseActivate,        eMouseEventFirst + 30)
 NS_EVENT_MESSAGE(eMouseOver,            eMouseEventFirst + 31)
 NS_EVENT_MESSAGE(eMouseOut,             eMouseEventFirst + 32)
 NS_EVENT_MESSAGE(eMouseHitTest,         eMouseEventFirst + 33)
-NS_EVENT_MESSAGE(NS_MOUSEENTER,         eMouseEventFirst + 34)
+NS_EVENT_MESSAGE(eMouseEnter,           eMouseEventFirst + 34)
 NS_EVENT_MESSAGE(NS_MOUSELEAVE,         eMouseEventFirst + 35)
 NS_EVENT_MESSAGE(NS_MOUSE_MOZLONGTAP,   eMouseEventFirst + 36)
 
 // Pointer spec events
 NS_EVENT_MESSAGE(NS_POINTER_EVENT_START,  4400)
 NS_EVENT_MESSAGE(NS_POINTER_MOVE,         NS_POINTER_EVENT_START)
 NS_EVENT_MESSAGE(NS_POINTER_UP,           NS_POINTER_EVENT_START + 1)
 NS_EVENT_MESSAGE(NS_POINTER_DOWN,         NS_POINTER_EVENT_START + 2)
--- a/widget/MouseEvents.h
+++ b/widget/MouseEvents.h
@@ -199,17 +199,17 @@ protected:
     , acceptActivation(false)
     , ignoreRootScrollFrame(false)
     , reason(aReason)
     , context(eNormal)
     , exit(eChild)
     , clickCount(0)
   {
     switch (aMessage) {
-      case NS_MOUSEENTER:
+      case eMouseEnter:
       case NS_MOUSELEAVE:
         mFlags.mBubbles = false;
         mFlags.mCancelable = false;
         break;
       default:
         break;
     }
   }
@@ -219,17 +219,17 @@ public:
 
   WidgetMouseEvent(bool aIsTrusted, EventMessage aMessage, nsIWidget* aWidget,
                    reasonType aReason, contextType aContext = eNormal) :
     WidgetMouseEventBase(aIsTrusted, aMessage, aWidget, eMouseEventClass),
     acceptActivation(false), ignoreRootScrollFrame(false),
     reason(aReason), context(aContext), exit(eChild), clickCount(0)
   {
     switch (aMessage) {
-      case NS_MOUSEENTER:
+      case eMouseEnter:
       case NS_MOUSELEAVE:
         mFlags.mBubbles = false;
         mFlags.mCancelable = false;
         break;
       case NS_CONTEXTMENU:
         button = (context == eNormal) ? eRightButton : eLeftButton;
         break;
       default: