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

Issue 1852753002: Restore handling of new scroll when waiting to cancel current scroll on cc (Closed)

Created:
4 years, 8 months ago by ymalik
Modified:
4 years, 8 months ago
Reviewers:
ajuma, jbroman
CC:
darktears, blink-reviews, blink-reviews-animation_chromium.org, chromium-reviews, Eric Willigers, kinuko+watch, rjwright, shans
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Restore handling of new scroll when waiting to cancel current scroll on cc https://crrev.com/1678713002 caused this regression. This CL restores the old handling of a new user scroll when in state WaitingToCancelOnCompositor. The current behavior is pretty broken when we are in WaitingToCancelAnimation and a new user scroll arrives. willAnimateToOffset updates the target offset and goes into WaitingToSendToCompositor. Consequently, ::updateCompositorAnimation doesn't abort the previous animation and starts a new one with the updated target and the two animations compete for scroll offsets. With this CL, when we are in WaitingToCancelAnimation and a new user scroll arrives, we do nothing and let ::updateCompositorAnimation cancel the running animation. As subsequent user scrolls arrive, we will now just start a new animation with the updated target (and the bug is that we will ignore the first user scroll when in WaitingToCancelAnimation). The remaining bug is less serious because in general this is a special case when we are cancelling in the middle of a user scroll and then starting another scroll right away. This happens in cases where a site listens for the scroll and updates the scroll offset (programmatic scroll cancels user scroll), and the user continues to scroll. FWIW, this is the current behavior in M49, and no real issues have been reported around it. crbug.com/599876 tracks the correct handling for this case. BUG=598548 Committed: https://crrev.com/d115573365c24d26fc93fe9b9d0976d93725e91d Cr-Commit-Position: refs/heads/master@{#384714}

Patch Set 1 #

Total comments: 2

Patch Set 2 : rebase master review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -1 line) Patch
M third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp View 1 1 chunk +9 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp View 1 1 chunk +73 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (7 generated)
ymalik
4 years, 8 months ago (2016-04-01 16:20:49 UTC) #2
ajuma
Can you say a bit more about how the behavior change this introduces? That is, ...
4 years, 8 months ago (2016-04-01 17:38:06 UTC) #3
ymalik
On 2016/04/01 17:38:06, ajuma wrote: > Can you say a bit more about how the ...
4 years, 8 months ago (2016-04-01 18:05:39 UTC) #4
ajuma
On 2016/04/01 18:05:39, ymalik1 wrote: > On 2016/04/01 17:38:06, ajuma wrote: > > Can you ...
4 years, 8 months ago (2016-04-01 18:10:33 UTC) #5
ymalik
+Jeremy for owners
4 years, 8 months ago (2016-04-01 18:13:26 UTC) #8
ymalik
On 2016/04/01 18:10:33, ajuma wrote: > On 2016/04/01 18:05:39, ymalik1 wrote: > > On 2016/04/01 ...
4 years, 8 months ago (2016-04-01 18:14:09 UTC) #9
jbroman
https://codereview.chromium.org/1852753002/diff/1/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp File third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp (right): https://codereview.chromium.org/1852753002/diff/1/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp#newcode465 third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp:465: .WillRepeatedly(Return(true)); These expectations are not actually verified, because the ...
4 years, 8 months ago (2016-04-01 19:09:38 UTC) #10
ymalik
On 2016/04/01 19:09:38, jbroman wrote: > https://codereview.chromium.org/1852753002/diff/1/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp > File third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp (right): > > https://codereview.chromium.org/1852753002/diff/1/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp#newcode465 > ...
4 years, 8 months ago (2016-04-01 19:53:59 UTC) #11
ymalik
https://codereview.chromium.org/1852753002/diff/1/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp File third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp (right): https://codereview.chromium.org/1852753002/diff/1/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp#newcode465 third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp:465: .WillRepeatedly(Return(true)); On 2016/04/01 19:09:38, jbroman wrote: > These expectations ...
4 years, 8 months ago (2016-04-01 19:54:45 UTC) #12
jbroman
rs lgtm
4 years, 8 months ago (2016-04-01 19:58:50 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1852753002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1852753002/20001
4 years, 8 months ago (2016-04-01 20:02:31 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 8 months ago (2016-04-01 22:52:01 UTC) #18
commit-bot: I haz the power
4 years, 8 months ago (2016-04-01 22:53:08 UTC) #20
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/d115573365c24d26fc93fe9b9d0976d93725e91d
Cr-Commit-Position: refs/heads/master@{#384714}

Powered by Google App Engine
This is Rietveld 408576698