Bug 1265510 - Ensure that new input blocks still allow APZCs with interrupted animations to scroll-snap. r=botond a=lizzard
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 26 Apr 2016 13:37:18 -0400
changeset 318807 6ddc792201a2b868ade19e787a5a4e17c5e9fef6
parent 318806 7b8aae1bc01ef5831d751bdc32c442d4e3a06a86
child 318808 8cb0342020dc3b6feaa75e85fc7d2564f28e83ad
push id9566
push userkwierso@gmail.com
push dateThu, 19 May 2016 00:30:49 +0000
treeherdermozilla-aurora@9942206d3f9c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond, lizzard
bugs1265510
milestone48.0a2
Bug 1265510 - Ensure that new input blocks still allow APZCs with interrupted animations to scroll-snap. r=botond a=lizzard MozReview-Commit-ID: EG8PZKfcFtW
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;