Bug 52739

Summary: Make it possible for a WebKit2 client to print headers and footers
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: PrintingAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, webkit-ews
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
proposed patch darin: review+

Description Alexey Proskuryakov 2011-01-19 13:36:40 PST
Patch forthcoming
Comment 1 Alexey Proskuryakov 2011-01-19 13:47:16 PST
Created attachment 79476 [details]
proposed patch
Comment 2 Early Warning System Bot 2011-01-19 14:07:21 PST
Attachment 79476 [details] did not build on qt:
Build output: http://queues.webkit.org/results/7557218
Comment 3 Darin Adler 2011-01-19 14:17:59 PST
Comment on attachment 79476 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=79476&action=review

Note that this broke the Qt build. Please land a version that does not break it.

> Source/WebKit2/UIProcess/API/mac/WKView.mm:1480
> +    NSRect footerRect = NSMakeRect(headerFooterLeft, [printInfo bottomMargin] / scale - _data->_page->footerHeight(frame),
> +                                   headerFooterWidth, _data->_page->footerHeight(frame));
> +    NSRect headerRect = NSMakeRect(headerFooterLeft, (paperSize.height - [printInfo topMargin]) / scale,
> +                                   headerFooterWidth, _data->_page->headerHeight(frame));

We normally don’t line things up like this, and just indent one tab stop. It’s better for later renaming, for one thing.
Comment 4 Alexey Proskuryakov 2011-01-19 14:46:17 PST
Committed <http://trac.webkit.org/changeset/76167>.