commit | e6ca4549d7316c39bc038027769326247a85a418 | [log] [tgz] |
---|---|---|
author | David Bokan <bokan@chromium.org> | Fri May 17 18:32:18 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Fri May 17 18:32:18 2019 |
tree | 802ee000a92a6c7c7333d0649f315123ae715329 | |
parent | 1dc2e479cc528e8fea55ac6773d172198e89cdeb [diff] |
[BGPT] Update cc::Layer offset from visual viewport In the linked bug, we try scrolling the page using the keyboard. While all the scroll offsets in Blink are correctly updated, we don't see the scrolling occur on the screen. The reason for this is that we don't realize anything has changed and the commit is aborted due to no changes. It turns out we don't update the offset on the VisualViewport's cc::Layer. The reason this doesn't manifest in other contexts is that we usually perform viewport scrolling using touch or wheel events which are handled on the compositor thread. The fix here is to do what we do for PaintLayerScrollableAreas and call UpdateCompositedScrollOffset on the VisualViewport when the offset changes from the main thread. We need to update the cc::Layer's offset since we use a change in this offset to determine that a commit is needed. This is a similar issue to the one fixed in https://crrev.com/dfe90fdc496af64515756ba1b5970d2760b7314d Bug: 956579 Change-Id: Ie9854f3df1b7065bc2d021b131ff6a8998a8f59d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1617545 Reviewed-by: Philip Rogers <pdr@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#660930}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .