Index: Source/core/paint/InlineFlowBoxPainter.cpp |
diff --git a/Source/core/paint/InlineFlowBoxPainter.cpp b/Source/core/paint/InlineFlowBoxPainter.cpp |
index 928eb67b6092cc5e6b951433573193835869397e..4266da52af1660555b57d49762a18998b4b31e5a 100644 |
--- a/Source/core/paint/InlineFlowBoxPainter.cpp |
+++ b/Source/core/paint/InlineFlowBoxPainter.cpp |
@@ -61,8 +61,9 @@ void InlineFlowBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& |
} |
} |
} else if (paintInfo.phase == PaintPhaseMask) { |
- RenderDrawingRecorder recorder(paintInfo.context, &m_inlineFlowBox.renderer(), paintInfo.phase, pixelSnappedIntRect(overflowRect)); |
- paintMask(paintInfo, paintOffset); |
+ RenderDrawingRecorder recorder(paintInfo.context, m_inlineFlowBox.renderer(), paintInfo.phase, pixelSnappedIntRect(overflowRect)); |
+ if (!recorder.canUseCachedDrawing()) |
+ paintMask(paintInfo, paintOffset); |
return; |
} else if (paintInfo.phase == PaintPhaseForeground) { |
// Paint our background, border and box-shadow. |
@@ -212,7 +213,9 @@ void InlineFlowBoxPainter::paintBoxDecorationBackground(const PaintInfo& paintIn |
LayoutRect paintRect = LayoutRect(adjustedPaintOffset, frameRect.size()); |
- RenderDrawingRecorder recorder(paintInfo.context, &m_inlineFlowBox.renderer(), paintInfo.phase, pixelSnappedIntRect(paintRect)); |
+ RenderDrawingRecorder recorder(paintInfo.context, m_inlineFlowBox.renderer(), paintInfo.phase, pixelSnappedIntRect(paintRect)); |
+ if (recorder.canUseCachedDrawing()) |
+ return; |
// Shadow comes first and is behind the background and border. |
if (!m_inlineFlowBox.boxModelObject()->boxShadowShouldBeAppliedToBackground(BackgroundBleedNone, &m_inlineFlowBox)) |