Bug 1265510 - Ensure that new input blocks still allow APZCs with interrupted animations to scroll-snap. r?botond draft
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 25 Apr 2016 19:56:02 -0400
changeset 356195 7b6deefea224728e476bb210890afe459f965295
parent 356194 4882975b2d699ef92dad6c2f1823dc7f633201c8
child 519365 7b81e20657da99f4551156f445cd7b2992d235c8
push id16473
push userkgupta@mozilla.com
push dateMon, 25 Apr 2016 23:56:46 +0000
reviewersbotond
bugs1265510
milestone49.0a1
Bug 1265510 - Ensure that new input blocks still allow APZCs with interrupted animations to scroll-snap. r?botond MozReview-Commit-ID: 8tXVIS0EzbO
gfx/layers/apz/src/InputQueue.cpp
--- a/gfx/layers/apz/src/InputQueue.cpp
+++ b/gfx/layers/apz/src/InputQueue.cpp
@@ -395,17 +395,17 @@ InputQueue::CancelAnimationsForNewBlock(
 {
   // We want to cancel animations here as soon as possible (i.e. without waiting for
   // content responses) because a finger has gone down and we don't want to keep moving
   // the content under the finger. However, to prevent "future" touchstart events from
   // interfering with "past" animations (i.e. from a previous touch block that is still
   // being processed) we only do this animation-cancellation if there are no older
   // touch blocks still in the queue.
   if (aBlock == CurrentBlock()) {
-    aBlock->GetOverscrollHandoffChain()->CancelAnimations(ExcludeOverscroll);
+    aBlock->GetOverscrollHandoffChain()->CancelAnimations(ExcludeOverscroll | ScrollSnap);
   }
 }
 
 void
 InputQueue::MaybeRequestContentResponse(const RefPtr<AsyncPanZoomController>& aTarget,
                                         CancelableBlockState* aBlock)
 {
   bool waitForMainThread = false;