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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2417683002: Disable scroll anchoring when in printing mode (Closed)
Patch Set: Add comment Created 4 years, 2 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/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 31dccf7ce79d4712ffe1406454109bdc41eb5dda..402206d9d4d2e3c5647e39062aefed07984549d4 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -551,7 +551,8 @@ void LocalFrame::setPrinting(bool printing,
// the document. See https://bugs.webkit.org/show_bug.cgi?id=43704
ResourceCacheValidationSuppressor validationSuppressor(document()->fetcher());
- document()->setPrinting(printing);
+ document()->setPrinting(printing ? Document::Printing
+ : Document::FinishingPrinting);
view()->adjustMediaTypeForPrinting(printing);
if (shouldUsePrintingLayout()) {
@@ -573,6 +574,9 @@ void LocalFrame::setPrinting(bool printing,
if (child->isLocalFrame())
toLocalFrame(child)->setPrinting(printing, FloatSize(), FloatSize(), 0);
}
+
+ if (!printing)
+ document()->setPrinting(Document::NotPrinting);
}
bool LocalFrame::shouldUsePrintingLayout() const {
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698