| Index: third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
|
| diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
|
| index de0000b4a8f5a948cb00f564d08a62014024fb01..9f4b3ddbbceb3fafae6a6773a80141a4148e8164 100644
|
| --- a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
|
| +++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
|
| @@ -96,10 +96,9 @@ ScrollResultOneDimensional ScrollAnimator::userScroll(
|
| TRACE_EVENT0("blink", "ScrollAnimator::scroll");
|
|
|
| if (granularity == ScrollByPrecisePixel) {
|
| - if (hasRunningAnimation()) {
|
| - abortAnimation();
|
| - resetAnimationState();
|
| - }
|
| + // Cancel scroll animation because asked to instant scroll.
|
| + if (hasRunningAnimation())
|
| + cancelAnimation();
|
| return ScrollAnimatorBase::userScroll(orientation, granularity, step, delta);
|
| }
|
|
|
| @@ -110,7 +109,7 @@ ScrollResultOneDimensional ScrollAnimator::userScroll(
|
| FloatPoint targetPos = desiredTargetPosition();
|
| targetPos.moveBy(pixelDelta);
|
|
|
| - if (m_animationCurve) {
|
| + if (m_animationCurve && m_runState != RunState::WaitingToCancelOnCompositor) {
|
| if ((targetPos - m_targetOffset).isZero()) {
|
| // Report unused delta only if there is no animation running. See
|
| // comment below regarding scroll latching.
|
|
|