Bug 895274 part.186 Rename NS_WHEEL_END to eWheelOperationEnd r=smaug

This commit is contained in:
Masayuki Nakano 2015-09-11 01:59:55 +09:00
parent 93b569c87b
commit c830d579e9
7 changed files with 15 additions and 12 deletions

View File

@ -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();

View File

@ -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,

View File

@ -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;

View File

@ -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);

View File

@ -742,7 +742,7 @@ TEST_F(AccessibleCaretEventHubTester, TestWheelEventScroll)
mHub->ScrollPositionChanged();
HandleEventAndCheckState(CreateWheelEvent(NS_WHEEL_STOP),
HandleEventAndCheckState(CreateWheelEvent(eWheelOperationEnd),
MockAccessibleCaretEventHub::PostScrollState(),
nsEventStatus_eIgnore);

View File

@ -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)

View File

@ -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];
}