Bug 1259661 part.6 Rename WidgetMouseEvent::exit to WidgetMouseEvent::mExitFrom r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Thu, 12 May 2016 11:42:08 +0900
changeset 297105 458adc3eac60184d6283df861c705ece908a85b6
parent 297104 6cea19d36ac6fe24b0875b1728db12c8039d9283
child 297106 426f05e8dfd78f6f55575969acae2023a87ef78d
push id30251
push usercbook@mozilla.com
push dateThu, 12 May 2016 09:54:48 +0000
treeherdermozilla-central@c3f5e6079284 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1259661
milestone49.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 1259661 part.6 Rename WidgetMouseEvent::exit to WidgetMouseEvent::mExitFrom r=smaug MozReview-Commit-ID: FHUaUOE5eIB
dom/events/EventStateManager.cpp
layout/base/nsPresShell.cpp
widget/MouseEvents.h
widget/cocoa/nsChildView.mm
widget/gtk/nsWindow.cpp
widget/nsGUIEventIPC.h
widget/windows/nsWindow.cpp
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -662,17 +662,17 @@ EventStateManager::PreHandleEvent(nsPres
 
     // Flag helps to suppress double event sending into process of content.
     // For more information see comment above, at eMouseEnterIntoWidget case.
     aEvent->StopCrossProcessForwarding();
 
     // 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) {
+    if (mouseEvent->mExitFrom != WidgetMouseEvent::eTopLevel) {
       // Treat it as a synthetic move so we don't generate spurious
       // "exit" or "move" events.  Any necessary "out" or "over" events
       // will be generated by GenerateMouseEnterExit
       mouseEvent->mMessage = eMouseMove;
       mouseEvent->mReason = WidgetMouseEvent::eSynthesized;
       // then fall through...
     } else {
       if (sPointerEventEnabled) {
@@ -3953,17 +3953,17 @@ EventStateManager::DispatchMouseOrPointe
     // If we are entering/leaving remote content, dispatch a mouse enter/exit
     // event to the remote frame.
     if (IsRemoteTarget(aTargetContent)) {
       if (aMessage == eMouseOut) {
         // For remote content, send a "top-level" widget mouse exit event.
         nsAutoPtr<WidgetMouseEvent> remoteEvent;
         CreateMouseOrPointerWidgetEvent(aMouseEvent, eMouseExitFromWidget,
                                         aRelatedContent, remoteEvent);
-        remoteEvent->exit = WidgetMouseEvent::eTopLevel;
+        remoteEvent->mExitFrom = 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;
         HandleCrossProcessEvent(remoteEvent, &status);
       } else if (aMessage == eMouseOver) {
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -7727,17 +7727,17 @@ PresShell::HandleEvent(nsIFrame* aFrame,
 
     // all touch events except for touchstart use a captured target
     if (aEvent->mClass == eTouchEventClass && aEvent->mMessage != eTouchStart) {
       captureRetarget = true;
     }
 
     WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
     bool isWindowLevelMouseExit = (aEvent->mMessage == eMouseExitFromWidget) &&
-      (mouseEvent && mouseEvent->exit == WidgetMouseEvent::eTopLevel);
+      (mouseEvent && mouseEvent->mExitFrom == 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) {
       nsPoint eventPoint;
--- a/widget/MouseEvents.h
+++ b/widget/MouseEvents.h
@@ -201,29 +201,29 @@ public:
     eChild,
     eTopLevel
   };
 
 protected:
   WidgetMouseEvent()
     : mReason(eReal)
     , mContextMenuTrigger(eNormal)
-    , exit(eChild)
+    , mExitFrom(eChild)
     , acceptActivation(false)
     , ignoreRootScrollFrame(false)
     , clickCount(0)
   {
   }
 
   WidgetMouseEvent(bool aIsTrusted, EventMessage aMessage, nsIWidget* aWidget,
                    EventClassID aEventClassID, Reason aReason)
     : WidgetMouseEventBase(aIsTrusted, aMessage, aWidget, aEventClassID)
     , mReason(aReason)
     , mContextMenuTrigger(eNormal)
-    , exit(eChild)
+    , mExitFrom(eChild)
     , acceptActivation(false)
     , ignoreRootScrollFrame(false)
     , clickCount(0)
   {
   }
 
 public:
   virtual WidgetMouseEvent* AsMouseEvent() override { return this; }
@@ -231,17 +231,17 @@ public:
   WidgetMouseEvent(bool aIsTrusted,
                    EventMessage aMessage,
                    nsIWidget* aWidget,
                    Reason aReason,
                    ContextMenuTrigger aContextMenuTrigger = eNormal)
     : WidgetMouseEventBase(aIsTrusted, aMessage, aWidget, eMouseEventClass)
     , mReason(aReason)
     , mContextMenuTrigger(aContextMenuTrigger)
-    , exit(eChild)
+    , mExitFrom(eChild)
     , acceptActivation(false)
     , ignoreRootScrollFrame(false)
     , clickCount(0)
   {
     if (aMessage == eContextMenu) {
       button = (mContextMenuTrigger == eNormal) ? eRightButton : eLeftButton;
     }
   }
@@ -269,17 +269,17 @@ public:
     result->mFlags = mFlags;
     return result;
   }
 
   Reason mReason;
 
   ContextMenuTrigger mContextMenuTrigger;
 
-  ExitFrom exit;
+  ExitFrom mExitFrom;
 
   // Special return code for MOUSE_ACTIVATE to signal.
   // If the target accepts activation (1), or denies it (0).
   bool acceptActivation;
   // Whether the event should ignore scroll frame bounds during dispatch.
   bool ignoreRootScrollFrame;
 
   /// The number of mouse clicks.
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -4597,17 +4597,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 
   NSPoint windowEventLocation = nsCocoaUtils::EventLocationForWindow(aEvent, [self window]);
   NSPoint localEventLocation = [self convertPoint:windowEventLocation fromView:nil];
 
   EventMessage msg = aEnter ? eMouseEnterIntoWidget : eMouseExitFromWidget;
   WidgetMouseEvent event(true, msg, mGeckoChild, WidgetMouseEvent::eReal);
   event.mRefPoint = mGeckoChild->CocoaPointsToDevPixels(localEventLocation);
 
-  event.exit = aExitFrom;
+  event.mExitFrom = aExitFrom;
 
   nsEventStatus status; // ignored
   mGeckoChild->DispatchEvent(&event, status);
 }
 
 - (void)updateWindowDraggableState
 {
   // Trigger update to the window server.
@@ -6328,17 +6328,17 @@ ChildViewMouseTracker::ReEvaluateMouseEn
     // Send enter and / or exit events.
     WidgetMouseEvent::ExitFrom exitFrom =
       [sLastMouseEventView window] == [oldView window] ?
         WidgetMouseEvent::eChild : WidgetMouseEvent::eTopLevel;
     [oldView sendMouseEnterOrExitEvent:aEvent
                                  enter:NO
                               exitFrom:exitFrom];
     // After the cursor exits the window set it to a visible regular arrow cursor.
-    if (type == WidgetMouseEvent::eTopLevel) {
+    if (exitFrom == WidgetMouseEvent::eTopLevel) {
       [[nsCursorManager sharedInstance] setCursor:eCursor_standard];
     }
     [sLastMouseEventView sendMouseEnterOrExitEvent:aEvent
                                              enter:YES
                                           exitFrom:exitFrom];
   }
 }
 
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -2570,17 +2570,17 @@ nsWindow::OnLeaveNotifyEvent(GdkEventCro
         return;
 
     WidgetMouseEvent event(true, eMouseExitFromWidget, this,
                            WidgetMouseEvent::eReal);
 
     event.mRefPoint = GdkEventCoordsToDevicePixels(aEvent->x, aEvent->y);
     event.AssignEventTime(GetWidgetEventTime(aEvent->time));
 
-    event.exit = is_top_level_mouse_exit(mGdkWindow, aEvent)
+    event.mExitFrom = is_top_level_mouse_exit(mGdkWindow, aEvent)
         ? WidgetMouseEvent::eTopLevel : WidgetMouseEvent::eChild;
 
     LOG(("OnLeaveNotify: %p\n", (void *)this));
 
     DispatchInputEvent(&event);
 }
 
 template <typename Event> static LayoutDeviceIntPoint
--- a/widget/nsGUIEventIPC.h
+++ b/widget/nsGUIEventIPC.h
@@ -229,17 +229,17 @@ struct ParamTraits<mozilla::WidgetMouseE
 
   static void Write(Message* aMsg, const paramType& aParam)
   {
     WriteParam(aMsg, static_cast<mozilla::WidgetMouseEventBase>(aParam));
     WriteParam(aMsg, aParam.ignoreRootScrollFrame);
     WriteParam(aMsg, static_cast<paramType::ReasonType>(aParam.mReason));
     WriteParam(aMsg, static_cast<paramType::ContextMenuTriggerType>(
                        aParam.mContextMenuTrigger));
-    WriteParam(aMsg, static_cast<paramType::ExitFromType>(aParam.exit));
+    WriteParam(aMsg, static_cast<paramType::ExitFromType>(aParam.mExitFrom));
     WriteParam(aMsg, aParam.clickCount);
   }
 
   static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
   {
     bool rv;
     paramType::ReasonType reason = 0;
     paramType::ContextMenuTriggerType contextMenuTrigger = 0;
@@ -249,17 +249,17 @@ struct ParamTraits<mozilla::WidgetMouseE
          ReadParam(aMsg, aIter, &aResult->ignoreRootScrollFrame) &&
          ReadParam(aMsg, aIter, &reason) &&
          ReadParam(aMsg, aIter, &contextMenuTrigger) &&
          ReadParam(aMsg, aIter, &exitFrom) &&
          ReadParam(aMsg, aIter, &aResult->clickCount);
     aResult->mReason = static_cast<paramType::Reason>(reason);
     aResult->mContextMenuTrigger =
       static_cast<paramType::ContextMenuTrigger>(contextMenuTrigger);
-    aResult->exit = static_cast<paramType::ExitFrom>(exitFrom);
+    aResult->mExitFrom = static_cast<paramType::ExitFrom>(exitFrom);
     return rv;
   }
 };
 
 
 template<>
 struct ParamTraits<mozilla::WidgetDragEvent>
 {
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -4094,18 +4094,19 @@ nsWindow::DispatchMouseEvent(EventMessag
       sLastMouseDownTime = curMsgTime;
       break;
     case eMouseMove:
       if (!insideMovementThreshold) {
         sLastClickCount = 0;
       }
       break;
     case eMouseExitFromWidget:
-      event.exit = IsTopLevelMouseExit(mWnd) ?
-                     WidgetMouseEvent::eTopLevel : WidgetMouseEvent::eChild;
+      event.mExitFrom =
+        IsTopLevelMouseExit(mWnd) ? WidgetMouseEvent::eTopLevel :
+                                    WidgetMouseEvent::eChild;
       break;
     default:
       break;
   }
   event.clickCount = sLastClickCount;
 
 #ifdef NS_DEBUG_XX
   MOZ_LOG(gWindowsLog, LogLevel::Info,