| 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..58af5f6314dd3b04c8c49cabcef54df7c85b1fe5 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_in_points = content_width_in_points +
|
| + margin_left_in_points + margin_right_in_points;
|
| + double page_height_in_points = 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_in_points, printing::kPointsPerInch, dpi)),
|
| + static_cast<int>(ConvertUnitDouble(
|
| + page_height_in_points, printing::kPointsPerInch, dpi)));
|
|
|
| params->margin_top = static_cast<int>(ConvertUnitDouble(
|
| margin_top_in_points, printing::kPointsPerInch, dpi));
|
|
|