Commit c3ddb307 authored by Philip Rogers's avatar Philip Rogers Committed by Commit Bot

[BlinkGenPropertyTrees] Expand all clips between inner and outer viewports

The root scroller is also known as the outer viewport and is not always the
root frame's LayoutView. If the root scroller is a child of the root frame,
the clips between the child and the root frame should not apply to the root
scroller. Previously, this was implemented by disabling clipping on the
ancestor GraphicsLayers of the root scroller. This patch changes the behavior to
adjust all ancestor clips in LayerTreeHostImpl::UpdateViewportContainerSizes.
This should be safe because of the restrictions on what can be a root scroller.

Bug: 879610
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux-blink-gen-property-trees;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I1974ae6b2a2f130cc2ce4a4d90e3dea1c9d64340
Reviewed-on: https://chromium-review.googlesource.com/1217509
Commit-Queue: Philip Rogers <pdr@chromium.org>
Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590495}
parent 50cdcbc9
...@@ -2505,6 +2505,14 @@ void LayerTreeHostImpl::UpdateViewportContainerSizes() { ...@@ -2505,6 +2505,14 @@ void LayerTreeHostImpl::UpdateViewportContainerSizes() {
outer_clip_node->clip.set_height( outer_clip_node->clip.set_height(
OuterViewportScrollNode()->container_bounds.height() + OuterViewportScrollNode()->container_bounds.height() +
outer_bounds_delta.y()); outer_bounds_delta.y());
// Expand all clips between the outer viewport and the inner viewport.
auto* outer_ancestor = property_trees->clip_tree.parent(outer_clip_node);
while (outer_ancestor && outer_ancestor != inner_clip_node) {
outer_ancestor->clip.Union(outer_clip_node->clip);
outer_ancestor = property_trees->clip_tree.parent(outer_ancestor);
}
anchor.ResetViewportToAnchoredPosition(); anchor.ResetViewportToAnchoredPosition();
} }
......
...@@ -211,8 +211,6 @@ Bug(none) compositing/overflow/scaled-overflow.html [ Failure ] ...@@ -211,8 +211,6 @@ Bug(none) compositing/overflow/scaled-overflow.html [ Failure ]
crbug.com/879173 compositing/overflow/nested-render-surfaces-with-rotation.html [ Failure ] crbug.com/879173 compositing/overflow/nested-render-surfaces-with-rotation.html [ Failure ]
crbug.com/879173 virtual/prefer_compositing_to_lcd_text/compositing/overflow/nested-render-surfaces-with-rotation.html [ Failure ] crbug.com/879173 virtual/prefer_compositing_to_lcd_text/compositing/overflow/nested-render-surfaces-with-rotation.html [ Failure ]
crbug.com/879610 virtual/android/rootscroller/nested-rootscroller-browser-controls-bounds-hidden.html [ Failure ]
crbug.com/882975 virtual/threaded/synthetic_gestures/synthetic-pinch-zoom-gesture-touchpad.html [ Failure Pass ] crbug.com/882975 virtual/threaded/synthetic_gestures/synthetic-pinch-zoom-gesture-touchpad.html [ Failure Pass ]
crbug.com/882975 virtual/threaded/fast/events/pinch/gesture-pinch-zoom-prevent-in-handler.html [ Failure Pass ] crbug.com/882975 virtual/threaded/fast/events/pinch/gesture-pinch-zoom-prevent-in-handler.html [ Failure Pass ]
crbug.com/882975 virtual/threaded/fast/events/pinch/scroll-visual-viewport-send-boundary-events.html [ Failure Pass ] crbug.com/882975 virtual/threaded/fast/events/pinch/scroll-visual-viewport-send-boundary-events.html [ Failure Pass ]
......
...@@ -2639,6 +2639,8 @@ void CompositedLayerMapping::RegisterScrollingLayers() { ...@@ -2639,6 +2639,8 @@ void CompositedLayerMapping::RegisterScrollingLayers() {
[is_fixed_container, resized_by_url_bar](GraphicsLayer* layer) { [is_fixed_container, resized_by_url_bar](GraphicsLayer* layer) {
layer->SetIsContainerForFixedPositionLayers(is_fixed_container); layer->SetIsContainerForFixedPositionLayers(is_fixed_container);
layer->SetIsResizedByBrowserControls(resized_by_url_bar); layer->SetIsResizedByBrowserControls(resized_by_url_bar);
// TODO(pdr): This prevents clipping and should not be needed, but
// CaptureScreenshotTest.CaptureScreenshotArea depends on this.
if (resized_by_url_bar) if (resized_by_url_bar)
layer->SetMasksToBounds(false); layer->SetMasksToBounds(false);
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment