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)); |