Index: Source/core/paint/ViewPainter.cpp |
diff --git a/Source/core/paint/ViewPainter.cpp b/Source/core/paint/ViewPainter.cpp |
index 386840cec65e8f2add2ccd7594c101b255c9cf17..8a8d984735e9a43a38b20ac9854b90ff23e00631 100644 |
--- a/Source/core/paint/ViewPainter.cpp |
+++ b/Source/core/paint/ViewPainter.cpp |
@@ -49,6 +49,9 @@ void ViewPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo) |
// culling and pre-blending optimization when possible. |
GraphicsContext& context = *paintInfo.context; |
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, m_layoutView, DisplayItem::BoxDecorationBackground)) |
+ return; |
+ |
IntRect documentRect = m_layoutView.unscaledDocumentRect(); |
const Document& document = m_layoutView.document(); |
const FrameView& frameView = *m_layoutView.frameView(); |
@@ -60,8 +63,6 @@ void ViewPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo) |
const LayoutObject* rootObject = document.documentElement() ? document.documentElement()->layoutObject() : nullptr; |
LayoutObjectDrawingRecorder recorder(context, m_layoutView, DisplayItem::BoxDecorationBackground, documentRect); |
- if (recorder.canUseCachedDrawing()) |
- return; |
// Special handling for print economy mode. |
bool forceBackgroundToWhite = BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(m_layoutView.styleRef(), document); |