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

Unified Diff: components/printing/renderer/print_web_view_helper.cc

Issue 1817873002: Print with the correct physical dimensions when specified (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@262769
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/PrintContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/printing/renderer/print_web_view_helper.cc
diff --git a/components/printing/renderer/print_web_view_helper.cc b/components/printing/renderer/print_web_view_helper.cc
index 823c9574eb870e6f7c988d0711e63a2024992c97..1f69c3abb8ffcfe54b4af9f34691ed18d7e54970 100644
--- a/components/printing/renderer/print_web_view_helper.cc
+++ b/components/printing/renderer/print_web_view_helper.cc
@@ -681,11 +681,11 @@ void PrepareFrameAndViewForPrint::ResizeForPrinting() {
// think the page is 125% larger so the size of the page is correct for
// minimum (default) scaling.
// This is important for sites that try to fill the page.
- // The 1.25 value is |printingMinimumShrinkFactor|.
+ // The 1.33 value is |printingMinimumShrinkFactor|.
gfx::Size print_layout_size(web_print_params_.printContentArea.width,
web_print_params_.printContentArea.height);
print_layout_size.set_height(
- static_cast<int>(static_cast<double>(print_layout_size.height()) * 1.25));
+ static_cast<int>(static_cast<double>(print_layout_size.height()) * 1.33));
eae 2016/03/23 21:16:56 How about making this a constant and using it both
if (!frame())
return;
@@ -1785,7 +1785,7 @@ void PrintWebViewHelper::PrintPageInternal(
#if defined(OS_WIN)
const float fudge_factor = 1;
#else
- const float fudge_factor = 1.25;
+ const float fudge_factor = 1.33;
#endif
// |page_number| is 0-based, so 1 is added.
PrintHeaderAndFooter(canvas, params.page_number + 1,
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/PrintContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698