Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Issue 2194273002: Fix border radius on composited children. (Closed)

Created:
4 years, 4 months ago by Stephen Chennney
Modified:
4 years ago
Reviewers:
chrishtr
CC:
ajuma+watch_chromium.org, blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, eae+blinkwatch, f(malita), jbroman, jchaffraix+rendering, Justin Novosad, leviw+renderwatch, pdr+graphicswatchlist_chromium.org, pdr+renderingwatchlist_chromium.org, rwlbuis, slimming-paint-reviews_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix border radius on composited children. When a child of an overflow: hidden object is composited (and the ancestor is not) we were failing to apply the border-radius clip. This patch fixes the problem by adding a new masking layer for this situation, and modifying the layers used for painting to set the clip appropriately. New tests are added to verify the behavior for border styles, and existing layout tests cover the bug (and fail before this patch). Unit testing is used for verifying update behavior. There are remaining issues tracked in TODOs with corresponding bugs. BUG=157218 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/0cfffd46dfaa1ee93d3d667f82b2fb3721078b34 Cr-Commit-Position: refs/heads/master@{#437948}

Patch Set 1 #

Patch Set 2 : Remove debug #

Patch Set 3 : Super hacky patch #

Total comments: 4

Patch Set 4 : Improve clip recording code #

Total comments: 10

Patch Set 5 : Cleanup implementation #

Patch Set 6 : Closer. Not to land. #

Patch Set 7 : Now working on basic test cases #

Total comments: 2

Patch Set 8 : Remove extraneous change. #

Patch Set 9 : Now with tests, fixes and rebased #

Patch Set 10 : Switch to using the layer's offsetFromLayoutObject #

Total comments: 16

Patch Set 11 : Revised method based on PaintLayer switching #

Total comments: 2

Patch Set 12 : Address review comments and revert extraneous changes #

Patch Set 13 : Test results and bug TODOs #

Patch Set 14 : SPv2 Exception and Fix assertion on non-drawing elements #

Patch Set 15 : Rebased #

Total comments: 2

Patch Set 16 : Address review comments. #

Total comments: 2

Patch Set 17 : Update the comment on why we say an empty div can paint #

Unified diffs Side-by-side diffs Delta from patch set Stats (+400 lines, -82 lines) Patch
M third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/compositing/overflow/border-radius-styles-with-composited-child.html View 1 2 3 4 5 6 7 8 1 chunk +41 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/compositing/overflow/border-radius-styles-with-composited-child-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/compositing/overflow/border-radius-styles-with-composited-child-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +17 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/compositing/overflow/empty-composited-child-of-border-radius-ancestor.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +24 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/compositing/overflow/empty-composited-child-of-border-radius-ancestor-expected.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +14 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/borders/border-radius-with-composited-child.html View 1 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-with-composited-child-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-with-composited-child-expected.txt View 1 2 3 4 5 6 7 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-composited-child-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-composited-child-expected.txt View 1 2 3 4 5 6 7 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/fast/clip/overflow-border-radius-composited-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-with-composited-child-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-with-composited-child-expected.txt View 1 2 3 4 5 6 7 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/fast/clip/overflow-border-radius-composited-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 Binary file 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +28 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 chunks +83 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp View 1 2 3 4 5 6 7 8 1 chunk +81 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/FilterPainter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/LayerClipRecorder.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +16 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerClipper.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +50 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerPaintingInfo.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/CompositingReasons.h View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/CompositingReasons.cpp View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GraphicsLayerClient.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 75 (37 generated)
Stephen Chennney
This is a super hacky patch that works on the test cases but will definitely ...
4 years, 3 months ago (2016-09-20 18:06:44 UTC) #2
chrishtr
https://codereview.chromium.org/2194273002/diff/40001/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp File third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp (right): https://codereview.chromium.org/2194273002/diff/40001/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp#newcode75 third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp:75: // TODO(schenney): Not right, but hack to get something ...
4 years, 2 months ago (2016-10-21 23:15:08 UTC) #4
chrishtr
https://codereview.chromium.org/2194273002/diff/40001/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp File third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp (right): https://codereview.chromium.org/2194273002/diff/40001/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp#newcode217 third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp:217: if (layoutObject.styleRef().hasBorderRadius() || addAncestorClips) What does this one achieve? ...
4 years, 2 months ago (2016-10-21 23:16:20 UTC) #5
Stephen Chennney
Just responding to chrishtr's comments now that I am back looking at this. https://codereview.chromium.org/2194273002/diff/40001/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp File ...
4 years, 1 month ago (2016-10-24 20:15:27 UTC) #6
Stephen Chennney
New patch moving closer to a final solution. I added lots of commentary. https://codereview.chromium.org/2194273002/diff/60001/third_party/WebKit/LayoutTests/fast/borders/border-radius-with-composited-child.html File ...
4 years, 1 month ago (2016-11-08 21:42:52 UTC) #7
chrishtr
I wonder if a different approach would work better. What if m_ancestorClippingMaskLayer was sized and ...
4 years, 1 month ago (2016-11-08 23:52:22 UTC) #8
Stephen Chennney
On 2016/11/08 23:52:22, chrishtr wrote: > I wonder if a different approach would work better. ...
4 years, 1 month ago (2016-11-14 18:16:01 UTC) #9
chrishtr
On 2016/11/14 at 18:16:01, schenney wrote: > On 2016/11/08 23:52:22, chrishtr wrote: > > I ...
4 years, 1 month ago (2016-11-14 18:51:10 UTC) #10
Stephen Chennney
In this version the only issue is over-clipping on the top-left in the test cases. ...
4 years, 1 month ago (2016-11-15 14:31:55 UTC) #11
Stephen Chennney
This latest patch works on the test cases I have, so that's good. But it ...
4 years, 1 month ago (2016-11-16 17:28:46 UTC) #12
chrishtr
https://codereview.chromium.org/2194273002/diff/120001/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp File third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp (right): https://codereview.chromium.org/2194273002/diff/120001/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp#newcode323 third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp:323: // CSS clip (different than clipping due to overflow) ...
4 years, 1 month ago (2016-11-16 23:56:32 UTC) #13
Stephen Chennney
https://codereview.chromium.org/2194273002/diff/120001/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp File third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp (right): https://codereview.chromium.org/2194273002/diff/120001/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp#newcode323 third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp:323: // CSS clip (different than clipping due to overflow) ...
4 years, 1 month ago (2016-11-17 18:05:48 UTC) #14
chrishtr
Ok. Is the patch ready for review?
4 years, 1 month ago (2016-11-17 18:09:58 UTC) #15
Stephen Chennney
On 2016/11/17 18:09:58, chrishtr wrote: > Ok. Is the patch ready for review? Nope. Have ...
4 years, 1 month ago (2016-11-17 19:24:44 UTC) #16
Stephen Chennney
One more improvement to look at before review. Need to try to simplify the coordinate ...
4 years ago (2016-11-30 19:12:43 UTC) #18
Stephen Chennney
This latest version is ready for review. I need new test results but otherwise am ...
4 years ago (2016-12-01 21:10:32 UTC) #23
chrishtr
https://codereview.chromium.org/2194273002/diff/180001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp File third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp (right): https://codereview.chromium.org/2194273002/diff/180001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp#newcode501 third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp:501: if (clippingContainer->enclosingLayer()->hasRootScrollerAsDescendant()) This looks identical to 495-496. https://codereview.chromium.org/2194273002/diff/180001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp#newcode1727 third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp:1727: ...
4 years ago (2016-12-02 19:21:48 UTC) #24
Stephen Chennney
The code in PaintLayerPainter and the clipper code is up for review to get early ...
4 years ago (2016-12-06 22:07:35 UTC) #27
chrishtr
Code looks good now. What is the latest status on the failing tests? Seems like ...
4 years ago (2016-12-07 19:16:24 UTC) #30
Stephen Chennney
On 2016/12/07 19:16:24, chrishtr wrote: > Code looks good now. > > What is the ...
4 years ago (2016-12-07 19:33:11 UTC) #31
Stephen Chennney
This patch probably doesn't need review. It's basically fixing all the smaller issues. I'm waiting ...
4 years ago (2016-12-07 21:39:38 UTC) #34
Stephen Chennney
Nested border radius element with a composited child don't work (I think I can fix ...
4 years ago (2016-12-07 22:06:26 UTC) #35
Stephen Chennney
On 2016/12/07 22:06:26, Stephen Chennney wrote: > Nested border radius element with a composited child ...
4 years ago (2016-12-08 15:33:12 UTC) #38
chrishtr
On 2016/12/08 at 15:33:12, schenney wrote: > On 2016/12/07 22:06:26, Stephen Chennney wrote: > > ...
4 years ago (2016-12-08 17:49:15 UTC) #39
Stephen Chennney
On 2016/12/08 17:49:15, chrishtr wrote: > On 2016/12/08 at 15:33:12, schenney wrote: > > On ...
4 years ago (2016-12-08 19:46:36 UTC) #42
chrishtr
On 2016/12/08 at 19:46:36, schenney wrote: > On 2016/12/08 17:49:15, chrishtr wrote: > > On ...
4 years ago (2016-12-08 21:01:59 UTC) #45
Stephen Chennney
The win perf tests are crashes in ~DrawingRecorder, for some reason. Incorrect cull rect is ...
4 years ago (2016-12-08 21:13:02 UTC) #46
Stephen Chennney
Finally, hopefully, ready to go.
4 years ago (2016-12-09 21:31:00 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2194273002/280001
4 years ago (2016-12-09 21:31:24 UTC) #53
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
4 years ago (2016-12-09 21:31:27 UTC) #55
chrishtr
https://codereview.chromium.org/2194273002/diff/280001/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp File third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp (right): https://codereview.chromium.org/2194273002/diff/280001/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp#newcode93 third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp:93: m_displayItemType != I thought about this and tried out ...
4 years ago (2016-12-09 23:09:35 UTC) #58
Stephen Chennney
The end is in sight! https://codereview.chromium.org/2194273002/diff/280001/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp File third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp (right): https://codereview.chromium.org/2194273002/diff/280001/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp#newcode93 third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp:93: m_displayItemType != On 2016/12/09 ...
4 years ago (2016-12-12 19:18:03 UTC) #62
chrishtr
lgtm https://codereview.chromium.org/2194273002/diff/300001/third_party/WebKit/Source/core/layout/LayoutBox.cpp File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/2194273002/diff/300001/third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode2261 third_party/WebKit/Source/core/layout/LayoutBox.cpp:2261: // must have some effect. s/can/must/. Also mention ...
4 years ago (2016-12-12 19:41:46 UTC) #65
Stephen Chennney
Thanks for all the hard work and advice on this one. https://codereview.chromium.org/2194273002/diff/300001/third_party/WebKit/Source/core/layout/LayoutBox.cpp File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): ...
4 years ago (2016-12-12 19:49:47 UTC) #68
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2194273002/320001
4 years ago (2016-12-12 19:50:50 UTC) #69
commit-bot: I haz the power
Committed patchset #17 (id:320001)
4 years ago (2016-12-12 23:17:25 UTC) #72
commit-bot: I haz the power
Patchset 17 (id:??) landed as https://crrev.com/0cfffd46dfaa1ee93d3d667f82b2fb3721078b34 Cr-Commit-Position: refs/heads/master@{#437948}
4 years ago (2016-12-12 23:20:31 UTC) #74
Stephen Chennney
4 years ago (2016-12-14 15:43:50 UTC) #75

Powered by Google App Engine
This is Rietveld 408576698