DescriptionMade layout viewport scroll updates from compositor work like ordinary layers.
Most scroll layers in CC update the main thread with changed scroll offsets by
using the did_scroll_callback, which calls into GraphicsLayer to update its
copy of the scroll offset. The exception to this has been viewport layers,
which don't set a did_scroll_callback. Instead, the viewport gets its values
applied in WebViewImpl::applyViewportDeltas. This was done since viewport
scroll bounds were dependent on page scale and top controls offset so these
values had to be committed atomically.
It turns out, only the inner (visual) viewport's scroll bounds depend on the
page scale. While the outer (layout) viewport's scroll bounds do depend on top
controls, the compositor already clamps the scroll offset to the acceptable
bounds so as long as we apply the top controls delta after the scroll offset
(to prevent the main thread from clamping it again) the outer viewport doesn't
need to be in applyViewportDeltas.
This CL removes the layout viewport as part of applyViewportDeltas and makes it
use the regular did_scroll_callback mechanism. This simplifies the root
scroller implementation which can change which layer is the outer viewport.
Having the outer viewport use the callback avoids some race conditions as to
which layer scroll gets applied to during a change of outer viewport.
I've left the parameter in applyViewportDeltas' signature since that's a large
mechanical change that'll touch many files. This Cl just passes 0 for the
layout viewport scroll delta and a future CL will remove the parameter itself.
BUG=505516
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Committed: https://crrev.com/4222c27d55d1de9a3d8a13070266e2c8517aead5
Cr-Commit-Position: refs/heads/master@{#406022}
Patch Set 1 #
Total comments: 1
Patch Set 2 : Rebase #
Total comments: 2
Patch Set 3 : Rebase #Patch Set 4 : Initialize ScrollUpdateInfo's layer id in constructor #Messages
Total messages: 18 (8 generated)
|