| Index: Source/core/paint/InlineFlowBoxPainter.cpp
|
| diff --git a/Source/core/paint/InlineFlowBoxPainter.cpp b/Source/core/paint/InlineFlowBoxPainter.cpp
|
| index 016c3cf794ee080dcac75c6e4b94e1864a8c5727..be99e182ee01028c29d712ddb92c6b8406df2c48 100644
|
| --- a/Source/core/paint/InlineFlowBoxPainter.cpp
|
| +++ b/Source/core/paint/InlineFlowBoxPainter.cpp
|
| @@ -61,9 +61,11 @@ void InlineFlowBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoint&
|
| }
|
| }
|
| } else if (paintInfo.phase == PaintPhaseMask) {
|
| - DrawingRecorder recorder(*paintInfo.context, m_inlineFlowBox, DisplayItem::paintPhaseToDrawingType(paintInfo.phase), pixelSnappedIntRect(overflowRect));
|
| - if (!recorder.canUseCachedDrawing())
|
| - paintMask(paintInfo, paintOffset);
|
| + DisplayItem::Type displayItemType = DisplayItem::paintPhaseToDrawingType(paintInfo.phase);
|
| + if (DrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_inlineFlowBox, displayItemType))
|
| + return;
|
| + DrawingRecorder recorder(*paintInfo.context, m_inlineFlowBox, displayItemType, pixelSnappedIntRect(overflowRect));
|
| + paintMask(paintInfo, paintOffset);
|
| return;
|
| } else if (paintInfo.phase == PaintPhaseForeground) {
|
| // Paint our background, border and box-shadow.
|
| @@ -228,6 +230,11 @@ void InlineFlowBoxPainter::paintBoxDecorationBackground(const PaintInfo& paintIn
|
| if (!shouldPaintBoxDecorationBackground)
|
| return;
|
|
|
| + if (DrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_inlineFlowBox, DisplayItem::BoxDecorationBackground))
|
| + return;
|
| +
|
| + DrawingRecorder recorder(*paintInfo.context, m_inlineFlowBox, DisplayItem::BoxDecorationBackground, pixelSnappedIntRect(cullRect));
|
| +
|
| LayoutRect frameRect = roundedFrameRectClampedToLineTopAndBottomIfNeeded();
|
|
|
| // Move x/y to our coordinates.
|
| @@ -240,10 +247,6 @@ void InlineFlowBoxPainter::paintBoxDecorationBackground(const PaintInfo& paintIn
|
| LayoutRect adjustedClipRect;
|
| BorderPaintingType borderPaintingType = getBorderPaintType(adjustedFrameRect, adjustedClipRect);
|
|
|
| - DrawingRecorder recorder(*paintInfo.context, m_inlineFlowBox, DisplayItem::BoxDecorationBackground, pixelSnappedIntRect(cullRect));
|
| - if (recorder.canUseCachedDrawing())
|
| - return;
|
| -
|
| // Shadow comes first and is behind the background and border.
|
| if (!m_inlineFlowBox.boxModelObject()->boxShadowShouldBeAppliedToBackground(BackgroundBleedNone, &m_inlineFlowBox))
|
| paintBoxShadow(paintInfo, *styleToUse, Normal, adjustedFrameRect);
|
|
|