New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 792311 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[SPv1/SPv175] Composited clip-path applies in the wrong space.

Project Member Reported by trchen@chromium.org, Dec 6 2017

Issue description

In additional to child_clipping_mask_layer_, CLM also applies clip-path to ancestor_clipping_mask_layer_. This is wrong because ancestor_clipping_mask_layer_ is in the space of pre-transform box, while clip-path should be applied in the transformed space.

For example (http://jsbin.com/fitexecacu/):
<div style="width:100px; height:100px; overflow:hidden; border-radius:1px;">
  <div style="width:100px; height:100px; clip-path:circle(); background:red; transform:translate3d(30px, 30px, 0);"></div>
</div>

The clip-path is applied (wrongfully) twice, both in the pre-transform space and post-transform space.

Expectation (http://jsbin.com/mitixaxilo/):
<div style="width:100px; height:100px; overflow:hidden; border-radius:1px;">
  <div style="position:relative; left:30px; top:30px; width:100px; height:100px; clip-path:circle(); background:red;"></div>
</div>

Similar to  crbug.com/792280 , clip-path really, really, should only be applied by the mask layer.
 
Status: Assigned (was: Untriaged)
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 29 2018

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

commit f89ae106e06d15200d783cb6950961ba999edebe
Author: Tien-Ren Chen <trchen@chromium.org>
Date: Mon Jan 29 23:19:28 2018

[Blink/SPv1] Move composited clip-path to share layer with masks

Previously composited clip-path are applied multiple times, and can be
applied in the wrong order. This CL makes it so that composited
clip-path is always and only painted in the mask layer.

BUG= 792280 , 792311 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I4544c1709e98ca70996655e2e4bbbdc8fc7bd78a
Reviewed-on: https://chromium-review.googlesource.com/858299
Commit-Queue: Tien-Ren Chen <trchen@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532650}
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v175
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/LayoutTests/compositing/images/direct-image-clip-path-expected.png
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/LayoutTests/compositing/images/direct-image-dynamic-clip-path-expected.png
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/LayoutTests/compositing/masks/mask-layer-size-expected.txt
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/LayoutTests/compositing/overflow/accelerated-scrolling-with-clip-path-expected.png
[add] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/LayoutTests/paint/clipath/clip-path-with-background-and-box-behind-expected.png
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/LayoutTests/paint/invalidation/clip/clip-path-constant-repaint-expected.txt
[add] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/compositing/masks/mask-layer-size-expected.txt
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/multiple-masks-expected.png
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/simple-composited-mask-expected.png
[delete] https://crrev.com/e34e01b1b0987e418bc22e3ef1cf2e4ecaead264/third_party/WebKit/LayoutTests/platform/mac/paint/clipath/clip-path-with-background-and-box-behind-expected.png
[delete] https://crrev.com/e34e01b1b0987e418bc22e3ef1cf2e4ecaead264/third_party/WebKit/LayoutTests/platform/win/paint/clipath/clip-path-with-background-and-box-behind-expected.png
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/BUILD.gn
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/layout/LayoutBox.cpp
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/layout/LayoutInline.cpp
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/layout/LayoutObject.cpp
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/layout/LayoutObject.h
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/layout/LayoutTableRow.h
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/paint/BUILD.gn
[add] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/paint/CSSMaskPainter.cpp
[add] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/paint/CSSMaskPainter.h
[add] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/paint/CSSMaskPainterTest.cpp
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/paint/PaintLayer.cpp
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/paint/PaintLayerPaintingInfo.h
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/paint/compositing/CompositedLayerMapping.cpp
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/paint/compositing/CompositedLayerMapping.h
[modify] https://crrev.com/f89ae106e06d15200d783cb6950961ba999edebe/third_party/WebKit/Source/core/paint/compositing/CompositingReasonFinder.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment