Index: components/printing/renderer/print_web_view_helper.cc |
diff --git a/components/printing/renderer/print_web_view_helper.cc b/components/printing/renderer/print_web_view_helper.cc |
index 2639579cdde4e3e4e5e9af793b18f138d551fc26..5abbe8380fd074aa1d5337b45ae544fea0120ac1 100644 |
--- a/components/printing/renderer/print_web_view_helper.cc |
+++ b/components/printing/renderer/print_web_view_helper.cc |
@@ -120,9 +120,8 @@ int GetDPI(const PrintMsg_Print_Params* print_params) { |
bool PrintMsg_Print_Params_IsValid(const PrintMsg_Print_Params& params) { |
return !params.content_size.IsEmpty() && !params.page_size.IsEmpty() && |
!params.printable_area.IsEmpty() && params.document_cookie && |
- params.desired_dpi && params.dpi && params.margin_top >= 0 && |
- params.margin_left >= 0 && params.dpi > kMinDpi && |
- params.document_cookie != 0; |
+ params.dpi && params.margin_top >= 0 && params.margin_left >= 0 && |
+ params.dpi > kMinDpi && params.document_cookie != 0; |
} |
// Helper function to check for fit to page |
@@ -289,24 +288,24 @@ void ComputeWebKitPrintParamsInDesiredDpi( |
webkit_print_params->rasterizePDF = print_params.rasterize_pdf; |
webkit_print_params->printScalingOption = print_params.print_scaling_option; |
- webkit_print_params->printContentArea.width = ConvertUnit( |
- print_params.content_size.width(), dpi, print_params.desired_dpi); |
- webkit_print_params->printContentArea.height = ConvertUnit( |
- print_params.content_size.height(), dpi, print_params.desired_dpi); |
- |
- webkit_print_params->printableArea.x = ConvertUnit( |
- print_params.printable_area.x(), dpi, print_params.desired_dpi); |
- webkit_print_params->printableArea.y = ConvertUnit( |
- print_params.printable_area.y(), dpi, print_params.desired_dpi); |
- webkit_print_params->printableArea.width = ConvertUnit( |
- print_params.printable_area.width(), dpi, print_params.desired_dpi); |
- webkit_print_params->printableArea.height = ConvertUnit( |
- print_params.printable_area.height(), dpi, print_params.desired_dpi); |
- |
- webkit_print_params->paperSize.width = ConvertUnit( |
- print_params.page_size.width(), dpi, print_params.desired_dpi); |
- webkit_print_params->paperSize.height = ConvertUnit( |
- print_params.page_size.height(), dpi, print_params.desired_dpi); |
+ webkit_print_params->printContentArea.width = |
+ ConvertUnit(print_params.content_size.width(), dpi, kPointsPerInch); |
+ webkit_print_params->printContentArea.height = |
+ ConvertUnit(print_params.content_size.height(), dpi, kPointsPerInch); |
+ |
+ webkit_print_params->printableArea.x = |
+ ConvertUnit(print_params.printable_area.x(), dpi, kPointsPerInch); |
+ webkit_print_params->printableArea.y = |
+ ConvertUnit(print_params.printable_area.y(), dpi, kPointsPerInch); |
+ webkit_print_params->printableArea.width = |
+ ConvertUnit(print_params.printable_area.width(), dpi, kPointsPerInch); |
+ webkit_print_params->printableArea.height = |
+ ConvertUnit(print_params.printable_area.height(), dpi, kPointsPerInch); |
+ |
+ webkit_print_params->paperSize.width = |
+ ConvertUnit(print_params.page_size.width(), dpi, kPointsPerInch); |
+ webkit_print_params->paperSize.height = |
+ ConvertUnit(print_params.page_size.height(), dpi, kPointsPerInch); |
} |
blink::WebPlugin* GetPlugin(const blink::WebLocalFrame* frame) { |