[BlinkGenPropertyTrees] Implement pos:fixed URL bar adjustment
This CL implements the "viewport bounds delta" for position: fixed elements. When the URL bar is hidden, the renderer is only resized when the user finishes scrolling. This means that while the scroll is on-going and the URL bar is hiding, the renderer is actually smaller than the visible area - we're revealing new content outside the renderer's bounds. Since position: fixed elements are positioned relative to the top- left corner of a layer, a bottom-fixed element would appear to detach from the bottom of the screen and move upwards as the URL bar hides. CC uses some slight-of-hand to prevent this by adding a "viewport bounds delta" to the scrolling and clipping bounds of the viewport layers. This allows the newly revealed content to be seen and keeps bottom-fixed elements static until the renderer itself is resized and the bounds delta can be cleared. This CL does the following things: 1) Update Blink to set the correct paint property tree state on bottom-fixed objects so that the bounds delta is correctly applied to them. 2) Modify the compositor to apply the bounds delta to the property trees directly, rather than using layers which may no longer exist in BGPT mode 3) Explicitly clamp the scroll offset on pending tree activation. LayerTreeHostImplTest, ClampingAfterActivation was failing after the early return was added to UpdateViewportContainerSizes. We were relying on the viewport scroll anchor to clamp the scroll offsets. Better to do this explicitly. The marked test is currently crashing but tests this behavior. I've confirmed that ignoring the crash causes the test to fail as expected and applying this patch fixes it. TEST=virtual/android/url-bar/bottom-fixed-adjusted-when-showing-url-bar.html Bug: 850135 Cq-Include-Trybots: luci.chromium.try:linux-blink-gen-property-trees;luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I3a2da2648b47c2ccc0baf2876da12c228213dbe6 Reviewed-on: https://chromium-review.googlesource.com/1173441 Commit-Queue: David Bokan <bokan@chromium.org> Reviewed-by:Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/master@{#583398}
Showing
Please register or sign in to comment