diff options
author | yuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 03:29:34 +0000 |
---|---|---|
committer | yuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 03:29:34 +0000 |
commit | 386083e9ce54f1ee0c593450dacc8e1856faa58b (patch) | |
tree | 69d2081cb4e6b95cf7c74ddd4d7b061313b6b210 /chrome/renderer/print_web_view_helper.cc | |
parent | 0bf2a95128f5b67d6b56db4a9ed9857c690e9c0c (diff) | |
download | chromium_src-386083e9ce54f1ee0c593450dacc8e1856faa58b.zip chromium_src-386083e9ce54f1ee0c593450dacc8e1856faa58b.tar.gz chromium_src-386083e9ce54f1ee0c593450dacc8e1856faa58b.tar.bz2 |
Fix for Issue 50923: page is not properly positioned on paper when paper is
larger than page
BUG=50923
TEST=manual
Review URL: http://codereview.chromium.org/3067022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54865 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/print_web_view_helper.cc')
-rw-r--r-- | chrome/renderer/print_web_view_helper.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc index d5b586c..6e07318 100644 --- a/chrome/renderer/print_web_view_helper.cc +++ b/chrome/renderer/print_web_view_helper.cc @@ -179,7 +179,6 @@ void PrintWebViewHelper::Print(WebFrame* frame, bool script_initiated) { // If the settings are invalid, early quit. if (print_settings.params.dpi && print_settings.params.document_cookie) { - UpdatePrintableSizeInPrintParameters(frame, &print_settings.params); if (print_settings.params.selection_only) { CopyAndPrint(print_settings, frame); } else { @@ -311,13 +310,16 @@ void PrintWebViewHelper::PrintPageAsJPEG( #if defined(OS_MACOSX) || defined(OS_WIN) void PrintWebViewHelper::PrintPages(const ViewMsg_PrintPages_Params& params, WebFrame* frame) { - PrepareFrameAndViewForPrint prep_frame_view(params.params, + ViewMsg_Print_Params printParams = params.params; + UpdatePrintableSizeInPrintParameters(frame, &printParams); + + PrepareFrameAndViewForPrint prep_frame_view(printParams, frame, frame->view()); int page_count = prep_frame_view.GetExpectedPageCount(); Send(new ViewHostMsg_DidGetPrintedPagesCount(routing_id(), - params.params.document_cookie, + printParams.document_cookie, page_count)); if (!page_count) return; |