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

Issue 2439113003: Fix the bug that negative outline-offset is covered up by composited (Closed)

Created:
4 years, 2 months ago by yigu
Modified:
4 years, 1 month ago
Reviewers:
flackr, *chrishtr
CC:
ajuma+watch_chromium.org, blink-layers+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, Stephen Chennney, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix the bug that negative outline-offset is covered up by composited scrolling contents layer. This CL adds a decoration layer, child of the graphics layer, painted on top of other layers. Painting outline in this layer would guarantee its appearance. Currently the decoration layer is used only for this purpose. But in the future more contents will be added into it. BUG=642866 TEST=CompositedLayerMappingTest.DecorationLayerOnlyCreatedInCompositedScrolling; CompositedLayerMappingTest.DecorationLayerCreatedAndDestroyedInCompositedScrolling; third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-negative-offset-translucent-outline.html; third_party/WebKit/LayoutTests/paint/invalidation/composited-overflow-with-negative-offset-outline.html CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/4199d1cead13a646b2cf14ad36ef00e61e9bab83 Cr-Commit-Position: refs/heads/master@{#433205}

Patch Set 1 #

Patch Set 2 : fix outline not painting problem when scrollingcontents is set to false #

Total comments: 8

Patch Set 3 : Add layout test, paint invalidation for decoration layer #

Total comments: 6

Patch Set 4 : Fix failed webkit_unit_tests and contents_browsertests && rebaseline #

Total comments: 4

Patch Set 5 : Update decoration layer existing condition #

Total comments: 14

Patch Set 6 : Draw outline when the decoration layer is not created #

Total comments: 2

Patch Set 7 : Add tests for decoration layer and translucent outline #

Patch Set 8 : Remove irrelevant files miscreated by rebaseline #

Patch Set 9 : Update the ref test #

Patch Set 10 : Use rebaseline-o-matic because rebaseline-cl doesn't work on this #

Total comments: 10

Patch Set 11 : Update the ref test to remove unnecessary components && typo fix #

Total comments: 8

Patch Set 12 : Add unit tests and nit #

Total comments: 2

Patch Set 13 : Update unit tests & fix a TODO #

Total comments: 3

Patch Set 14 : Fix a crash #

Total comments: 1

Patch Set 15 : Rename decorationLayer to decorationOutlineLayer #

Unified diffs Side-by-side diffs Delta from patch set Stats (+408 lines, -60 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/overflow/composited-scrolling-paint-phases-expected.txt View 1 2 3 4 5 6 9 chunks +18 lines, -9 lines 0 comments Download
A third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-negative-offset-translucent-outline.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +22 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-negative-offset-translucent-outline-expected.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +29 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/update-paint-phases-expected.txt View 1 2 3 4 5 6 7 chunks +14 lines, -7 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/composited-overflow-with-negative-offset-outline.html View 1 2 3 4 5 6 7 1 chunk +27 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/composited-overflow-with-negative-offset-outline-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/composited-overflow-with-negative-offset-outline-expected.txt View 1 2 3 4 5 6 7 1 chunk +73 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png View 1 2 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac-mac10.10/compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png View 1 2 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac-mac10.9/compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png View 1 2 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.9/paint/invalidation/composited-overflow-with-negative-offset-outline-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png View 1 2 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/composited-overflow-with-negative-offset-outline-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png View 1 2 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/composited-scrolling-paint-phases-expected.txt View 1 2 3 4 5 6 7 9 chunks +18 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +0 lines, -15 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 12 13 14 5 chunks +16 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 12 chunks +85 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +80 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerPaintingInfo.h View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/CompositingReasons.h View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/CompositingReasons.cpp View 1 2 1 chunk +2 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 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GraphicsLayerClient.h View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 99 (64 generated)
flackr
Overall this looks great. There are a couple extra things that I think you still ...
4 years, 1 month ago (2016-10-24 17:19:30 UTC) #8
flackr
https://codereview.chromium.org/2439113003/diff/20001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp File third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp (right): https://codereview.chromium.org/2439113003/diff/20001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp#newcode1871 third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp:1871: if ((mode & ApplyToDecorationLayer) && mapping->decorationLayer()) I think you ...
4 years, 1 month ago (2016-10-24 20:07:05 UTC) #9
yigu
https://codereview.chromium.org/2439113003/diff/20001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp File third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp (right): https://codereview.chromium.org/2439113003/diff/20001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp#newcode527 third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp:527: if (updateDecorationLayer(layoutObject->style()->hasOutline())) On 2016/10/24 17:19:30, flackr wrote: > I ...
4 years, 1 month ago (2016-10-24 20:31:36 UTC) #10
flackr
This review seems to be getting quite a few patchsets so I'll wait until it ...
4 years, 1 month ago (2016-10-25 19:48:11 UTC) #19
yigu
Thanks Rob! Please see patch 5 for an updated version. I didn't remove the "if ...
4 years, 1 month ago (2016-10-25 20:58:45 UTC) #22
flackr
Can you verify that the rebaselines of scrollbars/border-box-rect-clips-scrollbars-expected.png are correct? It seems like we lost ...
4 years, 1 month ago (2016-10-25 21:26:31 UTC) #23
yigu
Hi Rob, Yesterday we tried m_backgroundLayer->setPaintingPhase(GraphicsLayerPaintBackground | GraphicsLayerPaintDecoration) but it didn't work. The reason is ...
4 years, 1 month ago (2016-10-27 20:21:26 UTC) #28
flackr
https://codereview.chromium.org/2439113003/diff/100001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp File third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp (right): https://codereview.chromium.org/2439113003/diff/100001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp#newcode1481 third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp:1481: updateBottomLayer(m_decorationLayer.get()); What if we don't have a m_decorationLayer? Also, ...
4 years, 1 month ago (2016-10-28 17:40:03 UTC) #31
yigu
Hi Rob, Just added a unit test for the decoration layer and a ref test ...
4 years, 1 month ago (2016-11-01 17:30:30 UTC) #34
yigu
Hi Rob, Please take a look at the tests I added. There are 3 failures ...
4 years, 1 month ago (2016-11-11 18:03:01 UTC) #41
yigu
Hi Rob, The ref test passed but the other one still failed. I did rebaseline ...
4 years, 1 month ago (2016-11-12 04:50:06 UTC) #42
yigu
Hi Rob, I added the html that couldn't be rebaselined automatically into TestExpectations. All green ...
4 years, 1 month ago (2016-11-14 21:35:10 UTC) #47
yigu
Hi Chris, To avoid the negative-offset outline being covered up by the composited scrollbar, we ...
4 years, 1 month ago (2016-11-15 19:04:07 UTC) #49
flackr
https://codereview.chromium.org/2439113003/diff/180001/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-negative-offset-translucent-outline.html File third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-negative-offset-translucent-outline.html (right): https://codereview.chromium.org/2439113003/diff/180001/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-negative-offset-translucent-outline.html#newcode8 third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-negative-offset-translucent-outline.html:8: document.getElementById('scroller').scrollTop = 200; Is the double rAF or scrolling ...
4 years, 1 month ago (2016-11-15 20:40:40 UTC) #50
yigu
Thanks Rob for the feedback! New patch on. https://codereview.chromium.org/2439113003/diff/180001/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-negative-offset-translucent-outline.html File third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-negative-offset-translucent-outline.html (right): https://codereview.chromium.org/2439113003/diff/180001/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-negative-offset-translucent-outline.html#newcode8 third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-negative-offset-translucent-outline.html:8: document.getElementById('scroller').scrollTop ...
4 years, 1 month ago (2016-11-15 23:30:16 UTC) #58
flackr
Just a few comments, but overall looks good. https://codereview.chromium.org/2439113003/diff/200001/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-negative-offset-translucent-outline.html File third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-negative-offset-translucent-outline.html (right): https://codereview.chromium.org/2439113003/diff/200001/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-negative-offset-translucent-outline.html#newcode3 third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-negative-offset-translucent-outline.html:3: document.getElementById('scroller').scrollTop ...
4 years, 1 month ago (2016-11-16 21:14:20 UTC) #59
yigu
Hi Rob, thanks for the feedback! Added a new unit test and removed some unnecessary ...
4 years, 1 month ago (2016-11-17 15:53:15 UTC) #62
flackr
Please name the specific tests you added for this in a TEST= line next to ...
4 years, 1 month ago (2016-11-17 16:10:45 UTC) #65
flackr
You should be seeing #scroller15 in PaintLayerScrollableAreaTest.CanPaintBackgroundOntoScrollingContentsLayer being true now, but I don't see that ...
4 years, 1 month ago (2016-11-17 17:02:13 UTC) #66
yigu
On 2016/11/17 17:02:13, flackr wrote: > You should be seeing #scroller15 in > PaintLayerScrollableAreaTest.CanPaintBackgroundOntoScrollingContentsLayer being ...
4 years, 1 month ago (2016-11-17 19:04:35 UTC) #69
flackr
LGTM
4 years, 1 month ago (2016-11-17 19:50:24 UTC) #71
chrishtr
https://codereview.chromium.org/2439113003/diff/240001/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp File third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp (right): https://codereview.chromium.org/2439113003/diff/240001/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp#newcode283 third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp:283: (isPaintingCompositedDecoration || !isPaintingScrollingContent) && What about cases when there ...
4 years, 1 month ago (2016-11-17 21:15:57 UTC) #74
yigu
On 2016/11/17 21:15:57, chrishtr wrote: > https://codereview.chromium.org/2439113003/diff/240001/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp > File third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp (right): > > https://codereview.chromium.org/2439113003/diff/240001/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp#newcode283 > ...
4 years, 1 month ago (2016-11-17 22:03:59 UTC) #77
chrishtr
https://codereview.chromium.org/2439113003/diff/240001/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp File third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp (right): https://codereview.chromium.org/2439113003/diff/240001/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp#newcode283 third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp:283: (isPaintingCompositedDecoration || !isPaintingScrollingContent) && On 2016/11/17 at 21:15:57, chrishtr ...
4 years, 1 month ago (2016-11-17 22:40:21 UTC) #78
yigu
On 2016/11/17 22:40:21, chrishtr wrote: > https://codereview.chromium.org/2439113003/diff/240001/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp > File third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp (right): > > https://codereview.chromium.org/2439113003/diff/240001/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp#newcode283 > ...
4 years, 1 month ago (2016-11-17 22:45:29 UTC) #79
chrishtr
On 2016/11/17 at 22:45:29, yigu wrote: > On 2016/11/17 22:40:21, chrishtr wrote: > > https://codereview.chromium.org/2439113003/diff/240001/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp ...
4 years, 1 month ago (2016-11-17 22:48:14 UTC) #80
chrishtr
On 2016/11/17 at 22:48:14, chrishtr wrote: > On 2016/11/17 at 22:45:29, yigu wrote: > > ...
4 years, 1 month ago (2016-11-17 22:48:46 UTC) #81
yigu
On 2016/11/17 22:48:46, chrishtr wrote: > On 2016/11/17 at 22:48:14, chrishtr wrote: > > On ...
4 years, 1 month ago (2016-11-17 23:04:10 UTC) #82
chrishtr
lgtm
4 years, 1 month ago (2016-11-17 23:05:00 UTC) #83
chrishtr
On 2016/11/17 at 23:05:00, chrishtr wrote: > lgtm "box decorations" are the things that happen ...
4 years, 1 month ago (2016-11-17 23:07:08 UTC) #84
yigu
On 2016/11/17 23:07:08, chrishtr wrote: > On 2016/11/17 at 23:05:00, chrishtr wrote: > > lgtm ...
4 years, 1 month ago (2016-11-18 01:48:36 UTC) #87
yigu
Hi Rob, I renamed the decorationLayer to decorationOutlineLayer and all other related variables and functions. ...
4 years, 1 month ago (2016-11-18 04:14:07 UTC) #92
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/2439113003/280001
4 years, 1 month ago (2016-11-18 15:34:11 UTC) #95
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 1 month ago (2016-11-18 15:39:48 UTC) #97
commit-bot: I haz the power
4 years, 1 month ago (2016-11-18 15:41:34 UTC) #99
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/4199d1cead13a646b2cf14ad36ef00e61e9bab83
Cr-Commit-Position: refs/heads/master@{#433205}

Powered by Google App Engine
This is Rietveld 408576698