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 8a608bb31898aaf079140f815b935c16f6ddb103..b4572ab8e2b37aac2b41eb74253ea1c5634ced17 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
@@ -681,7 +681,13 @@ void PaintLayerPainter::paintForegroundForFragments(const PaintLayerFragments& l |
if (!selectionOnly) { |
paintForegroundForFragmentsWithPhase(PaintPhaseFloat, layerFragments, context, localPaintingInfo, paintingRootForLayoutObject, paintFlags, clipState); |
paintForegroundForFragmentsWithPhase(PaintPhaseForeground, layerFragments, context, localPaintingInfo, paintingRootForLayoutObject, paintFlags, clipState); |
- paintForegroundForFragmentsWithPhase(PaintPhaseChildOutlines, layerFragments, context, localPaintingInfo, paintingRootForLayoutObject, paintFlags, clipState); |
+ |
+ if (m_paintLayer.needsPaintPhaseChildOutlines()) { |
+ size_t displayItemListSizeBefore = context.paintController().newDisplayItemList().size(); |
+ paintForegroundForFragmentsWithPhase(PaintPhaseChildOutlines, layerFragments, context, localPaintingInfo, paintingRootForLayoutObject, paintFlags, clipState); |
+ if (displayItemListSizeBefore == context.paintController().newDisplayItemList().size()) |
+ m_paintLayer.clearNeedsPaintPhaseChildOutlines(); |
+ } |
} |
} |