Applying a translateZ(0) transform to any element breaks border-radius clipping.
Reported by
jason.gi...@omnis.net,
Sep 1 2017
|
|||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 Steps to reproduce the problem: 1. Create a container element with a border-radius applied, and overflow = "hidden", and position = "absolute". 2. Create a child element of this container which fills the container. 3. Apply a "translateZ(0)" transform to an element BEFORE the container in the DOM. See https://codepen.io/jasongiss/pen/YxBpEd for test case. What is the expected behavior? The child element should be clipped by the rounded corners. What went wrong? The child element renders into the rounded corners. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 60.0.3112.113 Channel: stable OS Version: OS X 10.12.6 Flash Version: Does not occur in Safari or Firefox on macOS. My use case is that I use iscroll (https://github.com/cubiq/iscroll) and this applies such a "translateZ(0)" transform to elements to which it is attached.
,
Sep 1 2017
Perhaps this has to to with not being about to apply border-radius clipping to squashed layers. Perhaps we should add a condition to disable squashing for such situations.
,
Sep 5 2017
The problem only arises when the transform is inline, so it's another situation where we fail to apply some check in the inlined transform special case.
,
Sep 26 2017
Any update on this bug? Need help?
,
Sep 27 2017
Just no time. Someone else could pick it up for sure.
,
Oct 3 2017
So removing the optimization for inline transform compositing update fixes the bug, as one would expect. Detecting the condition that causes this bug, siblings with border radius, might be tricky though not impossible. I'll investigate.
,
Oct 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8ff2371257ac4f24d77da4a62569840a53c49b47 commit 8ff2371257ac4f24d77da4a62569840a53c49b47 Author: Stephen Chenney <schenney@chromium.org> Date: Thu Oct 12 13:11:52 2017 Prevent squashing of border-radius layers Inline transforms cause overlap to be assumed, which in turn results in sibling layers being squashed. But when that is done, the border radius mask needed for descendants of the siblings is not applied and border radius is missing. This patch prevents squashing of layers with border radius. R=chrishtr@chromium.org BUG= 761298 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: Idc321a376634b0fe0b2f3cda92415d014904fda7 Reviewed-on: https://chromium-review.googlesource.com/699170 Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Commit-Queue: Stephen Chenney <schenney@chromium.org> Cr-Commit-Position: refs/heads/master@{#508329} [modify] https://crrev.com/8ff2371257ac4f24d77da4a62569840a53c49b47/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 [add] https://crrev.com/8ff2371257ac4f24d77da4a62569840a53c49b47/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-prevents-squashing-with-inline-transform-expected.txt [add] https://crrev.com/8ff2371257ac4f24d77da4a62569840a53c49b47/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-prevents-squashing-with-inline-transform.html [add] https://crrev.com/8ff2371257ac4f24d77da4a62569840a53c49b47/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/border-radius-prevents-squashing-with-inline-transform-expected.png [add] https://crrev.com/8ff2371257ac4f24d77da4a62569840a53c49b47/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-prevents-squashing-with-inline-transform-expected.png [add] https://crrev.com/8ff2371257ac4f24d77da4a62569840a53c49b47/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/border-radius-prevents-squashing-with-inline-transform-expected.png [add] https://crrev.com/8ff2371257ac4f24d77da4a62569840a53c49b47/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-prevents-squashing-with-inline-transform-expected.png [modify] https://crrev.com/8ff2371257ac4f24d77da4a62569840a53c49b47/third_party/WebKit/Source/core/paint/compositing/CompositedLayerMappingTest.cpp [modify] https://crrev.com/8ff2371257ac4f24d77da4a62569840a53c49b47/third_party/WebKit/Source/core/paint/compositing/CompositingLayerAssigner.cpp [modify] https://crrev.com/8ff2371257ac4f24d77da4a62569840a53c49b47/third_party/WebKit/Source/platform/graphics/SquashingDisallowedReasons.cpp [modify] https://crrev.com/8ff2371257ac4f24d77da4a62569840a53c49b47/third_party/WebKit/Source/platform/graphics/SquashingDisallowedReasons.h
,
Oct 12 2017
,
Oct 12 2017
Issue 773628 has been merged into this issue.
,
Oct 12 2017
This bug requires manual review: We are only 4 days from stable. Please contact the milestone owner if you have questions. Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 12 2017
Thanks for the fix - can you please explain why this is critical for M62 and what are the implications if we wait until M63? And we should also wait until this has baked in canary.
,
Oct 13 2017
Confirmed with schenney@ offline and it's okay to punt this to M63.
,
Oct 18 2017
,
Nov 15 2017
,
Nov 15 2017
,
Nov 16 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ad129f43d6ef7b47ef3845bfc43636bbcc2b5b92 commit ad129f43d6ef7b47ef3845bfc43636bbcc2b5b92 Author: Stephen Chenney <schenney@chromium.org> Date: Thu Nov 16 01:58:24 2017 Revert "Prevent squashing of border-radius layers" This reverts commit 8ff2371257ac4f24d77da4a62569840a53c49b47. Reason for revert: Bad for performance and not correct Original change's description: > Prevent squashing of border-radius layers > > Inline transforms cause overlap to be assumed, which in turn > results in sibling layers being squashed. But when that is > done, the border radius mask needed for descendants of the > siblings is not applied and border radius is missing. > > This patch prevents squashing of layers with border radius. > > R=chrishtr@chromium.org > BUG= 761298 > > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 > Change-Id: Idc321a376634b0fe0b2f3cda92415d014904fda7 > Reviewed-on: https://chromium-review.googlesource.com/699170 > Reviewed-by: Chris Harrelson <chrishtr@chromium.org> > Commit-Queue: Stephen Chenney <schenney@chromium.org> > Cr-Commit-Position: refs/heads/master@{#508329} TBR=chrishtr@chromium.org,schenney@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 761298 Change-Id: Ia46c645c2baa74e5b3d19634b4739b97bab0812b Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Reviewed-on: https://chromium-review.googlesource.com/772758 Commit-Queue: Stephen Chenney <schenney@chromium.org> Reviewed-by: Stephen Chenney <schenney@chromium.org> Cr-Commit-Position: refs/heads/master@{#516951} [modify] https://crrev.com/ad129f43d6ef7b47ef3845bfc43636bbcc2b5b92/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG [modify] https://crrev.com/ad129f43d6ef7b47ef3845bfc43636bbcc2b5b92/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 [modify] https://crrev.com/ad129f43d6ef7b47ef3845bfc43636bbcc2b5b92/third_party/WebKit/LayoutTests/TestExpectations [delete] https://crrev.com/2fabfffa6a748c6eca7125ea5cf656b43536c262/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-prevents-squashing-with-inline-transform-expected.txt [delete] https://crrev.com/2fabfffa6a748c6eca7125ea5cf656b43536c262/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-prevents-squashing-with-inline-transform.html [delete] https://crrev.com/2fabfffa6a748c6eca7125ea5cf656b43536c262/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/border-radius-prevents-squashing-with-inline-transform-expected.png [delete] https://crrev.com/2fabfffa6a748c6eca7125ea5cf656b43536c262/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-prevents-squashing-with-inline-transform-expected.png [delete] https://crrev.com/2fabfffa6a748c6eca7125ea5cf656b43536c262/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/border-radius-prevents-squashing-with-inline-transform-expected.png [delete] https://crrev.com/2fabfffa6a748c6eca7125ea5cf656b43536c262/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-prevents-squashing-with-inline-transform-expected.png [modify] https://crrev.com/ad129f43d6ef7b47ef3845bfc43636bbcc2b5b92/third_party/WebKit/Source/core/paint/compositing/CompositedLayerMappingTest.cpp [modify] https://crrev.com/ad129f43d6ef7b47ef3845bfc43636bbcc2b5b92/third_party/WebKit/Source/core/paint/compositing/CompositingLayerAssigner.cpp [modify] https://crrev.com/ad129f43d6ef7b47ef3845bfc43636bbcc2b5b92/third_party/WebKit/Source/platform/graphics/SquashingDisallowedReasons.cpp [modify] https://crrev.com/ad129f43d6ef7b47ef3845bfc43636bbcc2b5b92/third_party/WebKit/Source/platform/graphics/SquashingDisallowedReasons.h
,
Nov 16 2017
M-63 Merge request for the revert of this patch, in comment #16, for performance reasons. We seriously regressed painting performance on some major sites. See https://bugs.chromium.org/p/chromium/issues/detail?id=782353 Note the earlier merge request for M-62, which is not relevant at this time.
,
Nov 16 2017
Thank you schenney@. Before we approve merge to M63 for revert listed at #16, could you pls confirm the revert is well baked/verified in canary, having automation tests coverage and safe to merge?
,
Nov 16 2017
schenney@ to update bug with canary result tomorrow afternoon.
,
Nov 17 2017
This bug requires manual review: Reverts referenced in bugdroid comments after merge request. Please contact the milestone owner if you have questions. Owners: cmasso@(Android), cmasso@(iOS), gkihumba@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 17 2017
The NextAction date has arrived: 2017-11-17
,
Nov 17 2017
How is the change looking so far in canary?
,
Nov 17 2017
There have been no reports of issues with Canary, and this just removes added code with no impact beyond the code itself. So I'm very confident of the merge. The perf regression really is unacceptable without the merge. I'll do the work Monday morning East Coast time.
,
Nov 17 2017
Approving merge to M63 based on comment #23. schenney@ will merge on Monday morning if canary result continue to look good.
,
Nov 20 2017
The NextAction date has arrived: 2017-11-20
,
Nov 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a4c6f49cbbb3210910b787b13703b8ceb9ac03ad commit a4c6f49cbbb3210910b787b13703b8ceb9ac03ad Author: Stephen Chenney <schenney@chromium.org> Date: Mon Nov 20 15:17:28 2017 Revert "Prevent squashing of border-radius layers" This reverts commit 8ff2371257ac4f24d77da4a62569840a53c49b47. Reason for revert: Bad for performance and not correct M-63 revert Original change's description: > Prevent squashing of border-radius layers > > Inline transforms cause overlap to be assumed, which in turn > results in sibling layers being squashed. But when that is > done, the border radius mask needed for descendants of the > siblings is not applied and border radius is missing. > > This patch prevents squashing of layers with border radius. > > R=chrishtr@chromium.org > BUG= 761298 > > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 > Change-Id: Idc321a376634b0fe0b2f3cda92415d014904fda7 > Reviewed-on: https://chromium-review.googlesource.com/699170 > Reviewed-by: Chris Harrelson <chrishtr@chromium.org> > Commit-Queue: Stephen Chenney <schenney@chromium.org> > Cr-Commit-Position: refs/heads/master@{#508329} TBR=chrishtr@chromium.org, schenney@chromium.org (cherry picked from commit ad129f43d6ef7b47ef3845bfc43636bbcc2b5b92) Bug: 761298 Change-Id: Ia46c645c2baa74e5b3d19634b4739b97bab0812b Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Reviewed-on: https://chromium-review.googlesource.com/772758 Commit-Queue: Stephen Chenney <schenney@chromium.org> Reviewed-by: Stephen Chenney <schenney@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#516951} Reviewed-on: https://chromium-review.googlesource.com/779439 Cr-Commit-Position: refs/branch-heads/3239@{#540} Cr-Branched-From: adb61db19020ed8ecee5e91b1a0ea4c924ae2988-refs/heads/master@{#508578} [modify] https://crrev.com/a4c6f49cbbb3210910b787b13703b8ceb9ac03ad/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG [modify] https://crrev.com/a4c6f49cbbb3210910b787b13703b8ceb9ac03ad/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 [modify] https://crrev.com/a4c6f49cbbb3210910b787b13703b8ceb9ac03ad/third_party/WebKit/LayoutTests/TestExpectations [delete] https://crrev.com/f0688e1096e73f17f894b5d25c563f340af87cb8/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-prevents-squashing-with-inline-transform-expected.txt [delete] https://crrev.com/f0688e1096e73f17f894b5d25c563f340af87cb8/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-prevents-squashing-with-inline-transform.html [delete] https://crrev.com/f0688e1096e73f17f894b5d25c563f340af87cb8/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/border-radius-prevents-squashing-with-inline-transform-expected.png [delete] https://crrev.com/f0688e1096e73f17f894b5d25c563f340af87cb8/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-prevents-squashing-with-inline-transform-expected.png [delete] https://crrev.com/f0688e1096e73f17f894b5d25c563f340af87cb8/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/border-radius-prevents-squashing-with-inline-transform-expected.png [delete] https://crrev.com/f0688e1096e73f17f894b5d25c563f340af87cb8/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-prevents-squashing-with-inline-transform-expected.png [modify] https://crrev.com/a4c6f49cbbb3210910b787b13703b8ceb9ac03ad/third_party/WebKit/Source/core/paint/compositing/CompositedLayerMappingTest.cpp [modify] https://crrev.com/a4c6f49cbbb3210910b787b13703b8ceb9ac03ad/third_party/WebKit/Source/core/paint/compositing/CompositingLayerAssigner.cpp [modify] https://crrev.com/a4c6f49cbbb3210910b787b13703b8ceb9ac03ad/third_party/WebKit/Source/platform/graphics/SquashingDisallowedReasons.cpp [modify] https://crrev.com/a4c6f49cbbb3210910b787b13703b8ceb9ac03ad/third_party/WebKit/Source/platform/graphics/SquashingDisallowedReasons.h
,
Dec 4 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a63dd55906d02fcac050c36b289e29d3f7a95453 commit a63dd55906d02fcac050c36b289e29d3f7a95453 Author: Stephen Chenney <schenney@chromium.org> Date: Mon Dec 04 19:22:00 2017 [PE] Apply border-radius clips to squashed layers that need them. When layers are squashed they currently lose their border radius clips. Fix that by using ClipRects instead of IntRects in the sqaushed layer clipping code, and gathering the clips appropriately. Based on https://chromium-review.googlesource.com/c/chromium/src/+/772081 by chrishtr@. R=chrishtr@chromium.org Bug: 761298 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I58a4c8bc785a5cea562a7de52ba24ee1600c9cff Reviewed-on: https://chromium-review.googlesource.com/797337 Commit-Queue: Stephen Chenney <schenney@chromium.org> Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/master@{#521403} [modify] https://crrev.com/a63dd55906d02fcac050c36b289e29d3f7a95453/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 [add] https://crrev.com/a63dd55906d02fcac050c36b289e29d3f7a95453/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-squashed-layers-expected.png [add] https://crrev.com/a63dd55906d02fcac050c36b289e29d3f7a95453/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-squashed-layers-expected.txt [add] https://crrev.com/a63dd55906d02fcac050c36b289e29d3f7a95453/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-squashed-layers.html [modify] https://crrev.com/a63dd55906d02fcac050c36b289e29d3f7a95453/third_party/WebKit/Source/core/paint/compositing/CompositedLayerMapping.cpp [modify] https://crrev.com/a63dd55906d02fcac050c36b289e29d3f7a95453/third_party/WebKit/Source/core/paint/compositing/CompositedLayerMapping.h
,
Jan 24 2018
Fixed in M-65. |
|||||||||||||
►
Sign in to add a comment |
|||||||||||||
Comment 1 by phistuck@chromium.org
, Sep 1 2017Labels: OS-Windows
Owner: schenney@chromium.org
Status: Assigned (was: Unconfirmed)