| 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 fb0ece77ff9b9fe28f27d34a2d44b39b314daddc..1bc5084a432c461e307b6bdb1c9986bad035fa54 100644
|
| --- a/chrome/renderer/print_web_view_helper.cc
|
| +++ b/chrome/renderer/print_web_view_helper.cc
|
| @@ -380,12 +380,12 @@ void PrintWebViewHelper::GetPageSizeAndMarginsInPoints(
|
| default_params.margin_top,
|
| dpi, printing::kPixelsPerInch);
|
| int margin_right_in_pixels = ConvertUnit(
|
| - default_params.page_size.width()
|
| - - default_params.printable_size.width() - default_params.margin_left,
|
| + default_params.page_size.width() -
|
| + default_params.printable_size.width() - default_params.margin_left,
|
| dpi, printing::kPixelsPerInch);
|
| int margin_bottom_in_pixels = ConvertUnit(
|
| - default_params.page_size.height()
|
| - - default_params.printable_size.height() - default_params.margin_top,
|
| + default_params.page_size.height() -
|
| + default_params.printable_size.height() - default_params.margin_top,
|
| dpi, printing::kPixelsPerInch);
|
| int margin_left_in_pixels = ConvertUnit(
|
| default_params.margin_left,
|
| @@ -400,12 +400,12 @@ void PrintWebViewHelper::GetPageSizeAndMarginsInPoints(
|
| margin_left_in_pixels);
|
| }
|
|
|
| - *content_width_in_points = ConvertPixelsToPoint(page_size_in_pixels.width
|
| - - margin_left_in_pixels
|
| - - margin_right_in_pixels);
|
| - *content_height_in_points = ConvertPixelsToPoint(page_size_in_pixels.height
|
| - - margin_top_in_pixels
|
| - - margin_bottom_in_pixels);
|
| + *content_width_in_points = ConvertPixelsToPoint(page_size_in_pixels.width -
|
| + margin_left_in_pixels -
|
| + margin_right_in_pixels);
|
| + *content_height_in_points = ConvertPixelsToPoint(page_size_in_pixels.height -
|
| + margin_top_in_pixels -
|
| + margin_bottom_in_pixels);
|
|
|
| // Invalid page size and/or margins. We just use the default setting.
|
| if (*content_width_in_points < 1.0 || *content_height_in_points < 1.0) {
|
|
|