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

Issue 467343003: Defer request to print a PDF when the user initiates the entire frame and the PDF hasn't loaded. (Closed)

Created:
6 years, 4 months ago by ivandavid
Modified:
6 years, 4 months ago
CC:
chromium-reviews, Dan Beam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Defer request to print a PDF when the user initiates the entire frame and the PDF hasn't loaded. Original fix: https://codereview.chromium.org/427723004/ The original fix was reverted, however it actually shouldn't have been because it was mostly correct. This fix is the same as the old one, with an additional change. The call to DidStopLoading() in Instance::DocumentLoadComplete was moved to an earlier part of the function, causing DidStopLoading to be called before the print preview request. BUG=376969 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=290010

Patch Set 1 #

Total comments: 10

Patch Set 2 : Removed callback header and fixed grammar issues in comment. #

Patch Set 3 : Added call to DidStopLoading() in InvokePrintingForInstance to progess printing process. #

Patch Set 4 : Added DCHECK to RequestPrintPreview(). #

Total comments: 6

Patch Set 5 : Removed ppb_pdf_impl.cc and PRINT_PREVIEW_USER_INITIATED_CONTEXT_NODE modifications. #

Patch Set 6 : Moved DidStopLoading call in DocumentLoadComplete. #

Total comments: 6

Patch Set 7 : Fixed DCHECK argument. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -6 lines) Patch
M chrome/renderer/printing/print_web_view_helper.h View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/renderer/printing/print_web_view_helper.cc View 1 2 3 4 5 6 3 chunks +27 lines, -1 line 0 comments Download
M pdf/instance.cc View 1 2 3 4 5 2 chunks +6 lines, -5 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
ivandavid
https://codereview.chromium.org/467343003/diff/1/chrome/renderer/printing/print_web_view_helper.cc File chrome/renderer/printing/print_web_view_helper.cc (left): https://codereview.chromium.org/467343003/diff/1/chrome/renderer/printing/print_web_view_helper.cc#oldcode1727 chrome/renderer/printing/print_web_view_helper.cc:1727: case PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME: { This is the only case where ...
6 years, 4 months ago (2014-08-13 20:58:55 UTC) #1
Vitaly Buka (NO REVIEWS)
How this is different in regard of Spreadsheets issue? https://codereview.chromium.org/467343003/diff/1/chrome/renderer/printing/print_web_view_helper.cc File chrome/renderer/printing/print_web_view_helper.cc (left): https://codereview.chromium.org/467343003/diff/1/chrome/renderer/printing/print_web_view_helper.cc#oldcode1727 chrome/renderer/printing/print_web_view_helper.cc:1727: ...
6 years, 4 months ago (2014-08-13 23:39:46 UTC) #2
ivandavid
https://codereview.chromium.org/467343003/diff/1/chrome/renderer/printing/print_web_view_helper.cc File chrome/renderer/printing/print_web_view_helper.cc (left): https://codereview.chromium.org/467343003/diff/1/chrome/renderer/printing/print_web_view_helper.cc#oldcode1727 chrome/renderer/printing/print_web_view_helper.cc:1727: case PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME: { On 2014/08/13 23:39:45, Vitaly Buka wrote: ...
6 years, 4 months ago (2014-08-14 03:38:13 UTC) #3
Vitaly Buka (NO REVIEWS)
https://codereview.chromium.org/467343003/diff/80001/chrome/renderer/pepper/ppb_pdf_impl.cc File chrome/renderer/pepper/ppb_pdf_impl.cc (right): https://codereview.chromium.org/467343003/diff/80001/chrome/renderer/pepper/ppb_pdf_impl.cc#newcode467 chrome/renderer/pepper/ppb_pdf_impl.cc:467: DidStopLoading(instance_id); It does not look like a right place ...
6 years, 4 months ago (2014-08-14 05:19:44 UTC) #4
ivandavid
https://codereview.chromium.org/467343003/diff/80001/chrome/renderer/printing/print_web_view_helper.cc File chrome/renderer/printing/print_web_view_helper.cc (right): https://codereview.chromium.org/467343003/diff/80001/chrome/renderer/printing/print_web_view_helper.cc#newcode823 chrome/renderer/printing/print_web_view_helper.cc:823: if (!on_stop_loading_closure_.is_null()) On 2014/08/14 05:19:43, Vitaly Buka wrote: > ...
6 years, 4 months ago (2014-08-15 00:35:24 UTC) #5
Vitaly Buka (NO REVIEWS)
lgtm https://codereview.chromium.org/467343003/diff/120001/chrome/renderer/printing/print_web_view_helper.cc File chrome/renderer/printing/print_web_view_helper.cc (right): https://codereview.chromium.org/467343003/diff/120001/chrome/renderer/printing/print_web_view_helper.cc#newcode1749 chrome/renderer/printing/print_web_view_helper.cc:1749: DCHECK(GetPlugin(print_preview_context_.source_frame())); DCHECK(!GetPlugin PRINT_PREVIEW_USER_INITIATED_SELECTION is expected for HTML pages ...
6 years, 4 months ago (2014-08-15 00:58:37 UTC) #6
ivandavid
6 years, 4 months ago (2014-08-15 01:08:51 UTC) #7
ivandavid
The CQ bit was checked by ivandavid@chromium.org
6 years, 4 months ago (2014-08-15 01:09:01 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ivandavid@chromium.org/467343003/120001
6 years, 4 months ago (2014-08-15 01:11:17 UTC) #9
Lei Zhang
lgtm https://codereview.chromium.org/467343003/diff/120001/pdf/instance.cc File pdf/instance.cc (right): https://codereview.chromium.org/467343003/diff/120001/pdf/instance.cc#newcode1503 pdf/instance.cc:1503: if (did_call_start_loading_) { On 2014/08/15 00:35:23, ivandavid wrote: ...
6 years, 4 months ago (2014-08-15 02:12:55 UTC) #10
ivandavid
The CQ bit was unchecked by ivandavid@chromium.org
6 years, 4 months ago (2014-08-15 02:18:07 UTC) #11
ivandavid
The CQ bit was checked by ivandavid@chromium.org
6 years, 4 months ago (2014-08-15 02:18:11 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ivandavid@chromium.org/467343003/120001
6 years, 4 months ago (2014-08-15 02:20:33 UTC) #13
Vitaly Buka (NO REVIEWS)
The CQ bit was unchecked by vitalybuka@chromium.org
6 years, 4 months ago (2014-08-15 04:15:20 UTC) #14
Vitaly Buka (NO REVIEWS)
https://codereview.chromium.org/467343003/diff/120001/chrome/renderer/printing/print_web_view_helper.cc File chrome/renderer/printing/print_web_view_helper.cc (right): https://codereview.chromium.org/467343003/diff/120001/chrome/renderer/printing/print_web_view_helper.cc#newcode1749 chrome/renderer/printing/print_web_view_helper.cc:1749: DCHECK(GetPlugin(print_preview_context_.source_frame())); Please fix. This should be !GetPlugin On 2014/08/15 ...
6 years, 4 months ago (2014-08-15 04:16:26 UTC) #15
ivandavid
The CQ bit was checked by ivandavid@chromium.org
6 years, 4 months ago (2014-08-15 17:56:57 UTC) #16
ivandavid
The CQ bit was unchecked by ivandavid@chromium.org
6 years, 4 months ago (2014-08-15 17:57:02 UTC) #17
ivandavid
https://codereview.chromium.org/467343003/diff/120001/chrome/renderer/printing/print_web_view_helper.cc File chrome/renderer/printing/print_web_view_helper.cc (right): https://codereview.chromium.org/467343003/diff/120001/chrome/renderer/printing/print_web_view_helper.cc#newcode1749 chrome/renderer/printing/print_web_view_helper.cc:1749: DCHECK(GetPlugin(print_preview_context_.source_frame())); On 2014/08/15 04:16:26, Vitaly Buka wrote: > Please ...
6 years, 4 months ago (2014-08-15 17:57:20 UTC) #18
ivandavid
The CQ bit was checked by ivandavid@chromium.org
6 years, 4 months ago (2014-08-15 18:05:43 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ivandavid@chromium.org/467343003/140001
6 years, 4 months ago (2014-08-15 18:08:51 UTC) #20
commit-bot: I haz the power
6 years, 4 months ago (2014-08-15 21:21:20 UTC) #21
Message was sent while issue was closed.
Committed patchset #7 (140001) as 290010

Powered by Google App Engine
This is Rietveld 408576698