Index: third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp |
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp |
index 15e04065780106bf68e3bb12ca6a3489e9a15205..eedca8d87b2e4e5ed0df5364011f1a75c4de5a89 100644 |
--- a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp |
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp |
@@ -281,7 +281,12 @@ static void invalidatePaintRectangleOnWindow( |
DCHECK(paintInvalidationContainer.isLayoutView() && |
paintInvalidationContainer.layer()->compositingState() == |
NotComposited); |
- if (!frameView || paintInvalidationContainer.document().printing()) |
+ |
+ if (!frameView) |
+ return; |
+ |
+ if (paintInvalidationContainer.document().printing() && |
+ !RuntimeEnabledFeatures::printBrowserEnabled()) |
return; |
DCHECK(frameView->frame().ownerLayoutItem().isNull()); |
@@ -391,7 +396,8 @@ LayoutRect ObjectPaintInvalidator::invalidatePaintRectangle( |
if (dirtyRect.isEmpty()) |
return LayoutRect(); |
- if (m_object.view()->document().printing()) |
+ if (m_object.view()->document().printing() && |
+ !RuntimeEnabledFeatures::printBrowserEnabled()) |
return LayoutRect(); // Don't invalidate paints if we're printing. |
const LayoutBoxModelObject& paintInvalidationContainer = |