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

Issue 7993005: Reuse PrintContext to excessively triggering matchMedia('print') listeners. (Closed)

Created:
9 years, 3 months ago by dominicc (has gone to gerrit)
Modified:
8 years, 8 months ago
CC:
chromium-reviews, darin-cc_chromium.org, brettw-cc_chromium.org, Lei Zhang
Visibility:
Public.

Description

Reuse PrintContext to excessively triggering matchMedia('print') listeners. BUG=85013 TEST=TBD

Patch Set 1 #

Total comments: 6

Patch Set 2 : Adds a unit test and updates DPI on change. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -23 lines) Patch
M chrome/renderer/print_web_view_helper.h View 1 3 chunks +3 lines, -6 lines 0 comments Download
M chrome/renderer/print_web_view_helper.cc View 1 6 chunks +15 lines, -16 lines 0 comments Download
M chrome/renderer/print_web_view_helper_browsertest.cc View 1 2 chunks +15 lines, -0 lines 3 comments Download
M webkit/glue/webkit_glue.cc View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
Lei Zhang
http://codereview.chromium.org/7993005/diff/1/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/7993005/diff/1/chrome/renderer/print_web_view_helper.cc#newcode835 chrome/renderer/print_web_view_helper.cc:835: if (!RenderPagesForPrint(frame, node, prepare.get())) { Not sure if this ...
9 years, 3 months ago (2011-09-22 21:48:30 UTC) #1
dominicc (has gone to gerrit)
I think this is good to go now. This needs to land in conjunction with ...
9 years, 2 months ago (2011-10-24 08:45:13 UTC) #2
vandebo (ex-Chrome)
http://codereview.chromium.org/7993005/diff/1/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (left): http://codereview.chromium.org/7993005/diff/1/chrome/renderer/print_web_view_helper.cc#oldcode819 chrome/renderer/print_web_view_helper.cc:819: prepare.reset(); I think the reason this is done is ...
9 years, 2 months ago (2011-10-24 20:53:47 UTC) #3
dominicc (has gone to gerrit)
Thanks for the feedback. I have a couple of questions inline. http://codereview.chromium.org/7993005/diff/1/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (left): ...
9 years, 2 months ago (2011-10-25 04:44:38 UTC) #4
Lei Zhang
http://codereview.chromium.org/7993005/diff/1/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (left): http://codereview.chromium.org/7993005/diff/1/chrome/renderer/print_web_view_helper.cc#oldcode819 chrome/renderer/print_web_view_helper.cc:819: prepare.reset(); On 2011/10/25 04:44:39, dominicc wrote: > On 2011/10/24 ...
9 years, 2 months ago (2011-10-25 06:40:22 UTC) #5
vandebo (ex-Chrome)
http://codereview.chromium.org/7993005/diff/1/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (left): http://codereview.chromium.org/7993005/diff/1/chrome/renderer/print_web_view_helper.cc#oldcode819 chrome/renderer/print_web_view_helper.cc:819: prepare.reset(); On 2011/10/25 04:44:39, dominicc wrote: > On 2011/10/24 ...
9 years, 2 months ago (2011-10-25 17:03:11 UTC) #6
dominicc (has gone to gerrit)
> On 2011/10/25 04:44:39, dominicc wrote: > > On 2011/10/24 20:53:47, vandebo wrote: > > ...
9 years ago (2011-12-08 08:24:51 UTC) #7
vandebo (ex-Chrome)
9 years ago (2011-12-08 17:59:14 UTC) #8
On 2011/12/08 08:24:51, dominicc wrote:
> > On 2011/10/25 04:44:39, dominicc wrote:
> > > On 2011/10/24 20:53:47, vandebo wrote:
> > > > I think the reason this is done is not to make sure that the prepare is
> > > updated
> > > > with new settings, but to make the source page responsive while the
print
> > > dialog
> > > > is displayed. IIRC, while the print dialog is displayed, there's a
nested
> > > > message loop, so if the page gets resized it will reflow and without the
> > > > prepare.reset(), it will be set to the print size and aspect ratio.
> > > 
> > > Is that platform-specific, or specific to the new print preview page?
> Because
> > on
> > > Mac I get a modal dialog.
> > 
> > As Lei noted, this code path is only used for the native print flow - follow
> the
> > link from the print preview tab or ctrl-shift-p.  This code path is used on
> all
> > platforms and what has been in Chrome for years.
> 
> Right. But how can the page be resized when a modal dialog is blocking
> interaction with the window?

For one, it's not modal on Linux.  I can resize the window with the native print
dialog displayed.

Powered by Google App Engine
This is Rietveld 408576698