New issue
Advanced search Search tips

Issue 870728 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 18
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[BGPT] composited animations which don't draw content may be needed for overlap testing

Project Member Reported by flackr@chromium.org, Aug 3

Issue description

Chrome Version: 70.0.3512.0
OS: Linux

What steps will reproduce the problem?
(1) Load the attached html with --enable-blink-gen-property-trees
(2) Try to scroll the scroller

What is the expected result?
You should not be able to scroll the scroller or drag the scrollbar because the element below it is animated to be on top of it.

What happens instead?
You can freely scroll, but the scrollbar cannot be dragged (assuming this does a main thread hit test?).

I think what happens is that we don't create a composited layer for the element because it doesn't paint contents which means it doesn't produce a paint artifact, and as a result we don't run the composited animation detecting that it should receive events over the scroller.

This will also be an issue for OOPIFs.

Please use labels and text to provide additional information.
 
test-animated-overlap.html
466 bytes View Download
Peter was looking at a similar issue yesterday. I think we need to remove optimizations that skip compositing/paint if there's an animation. For example, we used to have an optimization that would skip paint for opacity: 0 subtrees but we need to continue to paint if there's a potentially composited animation that would make the opacity non-zero.
Yeah I was wondering about this in a more general context. I think for now, not skipping any compositor animated element makes sense but perhaps in the long term we can use the range of the keyframes to check whether we need them.
Cc: flackr@chromium.org
Status: Assigned (was: Untriaged)
What is the expected next step for this bug?
1. Make a hit test case out of my demo page.
2. Make BGPT pass it by creating layers for transform animation elements.
[Optional] 3. Only do so if the animation would affect hit testing (e.g. check for movement, or even specifically check for movement over other elements which are hit tested).
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 18

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

commit c1637af74a1ab9edb3d254f90b24eb46bc207e96
Author: Philip Rogers <pdr@chromium.org>
Date: Sat Aug 18 00:54:32 2018

[BlinkGenPropertyTrees] Collect non-drawing layers for hit testing

Some non-drawing layers need to be collected for hit testing. For
example, if there's a composited animation on an empty div, we still
need to create a composited layer for the purposes of hit testing.

Bug:  870728 

Cq-Include-Trybots: 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: Ibbf8bcd60242b901db9b35821450111d4a7c5d63
Reviewed-on: https://chromium-review.googlesource.com/1180464
Reviewed-by: Tien-Ren Chen <trchen@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584267}
[add] https://crrev.com/c1637af74a1ab9edb3d254f90b24eb46bc207e96/third_party/WebKit/LayoutTests/virtual/threaded/animations/invisible-composited-animations-prevent-scroll-expected.html
[add] https://crrev.com/c1637af74a1ab9edb3d254f90b24eb46bc207e96/third_party/WebKit/LayoutTests/virtual/threaded/animations/invisible-composited-animations-prevent-scroll.html
[modify] https://crrev.com/c1637af74a1ab9edb3d254f90b24eb46bc207e96/third_party/blink/renderer/core/frame/local_frame_view.cc
[modify] https://crrev.com/c1637af74a1ab9edb3d254f90b24eb46bc207e96/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping_test.cc
[modify] https://crrev.com/c1637af74a1ab9edb3d254f90b24eb46bc207e96/third_party/blink/renderer/platform/graphics/graphics_layer.h

Status: Fixed (was: Assigned)

Sign in to add a comment