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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2559863002: Fix issue when background changes painting target layer (Closed)
Patch Set: Fix windows build Created 4 years 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/paint/invalidation/filter-invalidation-with-composited-container-change-expected.txt ('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/layout/compositing/CompositedLayerMapping.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
index 7f3fb6de837bbca78c9dcf9ae4623cfa74f4330c..dfd8cac619015cc671f491ceabaa90423dfc73f5 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
@@ -372,16 +372,20 @@ void CompositedLayerMapping::
backgroundPaintsOntoScrollingContentsLayer()) {
m_backgroundPaintsOntoScrollingContentsLayer =
shouldPaintOntoScrollingContentsLayer;
- // If the background is no longer painted onto the scrolling contents layer
- // the scrolling contents layer needs to be updated. If it is going to be
- // painted onto the scrolling contents layer this update will be triggered
- // by LayoutBoxModelObject::setBackingNeedsPaintInvalidationInRect
- if (hasScrollingLayer() && !shouldPaintOntoScrollingContentsLayer)
+ // The scrolling contents layer needs to be updated for changed
+ // m_backgroundPaintsOntoScrollingContentsLayer.
+ if (hasScrollingLayer())
m_scrollingContentsLayer->setNeedsDisplay();
}
- m_backgroundPaintsOntoGraphicsLayer =
+ bool shouldPaintOntoGraphicsLayer =
!m_backgroundPaintsOntoScrollingContentsLayer ||
paintLocation & BackgroundPaintInGraphicsLayer;
+ if (shouldPaintOntoGraphicsLayer != !!m_backgroundPaintsOntoGraphicsLayer) {
+ m_backgroundPaintsOntoGraphicsLayer = shouldPaintOntoGraphicsLayer;
+ // The graphics layer needs to be updated for changed
+ // m_backgroundPaintsOntoGraphicsLayer.
+ m_graphicsLayer->setNeedsDisplay();
+ }
}
void CompositedLayerMapping::updateContentsOpaque() {
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/filter-invalidation-with-composited-container-change-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698