Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(630)

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp

Issue 1852753002: Restore handling of new scroll when waiting to cancel current scroll on cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 af2340832e8dad8845e7a8f6ababeabbfe2ac122..38a3df57dd9be6db040824ac3a8b8aea5d09383c 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
@@ -147,7 +147,15 @@ bool ScrollAnimator::willAnimateToOffset(const FloatPoint& targetPos)
if (m_runState == RunState::PostAnimationCleanup)
resetAnimationState();
- if (m_animationCurve && m_runState != RunState::WaitingToCancelOnCompositor) {
+ if (m_runState == RunState::WaitingToCancelOnCompositor) {
+ // Ignore user scroll if WaitingToCancelOnCompositor. Can be in this
+ // state when holding down an arrow.
+ // TODO(ymalik): Handle this case by either updating the target on the
+ // current scroll or starting a new animation (see crbug.com/599876).
+ return true;
+ }
+
+ if (m_animationCurve) {
if ((targetPos - m_targetOffset).isZero())
return true;

Powered by Google App Engine
This is Rietveld 408576698