Bug 895274 part.186 Rename NS_WHEEL_END to eWheelOperationEnd r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 11 Sep 2015 01:59:55 +0900
changeset 261836 0f99a111de0a20e77d6de0a688860f0107f4e755
parent 261835 dd0a5b24d93ccd9dcec8cea76127a564ff9eaf02
child 261837 413ab9028625c5b943d485730ecad9871e9b49a7
push id29355
push usercbook@mozilla.com
push dateFri, 11 Sep 2015 14:37:04 +0000
treeherdermozilla-central@19f806034f67 [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.186 Rename NS_WHEEL_END to eWheelOperationEnd r=smaug
dom/events/EventStateManager.cpp
dom/events/WheelHandlingHelper.h
layout/base/AccessibleCaretEventHub.cpp
layout/base/TouchCaret.cpp
layout/base/gtest/TestAccessibleCaretEventHub.cpp
widget/EventMessageList.h
widget/cocoa/nsChildView.mm
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -708,17 +708,17 @@ EventStateManager::PreHandleEvent(nsPres
       WidgetKeyboardEvent* keyEvent = aEvent->AsKeyboardEvent();
       nsRefPtr<TextComposition> composition =
         IMEStateManager::GetTextCompositionFor(keyEvent);
       keyEvent->mIsComposing = !!composition;
     }
     break;
   case eWheel:
   case eWheelOperationStart:
-  case NS_WHEEL_STOP:
+  case eWheelOperationEnd:
     {
       NS_ASSERTION(aEvent->mFlags.mIsTrusted,
                    "Untrusted wheel event shouldn't be here");
 
       nsIContent* content = GetFocusedContent();
       if (content) {
         mCurrentTargetContent = content;
       }
@@ -3003,17 +3003,17 @@ EventStateManager::PostHandleEvent(nsPre
 
       nsIPresShell *shell = presContext->GetPresShell();
       if (shell) {
         nsRefPtr<nsFrameSelection> frameSelection = shell->FrameSelection();
         frameSelection->SetDragState(false);
       }
     }
     break;
-  case NS_WHEEL_STOP:
+  case eWheelOperationEnd:
     {
       MOZ_ASSERT(aEvent->mFlags.mIsTrusted);
       ScrollbarsForWheel::MayInactivate();
       WidgetWheelEvent* wheelEvent = aEvent->AsWheelEvent();
       nsIScrollableFrame* scrollTarget =
         ComputeScrollTarget(aTargetFrame, wheelEvent,
                             COMPUTE_DEFAULT_ACTION_TARGET);
       if (scrollTarget) {
--- a/dom/events/WheelHandlingHelper.h
+++ b/dom/events/WheelHandlingHelper.h
@@ -90,18 +90,18 @@ protected:
   static const DeltaValues directions[kNumberOfTargets];
   static nsWeakFrame sActiveOwner;
   static nsWeakFrame sActivatedScrollTargets[kNumberOfTargets];
   static bool sHadWheelStart;
   static bool sOwnWheelTransaction;
 
 
   /**
-   * These two methods are called upon eWheelOperationStart/NS_WHEEL_STOP events
-   * to show/hide the right scrollbars.
+   * These two methods are called upon eWheelOperationStart/eWheelOperationEnd
+   * events to show/hide the right scrollbars.
    */
   static void TemporarilyActivateAllPossibleScrollTargets(
                 EventStateManager* aESM,
                 nsIFrame* aTargetFrame,
                 WidgetWheelEvent* aEvent);
   static void DeactivateAllTemporarilyActivatedScrollTargets();
 };
 
--- a/layout/base/AccessibleCaretEventHub.cpp
+++ b/layout/base/AccessibleCaretEventHub.cpp
@@ -540,18 +540,18 @@ AccessibleCaretEventHub::HandleWheelEven
     mState->OnScrolling(this);
     break;
 
   case eWheelOperationStart:
     AC_LOGV("eWheelOperationStart, state: %s", mState->Name());
     mState->OnScrollStart(this);
     break;
 
-  case NS_WHEEL_STOP:
-    AC_LOGV("NS_WHEEL_STOP, state: %s", mState->Name());
+  case eWheelOperationEnd:
+    AC_LOGV("eWheelOperationEnd, state: %s", mState->Name());
     mState->OnScrollEnd(this);
     break;
 
   default:
     break;
   }
 
   // Always ignore this event since we only want to know scroll start and scroll
--- a/layout/base/TouchCaret.cpp
+++ b/layout/base/TouchCaret.cpp
@@ -783,17 +783,17 @@ TouchCaret::HandleEvent(WidgetEvent* aEv
       SetState(TOUCHCARET_NONE);
       LaunchExpirationTimer();
       break;
     case eKeyUp:
     case eKeyDown:
     case eKeyPress:
     case eWheel:
     case eWheelOperationStart:
-    case NS_WHEEL_STOP:
+    case eWheelOperationEnd:
       // Disable touch caret while key/wheel event is received.
       TOUCHCARET_LOG("Receive key/wheel event %d", aEvent->mMessage);
       SetVisibility(false);
       break;
     case eMouseLongTap:
       if (mState == TOUCHCARET_TOUCHDRAG_ACTIVE) {
         // Disable long tap event from APZ while dragging the touch caret.
         status = nsEventStatus_eConsumeNoDefault;
--- a/layout/base/gtest/TestAccessibleCaretEventHub.cpp
+++ b/layout/base/gtest/TestAccessibleCaretEventHub.cpp
@@ -737,17 +737,17 @@ TEST_F(AccessibleCaretEventHubTester, Te
                            nsEventStatus_eIgnore);
 
   HandleEventAndCheckState(CreateWheelEvent(eWheel),
                            MockAccessibleCaretEventHub::ScrollState(),
                            nsEventStatus_eIgnore);
 
   mHub->ScrollPositionChanged();
 
-  HandleEventAndCheckState(CreateWheelEvent(NS_WHEEL_STOP),
+  HandleEventAndCheckState(CreateWheelEvent(eWheelOperationEnd),
                            MockAccessibleCaretEventHub::PostScrollState(),
                            nsEventStatus_eIgnore);
 
   // Momentum scroll
   HandleEventAndCheckState(CreateWheelEvent(eWheel),
                            MockAccessibleCaretEventHub::PostScrollState(),
                            nsEventStatus_eIgnore);
 
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -384,17 +384,20 @@ NS_EVENT_MESSAGE(NS_POINTERLOCKERROR,   
 
 NS_EVENT_MESSAGE(eWheelEventFirst,       5400)
 // eWheel is the event message of DOM wheel event.
 NS_EVENT_MESSAGE(eWheel,                 eWheelEventFirst)
 // eWheelOperationStart may be dispatched when user starts to operate mouse
 // wheel.  This won't be fired on some platforms which don't have corresponding
 // native event.
 NS_EVENT_MESSAGE(eWheelOperationStart,   eWheelEventFirst + 1)
-NS_EVENT_MESSAGE(NS_WHEEL_STOP,          eWheelEventFirst + 2)
+// eWheelOperationEnd may be dispatched when user ends or cancels operating
+// mouse wheel.  This won't be fired on some platforms which don't have
+// corresponding native event.
+NS_EVENT_MESSAGE(eWheelOperationEnd,     eWheelEventFirst + 2)
 
 //System time is changed
 NS_EVENT_MESSAGE(NS_MOZ_TIME_CHANGE_EVENT, 5500)
 
 // Network packet events.
 NS_EVENT_MESSAGE(NS_NETWORK_EVENT_START,    5600)
 NS_EVENT_MESSAGE(NS_NETWORK_UPLOAD_EVENT,   NS_NETWORK_EVENT_START + 1)
 NS_EVENT_MESSAGE(NS_NETWORK_DOWNLOAD_EVENT, NS_NETWORK_EVENT_START + 2)
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -4891,27 +4891,27 @@ PanGestureTypeForEvent(NSEvent* aEvent)
     return;
   }
 
   if (!mGeckoChild) {
     return;
   }
 
   NSEventPhase phase = nsCocoaUtils::EventPhase(theEvent);
-  // Fire eWheelOperationStart/STOP events when 2 fingers touch/release the
+  // Fire eWheelOperationStart/End events when 2 fingers touch/release the
   // touchpad.
   if (phase & NSEventPhaseMayBegin) {
     [self sendWheelCondition:YES
-                       first:NS_WHEEL_STOP
+                       first:eWheelOperationEnd
                       second:eWheelOperationStart
                     forEvent:theEvent];
   } else if (phase & (NSEventPhaseEnded | NSEventPhaseCancelled)) {
     [self sendWheelCondition:NO
                        first:eWheelOperationStart
-                      second:NS_WHEEL_STOP
+                      second:eWheelOperationEnd
                     forEvent:theEvent];
   }
 
   NSPoint locationInWindow = nsCocoaUtils::EventLocationForWindow(theEvent, [self window]);
 
   ScreenPoint position = ScreenPoint::FromUntyped(
     [self convertWindowCoordinates:locationInWindow]);