| 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 5352be313bf617cb8c791af05d0d9de614a5b17c..87adb3b84dedb8370ff84e79c7ababd0bb4e9177 100644
|
| --- a/chrome/renderer/print_web_view_helper.cc
|
| +++ b/chrome/renderer/print_web_view_helper.cc
|
| @@ -873,14 +873,27 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
|
| ComputePageLayoutInPointsForCss(print_preview_context_.frame(), 0,
|
| print_params, ignore_css_margins_,
|
| fit_to_page_, NULL, &default_page_layout);
|
| +
|
| if (!old_print_pages_params_.get() ||
|
| !PageLayoutIsEqual(*old_print_pages_params_, *print_pages_params_)) {
|
| bool has_page_size_style = PrintingFrameHasPageSizeStyle(
|
| print_preview_context_.frame(),
|
| print_preview_context_.total_page_count());
|
| + int dpi = GetDPI(&print_params);
|
| + gfx::Rect printable_area_in_points(
|
| + ConvertUnit(print_pages_params_->params.printable_area.x(),
|
| + dpi, printing::kPointsPerInch),
|
| + ConvertUnit(print_pages_params_->params.printable_area.y(),
|
| + dpi, printing::kPointsPerInch),
|
| + ConvertUnit(print_pages_params_->params.printable_area.width(),
|
| + dpi, printing::kPointsPerInch),
|
| + ConvertUnit(print_pages_params_->params.printable_area.height(),
|
| + dpi, printing::kPointsPerInch));
|
| +
|
| // Margins: Send default page layout to browser process.
|
| Send(new PrintHostMsg_DidGetDefaultPageLayout(routing_id(),
|
| default_page_layout,
|
| + printable_area_in_points,
|
| has_page_size_style));
|
| }
|
|
|
|
|