New issue
Advanced search Search tips

Issue 783532 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Overlap testing broken when composited layer is inside non-composited scroller

Project Member Reported by bokan@chromium.org, Nov 10 2017

Issue description

Chrome Version       : 64.0.3260.2
URLs (if applicable) :   https://output.jsbin.com/putulim/quiet
(On high DPI, pass --disable-prefer-compositing-to-lcd-text.)

What is the expected result?
Blue box should appear over the green box

What happens instead of that?
Blue box appears under the green box

The compositing overlap test has a bug that fails to detect overlap in this case. The problem is that the green box will use an unclipped bounding box for testing overlap because it's inside a composited scroller. However, the blue box is inside a non-composited scroller so it uses an clipped bounding box. Because overlap testing prevents comparing clipped to uncliped boxes, we miss this case.

This was discovered while looking into  issue 777672  but is unrelated to root-layer-scrolling.
 

Comment 1 by bokan@chromium.org, Nov 10 2017

Labels: -OS-Linux
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/51eeec6a3fcdb833e81fa8cc73165613a997009d

commit 51eeec6a3fcdb833e81fa8cc73165613a997009d
Author: David Bokan <bokan@chromium.org>
Date: Mon Nov 20 16:09:55 2017

[root-layer-scrolling] Fix compositing overlap test

When RLS is turned on, children of the root layer now have a composited
scrolling ancestor. This causes them to use their unclipped bounding
rects to test overlap. It turns out overlap testing inside composited
scrollers is somewhat buggy (https://crbug.com/783532).

In order to prevent regressing existing behavior, this CL makes an
exception for children whose composited scrolling ancestor is the root
layer. In that that case, we use the clipped rects. This is necessary so
that overlap testing is performed against other clipped rects (see
comments in OverlapMap::Add for how clipped vs unclipped comparisons
work).

However, since the root layer is now a scrolling layer, this would
break overlap testing for boxes that are offscreen. This CL
additionally makes overlap test-related clipping ignore the root layer
so that the clipped_absolute_bounding_box for the root layer is actually
unclipped, as pre-RLS. The newly added test covers this case.

Bug: 783532

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_root_layer_scrolls;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I5e302f3f29775d829b94593e8053025c5da0f980
Reviewed-on: https://chromium-review.googlesource.com/742506
Reviewed-by: Steve Kobes <skobes@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517835}
[modify] https://crrev.com/51eeec6a3fcdb833e81fa8cc73165613a997009d/third_party/WebKit/LayoutTests/FlagExpectations/root-layer-scrolls
[add] https://crrev.com/51eeec6a3fcdb833e81fa8cc73165613a997009d/third_party/WebKit/LayoutTests/compositing/overflow/surface-over-composited-offscreen-expected.html
[add] https://crrev.com/51eeec6a3fcdb833e81fa8cc73165613a997009d/third_party/WebKit/LayoutTests/compositing/overflow/surface-over-composited-offscreen.html
[modify] https://crrev.com/51eeec6a3fcdb833e81fa8cc73165613a997009d/third_party/WebKit/Source/core/paint/ClipRectsCache.h
[modify] https://crrev.com/51eeec6a3fcdb833e81fa8cc73165613a997009d/third_party/WebKit/Source/core/paint/PaintLayer.cpp
[modify] https://crrev.com/51eeec6a3fcdb833e81fa8cc73165613a997009d/third_party/WebKit/Source/core/paint/PaintLayerClipper.h
[modify] https://crrev.com/51eeec6a3fcdb833e81fa8cc73165613a997009d/third_party/WebKit/Source/core/paint/compositing/CompositingInputsUpdater.cpp
[modify] https://crrev.com/51eeec6a3fcdb833e81fa8cc73165613a997009d/third_party/WebKit/Source/core/paint/compositing/CompositingRequirementsUpdater.cpp

Comment 3 by bokan@chromium.org, Nov 20 2017

Drats, linked the wrong bug on the above patch. It fixes  issue 777672  but this bug is more general. I'll manually paste the above in there.

Sign in to add a comment