New issue
Advanced search Search tips

Issue 672561 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on:
issue 157218



Sign in to add a comment

Nested border-radius clips do not apply to composited children

Project Member Reported by schenney@chromium.org, Dec 8 2016

Issue description

Broken now, and still broken after https://codereview.chromium.org/2194273002/ lands. If a composited child should be clipped by more than one ancestor, only the nearest ancestor is applied.

See attached test case, and play with which layers get composited to see the results.
 
nested-border-radius-with-composited-child.html
589 bytes View Download
Summary: Nested border-radius clips do not apply to composited children (was: Nest border-radius clips do not apply to composited children)
Labels: Hotlist-Interop
Works using Internet Explorer 11 and Firefox 50 on Windows 7. Interoperability issue.
Stephen, any idea how hard this is to fix?
Most likely not too hard, but I'm not sure. I would need to look into it. I think the walk up to find the clips stops at the first ancestor, and could go further.

Comment 5 by sunxd@chromium.org, May 18 2017

Do you think this should block scrolling border-radius on impl?
If it isn't too hard to fix, I would like to do them both for M60. We have two weeks, that seems feasible.
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 12 2017

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

commit e4208d105f75a14f9719ae35c19d7104f08a5f0b
Author: schenney <schenney@chromium.org>
Date: Mon Jun 12 23:18:12 2017

Fix nested border radius with composited child.

Walk up the layer tree from a layer that needs an
AncestorChildClippingMaskLayer to find all border radius clips to
apply. Several auxiliary changes were required. The code in CLM for
determining if a mask layer is needed has also been reworked to
test against all clips.

Make LayerClipRecorder::CollectRoundedRectClips a public static member
so that CLM can use it to determine if the mask layer is required. Also
expand the conditions in which LayerClipRecorder uses the method to
catch all cases where masks need rounded clips.

Make several PaintLayer methods const, because they can be and we need
them so.

New tests for various cases of border radius where not just the parent
layer needs checking, or where we need to skip over the parent layer and
still check.

R=chrishtr@chromium.org
BUG= 672561 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2923683002
Cr-Commit-Position: refs/heads/master@{#478814}

[modify] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
[add] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-grandparent-composited-grandchild-expected.png
[add] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-grandparent-composited-grandchild-expected.txt
[add] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-grandparent-composited-grandchild.html
[add] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-parent-composited-grandchild-expected.png
[add] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-parent-composited-grandchild-expected.txt
[add] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-parent-composited-grandchild.html
[add] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-two-ancestors-composited-grandchild-expected.png
[add] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-two-ancestors-composited-grandchild-expected.txt
[add] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-two-ancestors-composited-grandchild.html
[modify] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/LayoutTests/fast/borders/overflow-hidden-border-radius-force-backing-store-expected.txt
[modify] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
[modify] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h
[modify] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp
[modify] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp
[modify] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/Source/core/paint/LayerClipRecorder.h
[modify] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
[modify] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/Source/core/paint/PaintLayer.h
[modify] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
[modify] https://crrev.com/e4208d105f75a14f9719ae35c19d7104f08a5f0b/third_party/WebKit/Source/core/paint/PaintLayerPaintingInfo.h

Comment 8 by sunxd@chromium.org, Jun 13 2017

Great job! Thanks!
Status: Fixed (was: Assigned)

Sign in to add a comment