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

Issue 99058: Expose webkit scaling factor before calling WebFrame::PrintPage() (Closed)

Created:
11 years, 8 months ago by Marshall Greenblatt
Modified:
9 years, 7 months ago
Reviewers:
M-A Ruel
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Rev 12100 changed the way that we spool and render printed output, most notably introducing use of the PrintContext class. The existing PrintContext::spoolPage() method applies a webkit scaling factor before rendering output to the graphics context. ChromePrintContext::spoolPage() (in webframe_impl.cc), which is used by chromium instead of PrintContext::spoolPage(), does not apply this scaling factor, but instead eventually returns the scaling factor via WebFrame::PrintPage(). This is a problem for the Chromium Embedded Framework (CEF) because, unlike chromium, the CEF renders directly to the printer device context. It is therefore important for CEF that we retrieve and apply the webkit scaling factor before calling PrintPage(). In order to support this capability the following adds a WebFrame::GetPrintPageShrink() method. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=14639

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -0 lines) Patch
M webkit/glue/webframe.h View 1 1 chunk +5 lines, -0 lines 1 comment Download
M webkit/glue/webframe_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M webkit/glue/webframe_impl.cc View 2 chunks +14 lines, -0 lines 1 comment Download

Messages

Total messages: 2 (0 generated)
Marshall Greenblatt
Please review this patch set.
11 years, 8 months ago (2009-04-27 16:09:18 UTC) #1
M-A Ruel
11 years, 8 months ago (2009-04-27 18:41:12 UTC) #2
lgtm. I'll check-in with the modifications and updating the copyright dates.

http://codereview.chromium.org/99058/diff/1001/1002
File webkit/glue/webframe.h (right):

http://codereview.chromium.org/99058/diff/1001/1002#newcode383
Line 383: virtual float GetPrintPageShrink(int page) =0;
spacing is "...) = 0;"

http://codereview.chromium.org/99058/diff/1001/1004
File webkit/glue/webframe_impl.cc (right):

http://codereview.chromium.org/99058/diff/1001/1004#newcode1893
Line 1893: if (!print_context_.get() || page < 0 || !frame() ||
!frame()->document()) {
I don't think it's worth looking at frame() or frame()->document() here.

Powered by Google App Engine
This is Rietveld 408576698