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

Unified Diff: chrome/renderer/print_web_view_helper.cc

Issue 6374004: Clean up windows printing workflow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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: chrome/renderer/print_web_view_helper.cc
diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc
index 4412a514d663067f1a07c1b3c7997a536d3fa8b5..c25093e1c68ae7740be2ab9d44945239ca271448 100644
--- a/chrome/renderer/print_web_view_helper.cc
+++ b/chrome/renderer/print_web_view_helper.cc
@@ -401,13 +401,16 @@ void PrintWebViewHelper::UpdatePrintableSizeInPrintParameters(
static_cast<int>(ConvertUnitDouble(content_height_in_points,
printing::kPointsPerInch, dpi)));
+ double page_width = content_width_in_points + margin_left_in_points +
Lei Zhang 2011/01/19 21:44:03 nit: |page_width| -> |page_width_in_points|
kmadhusu 2011/01/19 23:25:12 Done.
+ margin_right_in_points;
+ double page_height = content_height_in_points + margin_top_in_points +
+ margin_bottom_in_points;
+
params->page_size = gfx::Size(
- static_cast<int>(ConvertUnitDouble(content_width_in_points +
- margin_left_in_points + margin_right_in_points,
- printing::kPointsPerInch, dpi)),
- static_cast<int>(ConvertUnitDouble(content_height_in_points +
- margin_top_in_points + margin_bottom_in_points,
- printing::kPointsPerInch, dpi)));
+ static_cast<int>(
+ ConvertUnitDouble(page_width, printing::kPointsPerInch, dpi)),
+ static_cast<int>(
+ ConvertUnitDouble(page_height, printing::kPointsPerInch, dpi)));
params->margin_top = static_cast<int>(ConvertUnitDouble(
margin_top_in_points, printing::kPointsPerInch, dpi));
« no previous file with comments | « no previous file | chrome/renderer/print_web_view_helper_win.cc » ('j') | chrome/renderer/print_web_view_helper_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698