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

Unified Diff: Source/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 535553002: Only allocate a foreground layer for a CLM if there are composited negative-z-index-children. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix. Created 6 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
« no previous file with comments | « LayoutTests/css3/compositing/mix-blend-mode-2nd-stacking-context-composited-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/compositing/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/compositing/RenderLayerCompositor.cpp b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
index 0d39968d532ac8a46fc5299e2f0ac6c0c2979914..36deffdd17e66262a0798ae4f2e10d324307505a 100644
--- a/Source/core/rendering/compositing/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
@@ -748,11 +748,13 @@ bool RenderLayerCompositor::clipsCompositingDescendants(const RenderLayer* layer
return layer->hasCompositingDescendant() && layer->renderer()->hasClipOrOverflowClip();
}
-// If an element has negative z-index children, those children render in front of the
+// If an element has composited negative z-index children, those children render in front of the
// layer background, so we need an extra 'contents' layer for the foreground of the layer
// object.
bool RenderLayerCompositor::needsContentsCompositingLayer(const RenderLayer* layer) const
{
+ if (!layer->hasCompositingDescendant())
+ return false;
return layer->stackingNode()->hasNegativeZOrderList();
}
« no previous file with comments | « LayoutTests/css3/compositing/mix-blend-mode-2nd-stacking-context-composited-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698