Issue metadata
Sign in to add a comment
|
Painted scrolling contents background is black on text content. |
||||||||||||||||||||||
Issue descriptionFirst failing commit is #411560 / https://chromium.googlesource.com/chromium/src/+/971a9c9725e293bd89b7cb1475acdc502065e6b3 What steps will reproduce the problem? (1) Load the attached test page overflow-scroll-with-local-background-and-text.html What is the expected output? The background behind the text should be grey. What do you see instead? It's black / unpainted instead. Please use labels and text to provide additional information.
,
Aug 17 2016
Looking into this.
,
Aug 17 2016
chrishtr@ did some recent work that could be related, see http://crrev.com/2241663002 and comment in LayoutBox.cpp:1040 and PaintInvalidationState.cpp:322 -- // This won't work fully correctly for fixed-position elements, who should receive CSS clip but for whom the current object // is not in the containing block chain. Continuing to look.
,
Aug 17 2016
The comment is about css clip not applied for fixed-position elements when calculating visual rect. It should only cause over-paint-invalidation, but not corrupted rendering.
,
Aug 17 2016
The visual rect for drawing the background doesn't look right:
{index: 1, client: "0x1860f024248 LayoutBlockFlow DIV id='scroller'", type: "DrawingBoxDecorationBackground", rect: [10.000000,10.000000 185.000000x550.000000], cacheIsValid: true, visualRect: [-10,-10 220x220]},
,
Aug 17 2016
Sounds like the problem. This is it painting the background into the scrolling contents layer which extends beyond the overflow clip. Where does the visual rect come from?
,
Aug 17 2016
For non-frame composited scrollers, these changes have some history on visual rect implementation: http://crrev.com/1844993002 http://crrev.com/1830333002 As an overview, visual rects are obtained via DisplayItemClient::visualRect. In the common case we delegate to the previous paint invalidation rect, see LayoutObject::visualRect(), but there are special cases such as PageOverlay, LinkHighlight, InlineBox, and for scrollable areas as above we made the GraphicsLayer the DisplayItemClient and thus the provider of the visual rect. There's also some scroller specific stuff around offsetFromLayoutObject: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp?sq=package:chromium&dr=C&rcl=1471447605&l=443 It looks like the visual rect is getting clipped by the visible area somehow, hmm.
,
Aug 17 2016
BoxPainter is specialized for the case where it's painting the background of a paint container into a scrolling contents layer (which I assume is implicitly composited, see BoxPainter::isPaintingBackgroundOfPaintContainerIntoScrollingContentsLayer). Given that, I am wondering whether in that case we should use the scrolling contents GraphicsLayer as the DisplayItemClient for the background drawing. This would produce the correct bounds. Conceptually this seems reasonable to me, but it's possible there's something I am missing around how composited scrolling is intended to be structured. In any case that background drawing seems like it should have a visual rect sized to the graphics layer size. I'm trying it now.
,
Aug 20 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ff27367de0553a7aa38f078e528d19024f2d3668 commit ff27367de0553a7aa38f078e528d19024f2d3668 Author: wkorman <wkorman@chromium.org> Date: Sat Aug 20 16:58:14 2016 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 Review-Url: https://codereview.chromium.org/2254893005 Cr-Commit-Position: refs/heads/master@{#413340} [modify] https://crrev.com/ff27367de0553a7aa38f078e528d19024f2d3668/third_party/WebKit/LayoutTests/TestExpectations [add] https://crrev.com/ff27367de0553a7aa38f078e528d19024f2d3668/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-local-background-text-color-change-expected.png [add] https://crrev.com/ff27367de0553a7aa38f078e528d19024f2d3668/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-local-background-text-color-change-expected.txt [add] https://crrev.com/ff27367de0553a7aa38f078e528d19024f2d3668/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-local-background-text-color-change.html [add] https://crrev.com/ff27367de0553a7aa38f078e528d19024f2d3668/third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-with-local-background-and-text-expected.html [add] https://crrev.com/ff27367de0553a7aa38f078e528d19024f2d3668/third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-with-local-background-and-text.html [add] https://crrev.com/ff27367de0553a7aa38f078e528d19024f2d3668/third_party/WebKit/LayoutTests/paint/invalidation/composited-overflow-with-local-background-expected.png [modify] https://crrev.com/ff27367de0553a7aa38f078e528d19024f2d3668/third_party/WebKit/LayoutTests/paint/invalidation/composited-overflow-with-local-background-expected.txt [modify] https://crrev.com/ff27367de0553a7aa38f078e528d19024f2d3668/third_party/WebKit/LayoutTests/paint/invalidation/composited-overflow-with-local-background.html [modify] https://crrev.com/ff27367de0553a7aa38f078e528d19024f2d3668/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp [modify] https://crrev.com/ff27367de0553a7aa38f078e528d19024f2d3668/third_party/WebKit/Source/core/paint/BoxPainter.cpp
,
Aug 20 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/85b6016cab181514b75fe888f2648b3b70bdd1fe commit 85b6016cab181514b75fe888f2648b3b70bdd1fe Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org> Date: Sat Aug 20 17:58:15 2016 Auto-rebaseline for r413340 https://chromium.googlesource.com/chromium/src/+/ff27367de BUG= 638611 TBR=wkorman@chromium.org Review URL: https://codereview.chromium.org/2254733014 . Cr-Commit-Position: refs/heads/master@{#413342} [modify] https://crrev.com/85b6016cab181514b75fe888f2648b3b70bdd1fe/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/85b6016cab181514b75fe888f2648b3b70bdd1fe/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-local-background-text-color-change-expected.txt [rename] https://crrev.com/85b6016cab181514b75fe888f2648b3b70bdd1fe/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overflow-scroll-local-background-text-color-change-expected.png [add] https://crrev.com/85b6016cab181514b75fe888f2648b3b70bdd1fe/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overflow-scroll-local-background-text-color-change-expected.txt [add] https://crrev.com/85b6016cab181514b75fe888f2648b3b70bdd1fe/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/overflow-scroll-local-background-text-color-change-expected.png [add] https://crrev.com/85b6016cab181514b75fe888f2648b3b70bdd1fe/third_party/WebKit/LayoutTests/platform/mac-mac10.9/paint/invalidation/composited-overflow-with-local-background-expected.png [add] https://crrev.com/85b6016cab181514b75fe888f2648b3b70bdd1fe/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/overflow-scroll-local-background-text-color-change-expected.png [add] https://crrev.com/85b6016cab181514b75fe888f2648b3b70bdd1fe/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/composited-overflow-with-local-background-expected.png [add] https://crrev.com/85b6016cab181514b75fe888f2648b3b70bdd1fe/third_party/WebKit/LayoutTests/platform/win/fast/repaint/overflow-scroll-local-background-text-color-change-expected.png
,
Aug 21 2016
,
Aug 23 2016
Tested the issue on Latest Chrome# 54.0.2837.0 on Windows, Mac and Linux and is working as intended. Hence adding TE-Verified Labels. Also attaching screenshot for further reference. Thank You. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by flackr@chromium.org
, Aug 17 2016Status: Assigned (was: Untriaged)