Bug 1270165 - Allow ResetTouchInputState to be called while a non-touch block is the current block. r?botond
MozReview-Commit-ID: HN3G249raKW
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
+++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ -3755,17 +3755,17 @@ AsyncPanZoomController::ResetTouchInputS
MultiTouchInput cancel(MultiTouchInput::MULTITOUCH_CANCEL, 0, TimeStamp::Now(), 0);
RefPtr<GestureEventListener> listener = GetGestureEventListener();
if (listener) {
listener->HandleInputEvent(cancel);
}
CancelAnimationAndGestureState();
// Clear overscroll along the entire handoff chain, in case an APZC
// later in the chain is overscrolled.
- if (TouchBlockState* block = CurrentTouchBlock()) {
+ if (TouchBlockState* block = CurrentInputBlock()->AsTouchBlock()) {
block->GetOverscrollHandoffChain()->ClearOverscroll();
}
}
void
AsyncPanZoomController::CancelAnimationAndGestureState()
{
mX.CancelGesture();