Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Issue 7544018: Print preview page selection should not require a rerendering of draft pages. (Closed)

Created:
9 years, 4 months ago by kmadhusu
Modified:
9 years, 4 months ago
CC:
chromium-reviews, arv (Not doing code reviews), darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Print preview page selection should not require a rerendering of draft pages. On page selection, regenerate the complete document with the selection, but preserve the existing draft pages and simply display a subset of them. 1. Added a new param |clear all preview data| to |PrintHostMsg_DidGetPreviewPageCount|. 2. Removed |requested_preview_page_index| from |PrintMsg_ContinuePreview| BUG=84383 TEST=print preview works after code changes. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=96406

Patch Set 1 #

Total comments: 20

Patch Set 2 : '' #

Patch Set 3 : remove page_slot #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 28

Patch Set 6 : Fix browser test failure #

Patch Set 7 : Addressed review comments. #

Patch Set 8 : Addressed review comments. #

Patch Set 9 : '' #

Patch Set 10 : '' #

Total comments: 26

Patch Set 11 : test #

Patch Set 12 : '' #

Patch Set 13 : Fix mac code error #

Patch Set 14 : Implemented mac code. #

Patch Set 15 : Implemented win code #

Patch Set 16 : Remove blank line #

Patch Set 17 : remove blank line #

Total comments: 17

Patch Set 18 : Addressed review comments #

Patch Set 19 : Rebase + Addressed review comments #

Patch Set 20 : '' #

Patch Set 21 : Fix win compile error #

Patch Set 22 : Added a new browser test #

Total comments: 18

Patch Set 23 : Addressed review comments #

Total comments: 10

Patch Set 24 : fixed nits #

Patch Set 25 : '' #

Patch Set 26 : fix style #

Unified diffs Side-by-side diffs Delta from patch set Stats (+411 lines, -177 lines) Patch
M chrome/browser/printing/print_preview_message_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/printing/print_preview_message_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +13 lines, -15 lines 0 comments Download
M chrome/browser/resources/print_preview/page_settings.js View 4 chunks +11 lines, -5 lines 0 comments Download
M chrome/browser/resources/print_preview/print_preview.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 8 chunks +67 lines, -12 lines 0 comments Download
M chrome/common/print_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +5 lines, -8 lines 0 comments Download
M chrome/renderer/mock_printer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +2 lines, -1 line 0 comments Download
M chrome/renderer/mock_printer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +3 lines, -1 line 0 comments Download
M chrome/renderer/mock_render_thread.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/mock_render_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +26 lines, -3 lines 0 comments Download
M chrome/renderer/print_web_view_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 7 chunks +27 lines, -17 lines 0 comments Download
M chrome/renderer/print_web_view_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 15 chunks +88 lines, -55 lines 0 comments Download
M chrome/renderer/print_web_view_helper_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +70 lines, -7 lines 0 comments Download
M chrome/renderer/print_web_view_helper_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +17 lines, -7 lines 0 comments Download
M chrome/renderer/print_web_view_helper_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 chunks +53 lines, -34 lines 0 comments Download
M chrome/renderer/print_web_view_helper_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +21 lines, -9 lines 0 comments Download
M printing/print_job_constants.h View 1 chunk +1 line, -0 lines 0 comments Download
M printing/print_job_constants.cc View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
dpapad
Still testing some cases. http://codereview.chromium.org/7544018/diff/1/chrome/browser/resources/print_preview/page_settings.js File chrome/browser/resources/print_preview/page_settings.js (left): http://codereview.chromium.org/7544018/diff/1/chrome/browser/resources/print_preview/page_settings.js#oldcode277 chrome/browser/resources/print_preview/page_settings.js:277: this.previouslySelectedPages_ = this.selectedPagesSet; This seems ...
9 years, 4 months ago (2011-08-01 17:51:40 UTC) #1
kmadhusu
dpapad: Addressed review comments. http://codereview.chromium.org/7544018/diff/1/chrome/browser/resources/print_preview/page_settings.js File chrome/browser/resources/print_preview/page_settings.js (left): http://codereview.chromium.org/7544018/diff/1/chrome/browser/resources/print_preview/page_settings.js#oldcode277 chrome/browser/resources/print_preview/page_settings.js:277: this.previouslySelectedPages_ = this.selectedPagesSet; On 2011/08/01 ...
9 years, 4 months ago (2011-08-02 22:53:45 UTC) #2
kmadhusu
vandebo: Please review the c++ code.
9 years, 4 months ago (2011-08-02 22:53:59 UTC) #3
vandebo (ex-Chrome)
I didn't look at the JS http://codereview.chromium.org/7544018/diff/8013/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/7544018/diff/8013/chrome/renderer/print_web_view_helper.cc#newcode385 chrome/renderer/print_web_view_helper.cc:385: if (!print_preview_context_.IsCompleteMetafileReady()) I ...
9 years, 4 months ago (2011-08-03 20:48:20 UTC) #4
dpapad
http://codereview.chromium.org/7544018/diff/8013/chrome/browser/resources/print_preview/print_preview.js File chrome/browser/resources/print_preview/print_preview.js (right): http://codereview.chromium.org/7544018/diff/8013/chrome/browser/resources/print_preview/print_preview.js#newcode441 chrome/browser/resources/print_preview/print_preview.js:441: for (var i =0; i < pageCount; i++) nit: ...
9 years, 4 months ago (2011-08-03 22:16:45 UTC) #5
kmadhusu
dpapad, vandebo: Addressed review comments. http://codereview.chromium.org/7544018/diff/8013/chrome/browser/resources/print_preview/print_preview.js File chrome/browser/resources/print_preview/print_preview.js (right): http://codereview.chromium.org/7544018/diff/8013/chrome/browser/resources/print_preview/print_preview.js#newcode441 chrome/browser/resources/print_preview/print_preview.js:441: for (var i =0; ...
9 years, 4 months ago (2011-08-04 20:47:53 UTC) #6
vandebo (ex-Chrome)
Time to do the win & mac implementations? http://codereview.chromium.org/7544018/diff/21002/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/7544018/diff/21002/chrome/renderer/print_web_view_helper.cc#newcode353 chrome/renderer/print_web_view_helper.cc:353: print_preview_context_.set_generate_draft_pages(generate_draft_pages); ...
9 years, 4 months ago (2011-08-04 21:45:02 UTC) #7
kmadhusu
Implemented win & mac code. vandebo, dpapad: Addressed review comments. Thanks. http://codereview.chromium.org/7544018/diff/21002/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): ...
9 years, 4 months ago (2011-08-05 22:55:21 UTC) #8
vandebo (ex-Chrome)
http://codereview.chromium.org/7544018/diff/33001/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/7544018/diff/33001/chrome/renderer/print_web_view_helper.cc#newcode393 chrome/renderer/print_web_view_helper.cc:393: if (!FinalizePreviewDocument()) nit: FinalizeCompleteMetafile ? Actually we've been calling ...
9 years, 4 months ago (2011-08-08 20:11:46 UTC) #9
kmadhusu
Addressed review comments. vandebo: Yet to address one of your previous comment which is to ...
9 years, 4 months ago (2011-08-09 22:09:26 UTC) #10
kmadhusu
vandebo: Added a new PrintWebViewHelperPreviewTest. Thanks.
9 years, 4 months ago (2011-08-10 00:36:49 UTC) #11
vandebo (ex-Chrome)
Thanks for cleaning up the names. http://codereview.chromium.org/7544018/diff/46001/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/7544018/diff/46001/chrome/renderer/print_web_view_helper.cc#newcode1017 chrome/renderer/print_web_view_helper.cc:1017: DCHECK(generate_draft_pages_); nit: This ...
9 years, 4 months ago (2011-08-10 17:21:40 UTC) #12
kmadhusu
vandebo: Addressed review comments. Thanks http://codereview.chromium.org/7544018/diff/46001/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/7544018/diff/46001/chrome/renderer/print_web_view_helper.cc#newcode1017 chrome/renderer/print_web_view_helper.cc:1017: DCHECK(generate_draft_pages_); On 2011/08/10 17:21:40, ...
9 years, 4 months ago (2011-08-10 19:01:13 UTC) #13
vandebo (ex-Chrome)
C++ LGTM w/ nits. http://codereview.chromium.org/7544018/diff/50001/chrome/renderer/print_web_view_helper_mac.mm File chrome/renderer/print_web_view_helper_mac.mm (right): http://codereview.chromium.org/7544018/diff/50001/chrome/renderer/print_web_view_helper_mac.mm#newcode74 chrome/renderer/print_web_view_helper_mac.mm:74: bool need_draft_metafile = print_preview_context_.IsModifiable() && ...
9 years, 4 months ago (2011-08-10 20:02:54 UTC) #14
dpapad
http://codereview.chromium.org/7544018/diff/50001/chrome/browser/resources/print_preview/page_settings.js File chrome/browser/resources/print_preview/page_settings.js (left): http://codereview.chromium.org/7544018/diff/50001/chrome/browser/resources/print_preview/page_settings.js#oldcode277 chrome/browser/resources/print_preview/page_settings.js:277: this.previouslySelectedPages_ = this.selectedPagesSet; Did you find any way to ...
9 years, 4 months ago (2011-08-10 20:26:51 UTC) #15
kmadhusu
Fixed nits. http://codereview.chromium.org/7544018/diff/50001/chrome/browser/resources/print_preview/page_settings.js File chrome/browser/resources/print_preview/page_settings.js (left): http://codereview.chromium.org/7544018/diff/50001/chrome/browser/resources/print_preview/page_settings.js#oldcode277 chrome/browser/resources/print_preview/page_settings.js:277: this.previouslySelectedPages_ = this.selectedPagesSet; On 2011/08/10 20:26:51, dpapad ...
9 years, 4 months ago (2011-08-10 21:19:39 UTC) #16
dpapad
9 years, 4 months ago (2011-08-10 21:52:49 UTC) #17
LGTM

Powered by Google App Engine
This is Rietveld 408576698