Refactor 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
Review URL: https://codereview.chromium.org/
1038173002
Cr-Commit-Position: refs/heads/master@{#324012}