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

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

Issue 2259493004: Fix Compositing of Opaque Scrolling Layers and Add Tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments addressed and test baselines. Created 4 years, 3 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
Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 78fa4e42d04b74a3cc6b1ec1411fb3cd61f3cd24..b9140fca3393d95b231188888f6fe7944e704159 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -2344,6 +2344,14 @@ GraphicsLayer* PaintLayer::graphicsLayerBackingForScrolling() const
}
}
+bool PaintLayer::shouldPaintBackgroundOntoScrollingContentsLayer() const
+{
+ return !isRootLayer()
+ && scrollsOverflow()
+ && layoutObject()->style()->hasEntirelyLocalBackground()
+ && !stackingNode()->hasNegativeZOrderList();
+}
+
void PaintLayer::ensureCompositedLayerMapping()
{
if (m_rareData && m_rareData->compositedLayerMapping)
@@ -2451,7 +2459,7 @@ bool PaintLayer::childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR
PaintLayerStackingNodeReverseIterator reverseIterator(*m_stackingNode, PositiveZOrderChildren | NormalFlowChildren | NegativeZOrderChildren);
while (PaintLayerStackingNode* child = reverseIterator.next()) {
const PaintLayer* childLayer = child->layer();
- // Stop at composited paint boundaries.
+ // Stop at composited paint boundaries and non-self-painting layers.
if (childLayer->isPaintInvalidationContainer())
continue;

Powered by Google App Engine
This is Rietveld 408576698