39 lines
1.9 KiB
Diff
39 lines
1.9 KiB
Diff
diff --git chrome/renderer/printing/print_web_view_helper_mac.mm chrome/renderer/printing/print_web_view_helper_mac.mm
|
|
index ffde22c..6c776ce 100644
|
|
--- chrome/renderer/printing/print_web_view_helper_mac.mm
|
|
+++ chrome/renderer/printing/print_web_view_helper_mac.mm
|
|
@@ -127,12 +127,14 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
|
|
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
|
|
skia::SetIsPreviewMetafile(*canvas, is_preview);
|
|
|
|
+#if defined(ENABLE_PRINT_PREVIEW)
|
|
if (params.display_header_footer) {
|
|
PrintHeaderAndFooter(static_cast<blink::WebCanvas*>(canvas),
|
|
page_number + 1,
|
|
print_preview_context_.total_page_count(), *frame,
|
|
scale_factor, page_layout_in_points, params);
|
|
}
|
|
+#endif // ENABLE_PRINT_PREVIEW
|
|
RenderPageContent(frame, page_number, canvas_area, content_area,
|
|
scale_factor, static_cast<blink::WebCanvas*>(canvas));
|
|
}
|
|
diff --git chrome/renderer/printing/print_web_view_helper_pdf_win.cc chrome/renderer/printing/print_web_view_helper_pdf_win.cc
|
|
index d9554d7..9ca18a7 100644
|
|
--- chrome/renderer/printing/print_web_view_helper_pdf_win.cc
|
|
+++ chrome/renderer/printing/print_web_view_helper_pdf_win.cc
|
|
@@ -187,12 +187,14 @@ void PrintWebViewHelper::PrintPageInternal(
|
|
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
|
|
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
|
|
|
|
+#if defined(ENABLE_PRINT_PREVIEW)
|
|
if (params.params.display_header_footer) {
|
|
// |page_number| is 0-based, so 1 is added.
|
|
PrintHeaderAndFooter(canvas, params.page_number + 1,
|
|
print_preview_context_.total_page_count(), *frame,
|
|
scale_factor, page_layout_in_points, params.params);
|
|
}
|
|
+#endif // ENABLE_PRINT_PREVIEW
|
|
|
|
float webkit_scale_factor =
|
|
RenderPageContent(frame, params.page_number, canvas_area, content_area,
|