[BlinkGenPropertyTrees] Implement URL bar "viewport bounds delta" |
|||
Issue descriptionLayerTreeHostImpl::UpdateViewportContainerSizes currently doesn't work with BlinkGenPropertyTrees enabled since it works on the viewport layers. It should be converted to work on the property trees but there's some non-trivial transformations to be done here.
,
Aug 8
,
Aug 15
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bf23241073ef806810f2aa90bbb153b639239c81 commit bf23241073ef806810f2aa90bbb153b639239c81 Author: David Bokan <bokan@chromium.org> Date: Wed Aug 15 21:17:40 2018 [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} [modify] https://crrev.com/bf23241073ef806810f2aa90bbb153b639239c81/cc/layers/layer_impl.h [modify] https://crrev.com/bf23241073ef806810f2aa90bbb153b639239c81/cc/trees/layer_tree_host_impl.cc [modify] https://crrev.com/bf23241073ef806810f2aa90bbb153b639239c81/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-gen-property-trees [modify] https://crrev.com/bf23241073ef806810f2aa90bbb153b639239c81/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc [modify] https://crrev.com/bf23241073ef806810f2aa90bbb153b639239c81/third_party/blink/renderer/platform/graphics/compositing/property_tree_manager.cc [modify] https://crrev.com/bf23241073ef806810f2aa90bbb153b639239c81/third_party/blink/renderer/platform/graphics/paint/transform_paint_property_node.h
,
Aug 15
|
|||
►
Sign in to add a comment |
|||
Comment 1 by bokan@chromium.org
, Jun 6 2018