| 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..b0ae1d2270f15c1010bc9f2d6ab21d844e34c986 100644
|
| --- a/chrome/renderer/print_web_view_helper.cc
|
| +++ b/chrome/renderer/print_web_view_helper.cc
|
| @@ -22,6 +22,7 @@
|
| using printing::ConvertPixelsToPoint;
|
| using printing::ConvertPixelsToPointDouble;
|
| using printing::ConvertUnit;
|
| +using printing::ConvertUnitDouble;
|
| using WebKit::WebConsoleMessage;
|
| using WebKit::WebFrame;
|
| using WebKit::WebRect;
|
| @@ -437,15 +438,21 @@ void PrintWebViewHelper::GetPageSizeAndMarginsInPoints(
|
|
|
| void PrintWebViewHelper::UpdatePrintableSizeInPrintParameters(
|
| WebFrame* frame, ViewMsg_Print_Params* params) {
|
| -#if defined(OS_MACOSX)
|
| double content_width_in_points;
|
| double content_height_in_points;
|
| PrintWebViewHelper::GetPageSizeAndMarginsInPoints(frame, 0, *params,
|
| &content_width_in_points,
|
| &content_height_in_points,
|
| NULL, NULL, NULL, NULL);
|
| +#if defined(OS_MACOSX)
|
| params->printable_size = gfx::Size(
|
| static_cast<int>(content_width_in_points),
|
| static_cast<int>(content_height_in_points));
|
| +#else
|
| + params->printable_size = gfx::Size(
|
| + static_cast<int>(ConvertUnitDouble(
|
| + content_width_in_points, printing::kPointsPerInch, params->dpi)),
|
| + static_cast<int>(ConvertUnitDouble(
|
| + content_height_in_points, printing::kPointsPerInch, params->dpi)));
|
| #endif
|
| }
|
|
|