Bug 52739 - Make it possible for a WebKit2 client to print headers and footers
Summary: Make it possible for a WebKit2 client to print headers and footers
Alias: None
Product: WebKit
Classification: Unclassified
Component: Printing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexey Proskuryakov
Depends on:
Reported: 2011-01-19 13:36 PST by Alexey Proskuryakov
Modified: 2011-01-19 14:46 PST (History)
2 users (show)

See Also:

proposed patch (15.52 KB, patch)
2011-01-19 13:47 PST, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>.