RESOLVED FIXED Bug 84312
[Chromium] Added more params to Chromium-Webkit print api to implement auto fit to page functionality.
https://bugs.webkit.org/show_bug.cgi?id=84312
Summary [Chromium] Added more params to Chromium-Webkit print api to implement auto f...
kmadhusu
Reported 2012-04-18 20:06:43 PDT
To fix crbug.com/85132, I need to pass additional print params such as selected printer paper size, printable area and scale to fit value to the plugin print context. Therefore, I modified printBegin() function accordingly. Please review and let me know your comments.
Attachments
Patch (11.65 KB, patch)
2012-04-18 20:08 PDT, kmadhusu
no flags
Patch (17.47 KB, patch)
2012-04-20 15:17 PDT, kmadhusu
no flags
Patch (14.36 KB, patch)
2012-04-23 10:30 PDT, kmadhusu
no flags
Patch (14.35 KB, patch)
2012-04-29 12:43 PDT, kmadhusu
no flags
Patch (17.84 KB, patch)
2012-05-11 14:04 PDT, kmadhusu
no flags
Patch (17.66 KB, patch)
2012-05-11 14:16 PDT, kmadhusu
no flags
Patch (17.63 KB, patch)
2012-05-15 14:45 PDT, kmadhusu
no flags
kmadhusu
Comment 1 2012-04-18 20:08:58 PDT
WebKit Review Bot
Comment 2 2012-04-18 20:10:54 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
kmadhusu
Comment 3 2012-04-19 11:09:54 PDT
Comment on attachment 137828 [details] Patch Patch is not ready for review yet. I will update the review flag as soon as it is ready for review. Thanks.
kmadhusu
Comment 4 2012-04-20 15:17:53 PDT
kmadhusu
Comment 5 2012-04-23 10:30:51 PDT
kmadhusu
Comment 6 2012-04-23 10:33:18 PDT
Latest patch uses WebPrintScalingOption.h. This is a new header file. I would like to commit that header file first to support Chrome side changes. Therefore, I uploaded that header file patch in https://bugs.webkit.org/show_bug.cgi?id=84608.
WebKit Review Bot
Comment 7 2012-04-23 22:59:53 PDT
Comment on attachment 138378 [details] Patch Attachment 138378 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/12518135
kmadhusu
Comment 8 2012-04-29 12:43:50 PDT
kmadhusu
Comment 9 2012-04-29 12:48:15 PDT
Updated patch and it is ready for review.
kmadhusu
Comment 10 2012-05-01 15:24:59 PDT
ping.
kmadhusu
Comment 11 2012-05-07 13:42:31 PDT
fishd@: Can you please review the latest patch? Thanks.
Darin Fisher (:fishd, Google)
Comment 12 2012-05-09 11:52:46 PDT
Comment on attachment 139405 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=139405&action=review > Source/WebKit/chromium/public/WebFrame.h:468 > + // TODO(kmadhusu@chromium.org): This is a temporary interface to avoid the nit: webkit style doesn't use TODO(user). just use FIXME. > Source/WebKit/chromium/public/WebFrame.h:488 > + virtual int printBegin(const WebSize& printContentSize, I suspect it would be better to bottle up these parameters into a WebPrintParams struct. See for example WebPluginParams. Exclude the constrainToNode parameter so that you can reuse WebPrintParams in the WebPlugin printBegin method. > Source/WebKit/chromium/public/WebPlugin.h:104 > + // TODO(kmadhusu@chromium.org): Change the data type of printScalingOption to nit: TODO(user) -> FIXME Use WebPrintParams here too.
kmadhusu
Comment 13 2012-05-11 14:04:44 PDT
kmadhusu
Comment 14 2012-05-11 14:16:05 PDT
kmadhusu
Comment 15 2012-05-14 10:52:23 PDT
Comment on attachment 139405 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=139405&action=review Addressed review comments. PTAL. Thanks. >> Source/WebKit/chromium/public/WebFrame.h:468 >> + // TODO(kmadhusu@chromium.org): This is a temporary interface to avoid the > > nit: webkit style doesn't use TODO(user). just use FIXME. Fixed. >> Source/WebKit/chromium/public/WebFrame.h:488 >> + virtual int printBegin(const WebSize& printContentSize, > > I suspect it would be better to bottle up these parameters into a WebPrintParams > struct. See for example WebPluginParams. Exclude the constrainToNode parameter > so that you can reuse WebPrintParams in the WebPlugin printBegin method. Done. >> Source/WebKit/chromium/public/WebPlugin.h:104 >> + // TODO(kmadhusu@chromium.org): Change the data type of printScalingOption to > > nit: TODO(user) -> FIXME > > Use WebPrintParams here too. Done.
Darin Fisher (:fishd, Google)
Comment 16 2012-05-15 13:29:37 PDT
Comment on attachment 141495 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=141495&action=review > Source/WebKit/chromium/public/WebPrintParams.h:60 > + , printScalingOption(WebPrintScalingOptionFitToPrintableArea) { } nit: indentation unindent the comma-prefixed rows by 2 spaces > Source/WebKit/chromium/public/WebPrintParams.h:64 > + , printableArea(printableArea) nit: indentation
kmadhusu
Comment 17 2012-05-15 14:45:31 PDT
kmadhusu
Comment 18 2012-05-15 14:48:56 PDT
Comment on attachment 141495 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=141495&action=review Fixed nits. >> Source/WebKit/chromium/public/WebPrintParams.h:60 >> + , printScalingOption(WebPrintScalingOptionFitToPrintableArea) { } > > nit: indentation > > unindent the comma-prefixed rows by 2 spaces Fixed. >> Source/WebKit/chromium/public/WebPrintParams.h:64 >> + , printableArea(printableArea) > > nit: indentation Fixed.
WebKit Review Bot
Comment 19 2012-05-15 18:42:01 PDT
Comment on attachment 142063 [details] Patch Clearing flags on attachment: 142063 Committed r117200: <http://trac.webkit.org/changeset/117200>
WebKit Review Bot
Comment 20 2012-05-15 18:42:07 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.