commit | cead2e78a8e7e9acba07fd4f3d6ab2c9b3713e18 | [log] [tgz] |
---|---|---|
author | David Bokan <bokan@chromium.org> | Fri Mar 09 04:31:14 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Mar 09 04:31:14 2018 |
tree | 78eebf6a2789be61c3b8e12ed050fb860cc651d2 | |
parent | f037bc66ae2b39d0c3b36f68286c53c516d3214f [diff] |
Prevent scroll contents being smaller than clip The linked bug breaks when root-layer-scrolls is turned on because the scrolling contents layer of the LayoutView's CompositedLayerMapping gets its size from LayoutView::DocumentRect which is based on the overflow rect. This is fractional because of Android's minimum-scale frame resize after layout. This is snapped and becomes 1px shorter than the main frame - which uses an expanded int rect in WebViewImpl::MainFrameSize(). This causes the background override to not be seen in the bottom row of pixels. This works without RLS because the LayoutView itself doesn't have a scrolling contents layer - the main GraphicsLayer itself is the scrolling contents and its size comes from PaintLayer::BoundingBoxForCompositing which uses the expanded-int frame size for the root layer. The fix in this CL is to ensure a scrolling contents layer is always at least as large as its clipping layer. This must necessarily be the case since we only create scrolling layers if we have overflow. Even if we only overflow in one dimension, the other dimension is typically set to the clip size so this is the expectation. An additional change is required in this CL. The scrolling bounds as used in CC to calculate whether CC-controlled scrollbars should be shown uses the same minimum-scale main frame resize as in WebViewImpl mentioned above. This incorrectly keeps the bounds in fractional pixels. Since we now effectively ceil the bounds in Blink, we do the same in CC to avoid showing the scrollbars unnecessarily. Bug: 811406 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: Idcbdac1b03999f30c8d373f4b45dc6040d8f8514 Reviewed-on: https://chromium-review.googlesource.com/949772 Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Reviewed-by: enne <enne@chromium.org> Reviewed-by: Steve Kobes <skobes@chromium.org> Reviewed-by: Philip Rogers <pdr@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#542023}
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 .