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

Unified Diff: third_party/WebKit/Source/core/paint/BoxPainter.cpp

Issue 2254893005: Fix visual rect for background box painting in composited scrollers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor cleanup. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-with-local-background-and-text-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/BoxPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/BoxPainter.cpp b/third_party/WebKit/Source/core/paint/BoxPainter.cpp
index 15c4f102bfa1a638d8c264b848300c684fbaba0b..b6612b49a3b5fdcef6f958668968f9535e676054 100644
--- a/third_party/WebKit/Source/core/paint/BoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/BoxPainter.cpp
@@ -109,11 +109,11 @@ void BoxPainter::paintBoxDecorationBackgroundWithRect(const PaintInfo& paintInfo
if (style.appearance() == MediaSliderPart)
cacheSkipper.emplace(paintInfo.context);
- if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_layoutBox, DisplayItem::BoxDecorationBackground))
+ const DisplayItemClient& displayItemClient = paintingOverflowContents ? static_cast<const DisplayItemClient&>(*m_layoutBox.layer()->compositedLayerMapping()->scrollingContentsLayer()) : m_layoutBox;
Xianzhu 2016/08/17 23:28:48 Can you make sure if paint invalidation work for t
wkorman 2016/08/18 17:26:23 Hmm, it does not, and it does at ToT. Paint flashi
wkorman 2016/08/18 18:02:02 Invalidation not working is specific to 'local' be
flackr 2016/08/18 19:03:39 Invalidations were supposed to be fixed by https:/
wkorman 2016/08/18 19:46:00 OK, that change is helpful re: involved code, than
wkorman 2016/08/18 21:16:59 So it looks like we're invalidating the correct re
+ if (DrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, displayItemClient, DisplayItem::BoxDecorationBackground))
return;
- LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutBox, DisplayItem::BoxDecorationBackground, boundsForDrawingRecorder(paintInfo, paintOffset));
-
+ DrawingRecorder recorder(paintInfo.context, displayItemClient, DisplayItem::BoxDecorationBackground, FloatRect(boundsForDrawingRecorder(paintInfo, paintOffset)));
BoxDecorationData boxDecorationData(m_layoutBox);
GraphicsContextStateSaver stateSaver(paintInfo.context, false);
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-with-local-background-and-text-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698