Bug 895274 part.32 Rename NS_MOUSE_ACTIVATE to eMouseActivate r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Sat, 29 Aug 2015 08:58:32 +0900
changeset 259945 ce720f26f58cd3a808c4af314582d21a39e77a70
parent 259944 c9288d4f5e63369b8f98319ac029a759519ace62
child 259946 b8fe1dac71aeb337dbdb084297b25071d03cf1a0
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.32 Rename NS_MOUSE_ACTIVATE to eMouseActivate r=smaug
dom/events/EventStateManager.cpp
widget/EventMessageList.h
widget/WidgetEventImpl.cpp
widget/cocoa/nsChildView.mm
widget/windows/nsWindow.cpp
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -3322,17 +3322,17 @@ EventStateManager::PostHandleEvent(nsPre
     if (mCurrentTarget) {
       nsCOMPtr<nsIContent> targetContent;
       mCurrentTarget->GetContentForEvent(aEvent, getter_AddRefs(targetContent));
       SetContentState(targetContent, NS_EVENT_STATE_HOVER);
     }
     break;
 
 #ifdef XP_MACOSX
-  case NS_MOUSE_ACTIVATE:
+  case eMouseActivate:
     if (mCurrentTarget) {
       nsCOMPtr<nsIContent> targetContent;
       mCurrentTarget->GetContentForEvent(aEvent, getter_AddRefs(targetContent));
       if (!NodeAllowsClickThrough(targetContent)) {
         *aStatus = nsEventStatus_eConsumeNoDefault;
       }
     }
     break;
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -48,17 +48,18 @@ NS_EVENT_MESSAGE(eLanguageChange,       
 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(eMouseExitFromWidget,  eMouseEventFirst + 23)
 NS_EVENT_MESSAGE(eMouseDoubleClick,     eMouseEventFirst + 24)
 NS_EVENT_MESSAGE(eMouseClick,           eMouseEventFirst + 27)
-NS_EVENT_MESSAGE(NS_MOUSE_ACTIVATE,     eMouseEventFirst + 30)
+// eMouseActivate is fired when the widget is activated by a click.
+NS_EVENT_MESSAGE(eMouseActivate,        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)
 NS_EVENT_MESSAGE(NS_MOUSE_MOZLONGTAP,   eMouseEventFirst + 36)
 
 // Pointer spec events
--- a/widget/WidgetEventImpl.cpp
+++ b/widget/WidgetEventImpl.cpp
@@ -79,17 +79,17 @@ WidgetEvent::HasMouseEventMessage() cons
 {
   switch (mMessage) {
     case eMouseDown:
     case eMouseUp:
     case eMouseClick:
     case eMouseDoubleClick:
     case eMouseEnterIntoWidget:
     case eMouseExitFromWidget:
-    case NS_MOUSE_ACTIVATE:
+    case eMouseActivate:
     case NS_MOUSE_OVER:
     case NS_MOUSE_OUT:
     case NS_MOUSE_MOZHITTEST:
     case eMouseMove:
       return true;
     default:
       return false;
   }
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -5681,17 +5681,17 @@ PanGestureTypeForEvent(NSEvent* aEvent)
 }
 
 - (BOOL)inactiveWindowAcceptsMouseEvent:(NSEvent*)aEvent
 {
   // If we're being destroyed assume the default -- return YES.
   if (!mGeckoChild)
     return YES;
 
-  WidgetMouseEvent geckoEvent(true, NS_MOUSE_ACTIVATE, mGeckoChild,
+  WidgetMouseEvent geckoEvent(true, eMouseActivate, mGeckoChild,
                               WidgetMouseEvent::eReal);
   [self convertCocoaMouseEvent:aEvent toGeckoEvent:&geckoEvent];
   return (mGeckoChild->DispatchInputEvent(&geckoEvent) != nsEventStatus_eConsumeNoDefault);
 }
 
 // We must always call through to our superclass, even when mGeckoChild is
 // nil -- otherwise the keyboard focus can end up in the wrong NSView.
 - (BOOL)becomeFirstResponder
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -5412,17 +5412,17 @@ nsWindow::ProcessMessage(UINT msg, WPARA
 
           if (mIsTopWidgetWindow)
             mLastKeyboardLayout = KeyboardLayout::GetInstance()->GetLayout();
 
         } else {
           StopFlashing();
 
           sJustGotActivate = true;
-          WidgetMouseEvent event(true, NS_MOUSE_ACTIVATE, this,
+          WidgetMouseEvent event(true, eMouseActivate, this,
                                  WidgetMouseEvent::eReal);
           InitEvent(event);
           ModifierKeyState modifierKeyState;
           modifierKeyState.InitInputEvent(event);
           DispatchInputEvent(&event);
           if (sSwitchKeyboardLayout && mLastKeyboardLayout)
             ActivateKeyboardLayout(mLastKeyboardLayout, 0);
         }