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

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: rebase master review feedback 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1bbd920a6737bef268a6689ae60b5c5aa36fe47e..0cac71500419cd67738db3b3561397aa49388c2f 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;
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698