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

Issue 2254893005: Fix visual rect for background box painting in composited scrollers. (Closed)

Created:
4 years, 4 months ago by wkorman
Modified:
4 years, 4 months ago
CC:
blink-reviews, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, slimming-paint-reviews_chromium.org, Xianzhu
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix visual rect for background box painting in composited scrollers. Use the scrolling contents GraphicsLayer as the DisplayItemClient for the background drawing when we're painting the full background of a composited scroller. BUG=638611 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/ff27367de0553a7aa38f078e528d19024f2d3668 Cr-Commit-Position: refs/heads/master@{#413340}

Patch Set 1 #

Patch Set 2 : Add tests. #

Patch Set 3 : Minor cleanup. #

Total comments: 6

Patch Set 4 : Invalidate scrolling contents layer and mark paint layer setNeedsRepaint. #

Total comments: 8

Patch Set 5 : Fix up reference test. #

Patch Set 6 : Deal with delayed-invalidation object. #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+136 lines, -11 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-local-background-text-color-change.html View 1 2 3 1 chunk +31 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-local-background-text-color-change-expected.png View 1 2 3 Binary file 0 comments Download
A + third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-local-background-text-color-change-expected.txt View 1 2 3 4 chunks +28 lines, -5 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-with-local-background-and-text.html View 1 2 3 4 1 chunk +32 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-with-local-background-and-text-expected.html View 1 2 3 4 1 chunk +24 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/composited-overflow-with-local-background.html View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
A + third_party/WebKit/LayoutTests/paint/invalidation/composited-overflow-with-local-background-expected.png View 1 2 3 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/composited-overflow-with-local-background-expected.txt View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp View 1 2 3 1 chunk +2 lines, -0 lines 3 comments Download
M third_party/WebKit/Source/core/paint/BoxPainter.cpp View 1 2 3 4 5 1 chunk +9 lines, -4 lines 3 comments Download

Messages

Total messages: 52 (28 generated)
wkorman
For discussion. This fixes the visual rect and so flackr@'s test but my familiarity with ...
4 years, 4 months ago (2016-08-17 23:25:46 UTC) #4
Xianzhu
https://codereview.chromium.org/2254893005/diff/40001/third_party/WebKit/Source/core/paint/BoxPainter.cpp File third_party/WebKit/Source/core/paint/BoxPainter.cpp (right): https://codereview.chromium.org/2254893005/diff/40001/third_party/WebKit/Source/core/paint/BoxPainter.cpp#newcode112 third_party/WebKit/Source/core/paint/BoxPainter.cpp:112: const DisplayItemClient& displayItemClient = paintingOverflowContents ? static_cast<const DisplayItemClient&>(*m_layoutBox.layer()->compositedLayerMapping()->scrollingContentsLayer()) : ...
4 years, 4 months ago (2016-08-17 23:28:48 UTC) #7
wkorman
https://codereview.chromium.org/2254893005/diff/40001/third_party/WebKit/Source/core/paint/BoxPainter.cpp File third_party/WebKit/Source/core/paint/BoxPainter.cpp (right): https://codereview.chromium.org/2254893005/diff/40001/third_party/WebKit/Source/core/paint/BoxPainter.cpp#newcode112 third_party/WebKit/Source/core/paint/BoxPainter.cpp:112: const DisplayItemClient& displayItemClient = paintingOverflowContents ? static_cast<const DisplayItemClient&>(*m_layoutBox.layer()->compositedLayerMapping()->scrollingContentsLayer()) : ...
4 years, 4 months ago (2016-08-18 17:26:23 UTC) #10
wkorman
https://codereview.chromium.org/2254893005/diff/40001/third_party/WebKit/Source/core/paint/BoxPainter.cpp File third_party/WebKit/Source/core/paint/BoxPainter.cpp (right): https://codereview.chromium.org/2254893005/diff/40001/third_party/WebKit/Source/core/paint/BoxPainter.cpp#newcode112 third_party/WebKit/Source/core/paint/BoxPainter.cpp:112: const DisplayItemClient& displayItemClient = paintingOverflowContents ? static_cast<const DisplayItemClient&>(*m_layoutBox.layer()->compositedLayerMapping()->scrollingContentsLayer()) : ...
4 years, 4 months ago (2016-08-18 18:02:02 UTC) #11
flackr
This lgtm, and if it fixes the test should fix the problem I was seeing. ...
4 years, 4 months ago (2016-08-18 19:03:40 UTC) #12
wkorman
https://codereview.chromium.org/2254893005/diff/40001/third_party/WebKit/Source/core/paint/BoxPainter.cpp File third_party/WebKit/Source/core/paint/BoxPainter.cpp (right): https://codereview.chromium.org/2254893005/diff/40001/third_party/WebKit/Source/core/paint/BoxPainter.cpp#newcode112 third_party/WebKit/Source/core/paint/BoxPainter.cpp:112: const DisplayItemClient& displayItemClient = paintingOverflowContents ? static_cast<const DisplayItemClient&>(*m_layoutBox.layer()->compositedLayerMapping()->scrollingContentsLayer()) : ...
4 years, 4 months ago (2016-08-18 19:46:00 UTC) #13
wkorman
https://codereview.chromium.org/2254893005/diff/40001/third_party/WebKit/Source/core/paint/BoxPainter.cpp File third_party/WebKit/Source/core/paint/BoxPainter.cpp (right): https://codereview.chromium.org/2254893005/diff/40001/third_party/WebKit/Source/core/paint/BoxPainter.cpp#newcode112 third_party/WebKit/Source/core/paint/BoxPainter.cpp:112: const DisplayItemClient& displayItemClient = paintingOverflowContents ? static_cast<const DisplayItemClient&>(*m_layoutBox.layer()->compositedLayerMapping()->scrollingContentsLayer()) : ...
4 years, 4 months ago (2016-08-18 21:16:59 UTC) #14
wkorman
This updated patch passes attached tests and fixes the previous invalidation issue we were discussing ...
4 years, 4 months ago (2016-08-18 23:48:11 UTC) #15
wkorman
Good news! This bit: > *Except*, it still fails to properly invalidate/repaint any of the ...
4 years, 4 months ago (2016-08-18 23:55:35 UTC) #18
wkorman
+schenney for sanity check and OWNERS
4 years, 4 months ago (2016-08-19 17:46:33 UTC) #22
flackr
On 2016/08/18 at 23:55:35, wkorman wrote: > Good news! This bit: > > > *Except*, ...
4 years, 4 months ago (2016-08-19 18:06:06 UTC) #23
Stephen Chennney
Seems sane. fast/scroll-behavior/overflow-scroll-with-local-background-and-text.html is failing though. You can take or leave the rebaselining changes. I ...
4 years, 4 months ago (2016-08-19 18:10:43 UTC) #24
wkorman
Thanks, are you good w/ LGTM'ing? On 2016/08/19 at 18:10:43, schenney wrote: > Seems sane. ...
4 years, 4 months ago (2016-08-19 18:18:41 UTC) #25
Stephen Chennney
lgtm
4 years, 4 months ago (2016-08-19 18:51:55 UTC) #28
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/2254893005/100001
4 years, 4 months ago (2016-08-20 01:03:07 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/126330)
4 years, 4 months ago (2016-08-20 04:15:18 UTC) #39
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/2254893005/100001
4 years, 4 months ago (2016-08-20 05:04:35 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/126466)
4 years, 4 months ago (2016-08-20 06:30:12 UTC) #43
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/2254893005/100001
4 years, 4 months ago (2016-08-20 16:17:47 UTC) #45
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 4 months ago (2016-08-20 16:58:45 UTC) #46
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/ff27367de0553a7aa38f078e528d19024f2d3668 Cr-Commit-Position: refs/heads/master@{#413340}
4 years, 4 months ago (2016-08-20 17:00:25 UTC) #48
chrishtr
https://codereview.chromium.org/2254893005/diff/100001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/2254893005/diff/100001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp#newcode442 third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:442: layer()->setNeedsRepaint(); Why is this line needed? https://codereview.chromium.org/2254893005/diff/100001/third_party/WebKit/Source/core/paint/BoxPainter.cpp File third_party/WebKit/Source/core/paint/BoxPainter.cpp ...
4 years, 4 months ago (2016-08-22 17:34:54 UTC) #50
wkorman
https://codereview.chromium.org/2254893005/diff/100001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/2254893005/diff/100001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp#newcode442 third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:442: layer()->setNeedsRepaint(); On 2016/08/22 17:34:54, chrishtr wrote: > Why is ...
4 years, 4 months ago (2016-08-22 17:42:27 UTC) #51
chrishtr
4 years, 4 months ago (2016-08-22 17:46:33 UTC) #52
Message was sent while issue was closed.
https://codereview.chromium.org/2254893005/diff/100001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right):

https://codereview.chromium.org/2254893005/diff/100001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:442:
layer()->setNeedsRepaint();
On 2016/08/22 at 17:42:27, wkorman wrote:
> On 2016/08/22 17:34:54, chrishtr wrote:
> > Why is this line needed?
> 
> Copying my comment from https://codereview.chromium.org/2254893005/#msg15
> 
> We need this due to subsequent invalidateDisplayItemClient() DCHECK:
> 
> DCHECK(!paintingLayer() || paintingLayer()->needsRepaint());
>
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/layout/La...
> 
> I have concern this change may be introducing over-painting for this
particular
> scroll/background situation, but note http://crrev.com/2235873002 already
> introduced line 440 which invalidates a rect sized to the entire scrolling
> contents. But perhaps calling PaintLayer::setNeedsRepaint() ends up acting as
an
> overly large hammer and I'm unaware? I'll see if this produces diff in repaint
> text expectations for other layout tests.

No it's ok I think. Thanks for the context.

https://codereview.chromium.org/2254893005/diff/100001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/paint/BoxPainter.cpp (right):

https://codereview.chromium.org/2254893005/diff/100001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/paint/BoxPainter.cpp:110: // We may paint a
delayed-invalidation object before it's actually invalidated. Note this would be
handled for
On 2016/08/22 at 17:42:27, wkorman wrote:
> On 2016/08/22 17:34:54, chrishtr wrote:
> > Really? Which test failed without line 113?
> 
> paint/invalidation/animated-gif-background-offscreen.html

ok.

Powered by Google App Engine
This is Rietveld 408576698