Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Unified Diff: third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp

Issue 2672983003: Implements PrintBrowser mode. (Closed)
Patch Set: Rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 =
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/paint/PaintInvalidator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698