Concave clip-paths not used when clipping GPU-accelerated 3D-transformed HTML elements.
Reported by
amelia.b...@gmail.com,
May 21 2018
|
|||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36 Example URL: https://codepen.io/AmeliaBR/pen/a52df662e1cbb32e6f4fbbf4e646bfcb?editors=1100 Steps to reproduce the problem: 1. Apply a clip-path to a CSS layout box. 2. Animate the clip-path in a way that sometimes includes concave curves. 3. Apply a 3D transformation to the CSS layout box. What is the expected behavior? The clip-path animates from concave to convex shape, regardless of transformations. What went wrong? In Chrome 66 on Windows with GPU available, the 3D transformed div (last panel in the CodePen) is never clipped in a convex shape (it animates from convex curve to straight line, holds the square shape for the rest of the animation, then continues with the convex part of the animation). The clip works fine without the transform, and the clip+transform combination works when applied to an SVG rect (other panels in the CodePen). In Chrome 66 on Mac, the div with the 3D transformation+clip just disappears. Not sure if it's the same problem or different, since it doesn't change based on the animation. Does it occur on multiple sites: N/A Is it a problem with a plugin? N/A Did this work before? Yes 65 Does this work in other browsers? Yes Chrome version: 66.0.3359.181 Channel: stable OS Version: 10.0 Flash Version: (Not sure about the regression details: I have Ana Tudor's word that it used to work before the latest Chrome update, but when I tried to check in CrossBrowserTesting, it works in both 65 and 66 on Windows, which suggests that their VMs aren't doing GPU acceleration.) Possibly related to https://bugs.chromium.org/p/chromium/issues/detail?id=603969, but I don't know what might have changed recently.
,
May 22 2018
Able to reproduce this issue on latest beta 67.0.3396.48 and latest canary 68.0.3437.0 using Windows 10, Mac 10.13.3 and Ubuntu 14.04. Good Build: 67.0.3371.0 Bad Build: 67.0.3372.0 You are probably looking for a change made after 543290 (known good), but no later than 543291 (first known bad). CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/63667eca2a1d86f5de61f29c7c5c6417cc351757..3a3c78a924a686ed0d3f90d765b00cdd78453e11 Reviewed-on: https://chromium-review.googlesource.com/947902 Suspecting same from changelog. @wangxianzhu: Please confirm the bug and help in re-assigning if this is not related to your change. Adding RB-Stable for M-67. Please remove if not applicable.
,
May 22 2018
This bug was reported on M66 Stable version 66.0.3359.181 per comment #0. So this is not M67 regression, correct? Is bisect at #2 correct?
,
May 22 2018
I tried 66.0.3359.181 on Mac and didn't reproduce the bug. Also tried Canary with --disable-blink-features=SlimmingPaintV175 and it was good. So this looks like a SPv175 regression. Still need to investigate why amelia.bellamy.royds@gmail.com observed the bug on M66 on Windows. trchen@ can you take a look?
,
May 22 2018
,
May 22 2018
Thank you wangxianzhu@ for taking a look. M67 Stable promotion is coming VERY soon. Your bug is labelled as Stable ReleaseBlock, pls make sure to land the fix and request a merge into the release branch ASAP. Thank you. Pls note We're planning to cut M67 stable RC this Thursday (05/24) @ 4:00 PM PT. So if this is indeed M67 stable blocker, merge has to happen before then. Thank you.
,
May 22 2018
It's unlikely that we can bake in Canary and merge it in M67 in time. Targeting M-68.
,
May 22 2018
Removing "Target-67" per comment #8. Thank you.
,
May 22 2018
Attaching a reduced test case. Expected: the triangle becomes a square. Actual: the triangle doesn't change. The case works in Firefox. This looks like an invalidaiton issue. I will look into it.
,
May 22 2018
With regards to not being able to reproduce in 66, it seems to be linked to flags or other settings on my normal browser, probably the Experimental Web Platform Features flags. If I try it in a factory-settings version of Chrome stable (66.0.3359.181, 64bit), the clip-path works fine, for both my CodePen and the simpler case in comment #10. But with my usual flags, they are both broken in the same build.
,
May 23 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f222ad1371257fc742880a2fb512619e036e8b7c commit f222ad1371257fc742880a2fb512619e036e8b7c Author: Xianzhu Wang <wangxianzhu@chromium.org> Date: Wed May 23 06:26:56 2018 [PE] ClipPath should clear tight flag of clip rect ClipPath in a ClipPaintPropertyNode may clip off pixels within the clip bounds, so the result clip rect should clear the tight flag. During raster invalidation, we won't compare non-tight clip rects for change of clip but will check the changed flag of the clip nodes to ensure correct raster invalidation. Bug: 845269 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I41e48e3eb15232d6cf88bd8986df5c3d8075d7db Reviewed-on: https://chromium-review.googlesource.com/1069671 Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by: Tien-Ren Chen <trchen@chromium.org> Cr-Commit-Position: refs/heads/master@{#560968} [modify] https://crrev.com/f222ad1371257fc742880a2fb512619e036e8b7c/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 [modify] https://crrev.com/f222ad1371257fc742880a2fb512619e036e8b7c/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/clip-path-resize-expected.txt [modify] https://crrev.com/f222ad1371257fc742880a2fb512619e036e8b7c/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/clip-path-child-changes-expected.txt [modify] https://crrev.com/f222ad1371257fc742880a2fb512619e036e8b7c/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/clip-path-units-changes-expected.txt [modify] https://crrev.com/f222ad1371257fc742880a2fb512619e036e8b7c/third_party/WebKit/LayoutTests/paint/invalidation/clip/clip-path-constant-repaint-expected.txt [add] https://crrev.com/f222ad1371257fc742880a2fb512619e036e8b7c/third_party/WebKit/LayoutTests/paint/invalidation/clip/clip-path-in-mask-layer-expected.html [add] https://crrev.com/f222ad1371257fc742880a2fb512619e036e8b7c/third_party/WebKit/LayoutTests/paint/invalidation/clip/clip-path-in-mask-layer-expected.txt [add] https://crrev.com/f222ad1371257fc742880a2fb512619e036e8b7c/third_party/WebKit/LayoutTests/paint/invalidation/clip/clip-path-in-mask-layer.html [modify] https://crrev.com/f222ad1371257fc742880a2fb512619e036e8b7c/third_party/WebKit/LayoutTests/paint/invalidation/clip/clip-path-resize-expected.txt [modify] https://crrev.com/f222ad1371257fc742880a2fb512619e036e8b7c/third_party/WebKit/LayoutTests/paint/invalidation/svg/clip-path-child-changes-expected.txt [modify] https://crrev.com/f222ad1371257fc742880a2fb512619e036e8b7c/third_party/WebKit/LayoutTests/paint/invalidation/svg/clip-path-units-changes-expected.txt [modify] https://crrev.com/f222ad1371257fc742880a2fb512619e036e8b7c/third_party/WebKit/LayoutTests/paint/invalidation/svg/resource-invalidate-on-target-update-expected.txt [add] https://crrev.com/f222ad1371257fc742880a2fb512619e036e8b7c/third_party/WebKit/LayoutTests/virtual/disable-spv175/paint/invalidation/clip/clip-path-in-mask-layer-expected.txt [modify] https://crrev.com/f222ad1371257fc742880a2fb512619e036e8b7c/third_party/blink/renderer/platform/graphics/paint/geometry_mapper.cc [modify] https://crrev.com/f222ad1371257fc742880a2fb512619e036e8b7c/third_party/blink/renderer/platform/graphics/paint/geometry_mapper_test.cc
,
May 24 2018
Verified the fix in Canary 67.0.3439.0. I'm adding back M-67 because the fix is simple and quite safe to merge. It will be good to prevent the regression from going into stable.
,
May 24 2018
This bug requires manual review: We are only 4 days from stable. Please contact the milestone owner if you have questions. Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
May 24 2018
Approving merge to M67 branch 3396 based on comment #13 and per offline chat with wangxianzhu@, this is fully safe. Pls merge ASAP. Thank you.
,
May 24 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7b5bf390d9de1321999ce99445055d335ef94cc1 commit 7b5bf390d9de1321999ce99445055d335ef94cc1 Author: Xianzhu Wang <wangxianzhu@chromium.org> Date: Thu May 24 17:31:57 2018 [PE] ClipPath should clear tight flag of clip rect ClipPath in a ClipPaintPropertyNode may clip off pixels within the clip bounds, so the result clip rect should clear the tight flag. During raster invalidation, we won't compare non-tight clip rects for change of clip but will check the changed flag of the clip nodes to ensure correct raster invalidation. TBR=wangxianzhu@chromium.org (cherry picked from commit f222ad1371257fc742880a2fb512619e036e8b7c) Bug: 845269 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I41e48e3eb15232d6cf88bd8986df5c3d8075d7db Reviewed-on: https://chromium-review.googlesource.com/1069671 Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by: Tien-Ren Chen <trchen@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#560968} Reviewed-on: https://chromium-review.googlesource.com/1072036 Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/branch-heads/3396@{#691} Cr-Branched-From: 9ef2aa869bc7bc0c089e255d698cca6e47d6b038-refs/heads/master@{#550428} [modify] https://crrev.com/7b5bf390d9de1321999ce99445055d335ef94cc1/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 [modify] https://crrev.com/7b5bf390d9de1321999ce99445055d335ef94cc1/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/clip-path-resize-expected.txt [modify] https://crrev.com/7b5bf390d9de1321999ce99445055d335ef94cc1/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/clip-path-child-changes-expected.txt [modify] https://crrev.com/7b5bf390d9de1321999ce99445055d335ef94cc1/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/clip-path-units-changes-expected.txt [modify] https://crrev.com/7b5bf390d9de1321999ce99445055d335ef94cc1/third_party/WebKit/LayoutTests/paint/invalidation/clip/clip-path-constant-repaint-expected.txt [add] https://crrev.com/7b5bf390d9de1321999ce99445055d335ef94cc1/third_party/WebKit/LayoutTests/paint/invalidation/clip/clip-path-in-mask-layer-expected.html [add] https://crrev.com/7b5bf390d9de1321999ce99445055d335ef94cc1/third_party/WebKit/LayoutTests/paint/invalidation/clip/clip-path-in-mask-layer-expected.txt [add] https://crrev.com/7b5bf390d9de1321999ce99445055d335ef94cc1/third_party/WebKit/LayoutTests/paint/invalidation/clip/clip-path-in-mask-layer.html [modify] https://crrev.com/7b5bf390d9de1321999ce99445055d335ef94cc1/third_party/WebKit/LayoutTests/paint/invalidation/clip/clip-path-resize-expected.txt [modify] https://crrev.com/7b5bf390d9de1321999ce99445055d335ef94cc1/third_party/WebKit/LayoutTests/paint/invalidation/svg/clip-path-child-changes-expected.txt [modify] https://crrev.com/7b5bf390d9de1321999ce99445055d335ef94cc1/third_party/WebKit/LayoutTests/paint/invalidation/svg/clip-path-units-changes-expected.txt [modify] https://crrev.com/7b5bf390d9de1321999ce99445055d335ef94cc1/third_party/WebKit/LayoutTests/paint/invalidation/svg/resource-invalidate-on-target-update-expected.txt [add] https://crrev.com/7b5bf390d9de1321999ce99445055d335ef94cc1/third_party/WebKit/LayoutTests/virtual/disable-spv175/paint/invalidation/clip/clip-path-in-mask-layer-expected.txt [modify] https://crrev.com/7b5bf390d9de1321999ce99445055d335ef94cc1/third_party/blink/renderer/platform/graphics/paint/geometry_mapper.cc [modify] https://crrev.com/7b5bf390d9de1321999ce99445055d335ef94cc1/third_party/blink/renderer/platform/graphics/paint/geometry_mapper_test.cc
,
May 24 2018
|
|||||||||||||
►
Sign in to add a comment |
|||||||||||||
Comment 1 by ajha@chromium.org
, May 22 2018