The PDF format has a field to request that the output not be scaled to the printable area. A decision about printing to the printable area vs. the entire page needs to be made before the printing flow starts. The attached patch adds an accessor/API so that the plugins can indicate that print scaling should be disabled.
Created attachment 108765 [details] Add API to indicate if print scaling should be disabled. This patch depends on http://codereview.chromium.org/8041052/ which is still in review.
Attachment 108765 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/chromium/ChangeLog', u'Sourc..." exit_code: 1 Source/WebKit/chromium/public/WebFrame.h:453: The parameter name "node" adds no information, so it should be removed. [readability/parameter_name] [5] Source/WebKit/chromium/src/WebFrameImpl.h:171: The parameter name "node" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 108775 [details] Add API to indicate if print scaling should be disabled.
Comment on attachment 108775 [details] Add API to indicate if print scaling should be disabled. Chromium part is in. This can now land safely.
Comment on attachment 108775 [details] Add API to indicate if print scaling should be disabled. View in context: https://bugs.webkit.org/attachment.cgi?id=108775&action=review > Source/WebKit/chromium/public/WebFrame.h:451 > + // If the frame or node is a plugin whose content indicates that printed What does it mean for a frame to be a plugin? Are you referring to the case of a full-frame plugin, which has a PluginDocument? Maybe say "If the frame contains a full-frame plugin or the given node refers to a plugin, and the plugin's content indicates that printed output..." > Source/WebKit/chromium/src/WebFrameImpl.cpp:1404 > + ASSERT(!frame()->document()->isFrameSet()); why do you have this assertion here? > Source/WebKit/chromium/src/WebFrameImpl.cpp:1412 > + return false; nit: indentation
Created attachment 110562 [details] Add API to indicate if print scaling should be disabled. Address nits and remove unneeded Assert.
Please wait for approval from fishd@chromium.org before submitting because this patch contains changes to the Chromium public API.
Comment on attachment 108775 [details] Add API to indicate if print scaling should be disabled. View in context: https://bugs.webkit.org/attachment.cgi?id=108775&action=review >> Source/WebKit/chromium/public/WebFrame.h:451 >> + // If the frame or node is a plugin whose content indicates that printed > > What does it mean for a frame to be a plugin? Are you referring to the case of > a full-frame plugin, which has a PluginDocument? Maybe say "If the frame contains > a full-frame plugin or the given node refers to a plugin, and the plugin's content > indicates that printed output..." Done. >> Source/WebKit/chromium/src/WebFrameImpl.cpp:1404 >> + ASSERT(!frame()->document()->isFrameSet()); > > why do you have this assertion here? Copied from printBegin(), removed. >> Source/WebKit/chromium/src/WebFrameImpl.cpp:1412 >> + return false; > > nit: indentation Done.
Comment on attachment 110562 [details] Add API to indicate if print scaling should be disabled. Clearing flags on attachment: 110562 Committed r97233: <http://trac.webkit.org/changeset/97233>
All reviewed patches have been landed. Closing bug.