[BGPT] Fix position:fixed NonFastScrollRegion
Blink generates NonFastScrollRegions to tell the compositor where there are uncomposited scrollers and regions so that it knows to forward input to the main thread. In https://crrev.com/618633b41898eb98e78cd9c9904fb2 I amended this code to store the regions for position:fixed layers in a separate cc::Region and Layer. The linked bug is a result of a bug in this new code. The above CL didn't account for the fact that the rects are calculated and stored in document coordinates. This means that when the regions are recalculated while the page is scrolled, the fixed regions will be pushed down on the inner viewport scroll layer, since the fixed layers are now further down the page relative to the document origin. Scrolls over a fixed layer now don't hit the intended region. The reason the tests didn't catch this is because the regions are only recalculated when invalidated. A compositor scroll doesn't invalidate them so if nothing on the page changes after load, the issue doesn't appear. This CL fixes the issue by converting the fixed regions into root frame coordinates, which is the coordinate space of the inner scrolling layer. I've also fixed the layout tests to check that the rects remain correct after a scroll when they're recalculated. This CL relies on a prerequisite fix in https://crrev.com/c/1592637 which ensures we correctly determine whether a scroller is considered "fixed" or "scrollable" with respect to the root frame. Bug: 951271 Change-Id: Ib741fa95ae8a9c88afc2ae0f99f298679ea32e7d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1589108Reviewed-by:Philip Rogers <pdr@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#656232}
Showing
Please register or sign in to comment