From c830d579e976d4a81f6065f4b9664f1f246157b2 Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Fri, 11 Sep 2015 01:59:55 +0900 Subject: [PATCH] Bug 895274 part.186 Rename NS_WHEEL_END to eWheelOperationEnd r=smaug --- dom/events/EventStateManager.cpp | 4 ++-- dom/events/WheelHandlingHelper.h | 4 ++-- layout/base/AccessibleCaretEventHub.cpp | 4 ++-- layout/base/TouchCaret.cpp | 2 +- layout/base/gtest/TestAccessibleCaretEventHub.cpp | 2 +- widget/EventMessageList.h | 5 ++++- widget/cocoa/nsChildView.mm | 6 +++--- 7 files changed, 15 insertions(+), 12 deletions(-) diff --git a/dom/events/EventStateManager.cpp b/dom/events/EventStateManager.cpp index 0ff4db19bb7..2e711da4079 100644 --- a/dom/events/EventStateManager.cpp +++ b/dom/events/EventStateManager.cpp @@ -713,7 +713,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext, break; case eWheel: case eWheelOperationStart: - case NS_WHEEL_STOP: + case eWheelOperationEnd: { NS_ASSERTION(aEvent->mFlags.mIsTrusted, "Untrusted wheel event shouldn't be here"); @@ -3008,7 +3008,7 @@ EventStateManager::PostHandleEvent(nsPresContext* aPresContext, } } break; - case NS_WHEEL_STOP: + case eWheelOperationEnd: { MOZ_ASSERT(aEvent->mFlags.mIsTrusted); ScrollbarsForWheel::MayInactivate(); diff --git a/dom/events/WheelHandlingHelper.h b/dom/events/WheelHandlingHelper.h index 11c0cabbbc8..4b37eb04342 100644 --- a/dom/events/WheelHandlingHelper.h +++ b/dom/events/WheelHandlingHelper.h @@ -95,8 +95,8 @@ protected: /** - * 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, diff --git a/layout/base/AccessibleCaretEventHub.cpp b/layout/base/AccessibleCaretEventHub.cpp index 867f46e3367..42ccd112448 100644 --- a/layout/base/AccessibleCaretEventHub.cpp +++ b/layout/base/AccessibleCaretEventHub.cpp @@ -545,8 +545,8 @@ AccessibleCaretEventHub::HandleWheelEvent(WidgetWheelEvent* aEvent) 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; diff --git a/layout/base/TouchCaret.cpp b/layout/base/TouchCaret.cpp index a8e16e23d0d..f473869753f 100644 --- a/layout/base/TouchCaret.cpp +++ b/layout/base/TouchCaret.cpp @@ -788,7 +788,7 @@ TouchCaret::HandleEvent(WidgetEvent* aEvent) 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); diff --git a/layout/base/gtest/TestAccessibleCaretEventHub.cpp b/layout/base/gtest/TestAccessibleCaretEventHub.cpp index 62716cda0fd..7a3663bdcab 100644 --- a/layout/base/gtest/TestAccessibleCaretEventHub.cpp +++ b/layout/base/gtest/TestAccessibleCaretEventHub.cpp @@ -742,7 +742,7 @@ TEST_F(AccessibleCaretEventHubTester, TestWheelEventScroll) mHub->ScrollPositionChanged(); - HandleEventAndCheckState(CreateWheelEvent(NS_WHEEL_STOP), + HandleEventAndCheckState(CreateWheelEvent(eWheelOperationEnd), MockAccessibleCaretEventHub::PostScrollState(), nsEventStatus_eIgnore); diff --git a/widget/EventMessageList.h b/widget/EventMessageList.h index 5a07a23a274..187919d4e8b 100644 --- a/widget/EventMessageList.h +++ b/widget/EventMessageList.h @@ -389,7 +389,10 @@ NS_EVENT_MESSAGE(eWheel, eWheelEventFirst) // 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) diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index 6054939fc0d..7888a8eacf0 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -4896,17 +4896,17 @@ PanGestureTypeForEvent(NSEvent* aEvent) } 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]; }