DescriptionCorrectly update scroll offset animations in response to scroll anchoring
This CL fixes the incorrect implementation in https://crrev.com/1926473003.
In addition to the state WaitingToCancelOnCompositorButNewScroll introduced
previously, it adds a new state RunningOnCompositorButNeedsAdjustment when
an ongoing animation needs to be adjusted. We need the former to fix
issue 599876.
When an adjustment needs to be made, ScrollAnchor calls into ScrollAnimator
which adjusts the curve. When the animation is running on MT, this is enough,
but if the animation is running on CC, we abort the old animation and
push a new one with the adjusted initial and target positions (hence the new
state).
This CL also cleans up ::updateCompositorAnimations.
Added a new test case for testing MT animation and an animation running on CC
is tested by the layout test added in the initial patch.
(fast/scroll-behavior/smooth-scroll/ongoing-smooth-scroll-anchors.html)
BUG=594456
Committed: https://crrev.com/07ed51b3771572c4bff43a990351f4be1de4f4ae
Cr-Commit-Position: refs/heads/master@{#396913}
Patch Set 1 #
Total comments: 8
Patch Set 2 : review comments #Patch Set 3 : nit #Messages
Total messages: 24 (10 generated)
|