DescriptionRefactor delegated scrolling in LayerImpl
When the root layer scroll offset delegate's scroll offset is bigger
than that of the outer viewport scroll layer, the root scroll offset is
distributed between inner and outer viewport scroll layer. However, the
layer that gets assigned a new scroll offset first will immediately
update the root layer delegate scroll offset without waiting for the
rest of the undistributed scrolls to be assigned to other layer. This
causes the associated bug 470360.
This CL simplified the logic around delegated scrolling by removing
LayerImpl::ScrollOffsetDelegate. LayerImpl will always have the most
recent and correct scroll offset.
LTHI and LTI still delegate the root layer scroll to an external source
(Android WebView).
There are 2 cases for a LayerImpl to change its scroll offset:
1. When the root layer scroll delegate scrolls, the new scroll offset will be
synchronously distributed to the inner and outer viewport scroll layer.
2. The LayerImpl scrolls by itself, like ScrollBy() or PushScrollOffset(). In
this case, root layer scroll delegate will be updated with the new scroll
offset.
BUG=470360
Committed: https://crrev.com/33370e19d3c6a43d0cb7c87f90aadb79d44dd741
Cr-Commit-Position: refs/heads/master@{#324012}
Patch Set 1 : wip #Patch Set 2 : block_updates #Patch Set 3 : test #Patch Set 4 : test #Patch Set 5 : test #Patch Set 6 : format #
Total comments: 2
Patch Set 7 : comments #Patch Set 8 : Remove "scrollOffsetDelegate" #
Total comments: 6
Patch Set 9 : comments #
Total comments: 3
Patch Set 10 : address comments + fix test #Patch Set 11 : remove the extra state in LTI for real.. #Patch Set 12 : #Patch Set 13 : Added a new test for Inner/Outer viewport scrolling #
Messages
Total messages: 20 (6 generated)
|