Bug 1211365 - Delete wheel event handling. r=mtseng

All desktop platforms support APZ now. eWheelOperationStart and
eWheelOperationEnd are superseded by AsyncPanZoomStarted and
AsyncPanZoomStopped respectively.
This commit is contained in:
Ting-Yu Lin
2015-10-05 16:52:29 +08:00
parent b58a8bdeec
commit 02531153a1
3 changed files with 2 additions and 85 deletions

View File

@@ -257,8 +257,8 @@ public:
};
// -----------------------------------------------------------------------------
// PostScrollState: In this state, we are waiting for another APZ start, press
// event, or momentum wheel scroll.
// PostScrollState: In this state, we are waiting for another APZ start or press
// event.
//
class AccessibleCaretEventHub::PostScrollState
: public AccessibleCaretEventHub::State
@@ -287,12 +287,6 @@ public:
aContext->SetState(aContext->NoActionState());
}
virtual void OnScrolling(AccessibleCaretEventHub* aContext) override
{
// Momentum scroll by wheel event.
aContext->LaunchScrollEndInjector();
}
virtual void OnBlur(AccessibleCaretEventHub* aContext,
bool aIsLeavingDocument) override
{
@@ -471,10 +465,6 @@ AccessibleCaretEventHub::HandleEvent(WidgetEvent* aEvent)
status = HandleMouseEvent(aEvent->AsMouseEvent());
break;
case eWheelEventClass:
status = HandleWheelEvent(aEvent->AsWheelEvent());
break;
case eTouchEventClass:
status = HandleTouchEvent(aEvent->AsTouchEvent());
break;
@@ -538,35 +528,6 @@ AccessibleCaretEventHub::HandleMouseEvent(WidgetMouseEvent* aEvent)
return rv;
}
nsEventStatus
AccessibleCaretEventHub::HandleWheelEvent(WidgetWheelEvent* aEvent)
{
switch (aEvent->mMessage) {
case eWheel:
AC_LOGV("eWheel, isMomentum %d, state: %s", aEvent->isMomentum,
mState->Name());
mState->OnScrolling(this);
break;
case eWheelOperationStart:
AC_LOGV("eWheelOperationStart, state: %s", mState->Name());
mState->OnScrollStart(this);
break;
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
// end, not to consume it.
return nsEventStatus_eIgnore;
}
nsEventStatus
AccessibleCaretEventHub::HandleTouchEvent(WidgetTouchEvent* aEvent)
{