Index: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
index 89a4faa8c10b8fa062f19ed8359b329f1e7e1c7d..84b8d17f8c95530eb96a21adf94511862f8e8103 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
@@ -667,10 +667,11 @@ void PaintLayerPainter::paintForegroundForFragments(const PaintLayerFragments& l |
// We have to loop through every fragment multiple times, since we have to issue paint invalidations in each specific phase in order for |
// interleaving of the fragments to work properly. |
- paintForegroundForFragmentsWithPhase(selectionOnly ? PaintPhaseSelection : PaintPhaseDescendantBlockBackgroundsOnly, |
- layerFragments, context, localPaintingInfo, paintFlags, clipState); |
- |
- if (!selectionOnly) { |
+ if (selectionOnly) { |
+ paintForegroundForFragmentsWithPhase(PaintPhaseSelection, layerFragments, context, localPaintingInfo, paintFlags, clipState); |
+ } else { |
+ if (m_paintLayer.needsPaintPhaseDescendantBlockBackgrounds()) |
+ paintForegroundForFragmentsWithPhase(PaintPhaseDescendantBlockBackgroundsOnly, layerFragments, context, localPaintingInfo, paintFlags, clipState); |
if (m_paintLayer.needsPaintPhaseFloat()) |
paintForegroundForFragmentsWithPhase(PaintPhaseFloat, layerFragments, context, localPaintingInfo, paintFlags, clipState); |
paintForegroundForFragmentsWithPhase(PaintPhaseForeground, layerFragments, context, localPaintingInfo, paintFlags, clipState); |