Reviewed by Darin Adler.
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Jan 2011 22:45:56 +0000 (22:45 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Jan 2011 22:45:56 +0000 (22:45 +0000)
commit382729c8b2a9df68e3b7d3820e18df88d59c1a4c
tree4795268f51a0984803f91e052488a8f903d7d141
parentfb050aee306e991f937068e8983003d211a36636
    Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=52739
        Make it possible for a WebKit2 client to print headers and footers

        * UIProcess/API/C/WKPage.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::headerHeight):
        (WebKit::WebPageProxy::footerHeight):
        (WebKit::WebPageProxy::drawHeader):
        (WebKit::WebPageProxy::drawFooter):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebUIClient.cpp:
        (WebKit::WebUIClient::headerHeight):
        (WebKit::WebUIClient::footerHeight):
        (WebKit::WebUIClient::drawHeader):
        (WebKit::WebUIClient::drawFooter):
        * UIProcess/WebUIClient.h:
        Pass UIClient calls through.

        * UIProcess/API/mac/WKView.mm:
        (currentPrintOperationScale): A helper to extract scale factor from the current NSPrintOperation.
        (-[WKView _adjustPrintingMarginsForHeaderAndFooter]): Copied from WebKit1. Change current
        print info to account for header and footer height as provided by the client.
        (-[WKView knowsPageRange:]): Call -[self _adjustPrintingMarginsForHeaderAndFooter].
        (-[WKView drawPageBorderWithSize:]): When AppKit asks to print page border, call the client
        to do that. Code adapted form WebKit1.

        * UIProcess/API/qt/qwkpage:
        (QWKPage::QWKPage): Added zeroes for new WKPageUIClient members to avoid breaking the build.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@76167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/C/WKPage.h
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/API/qt/qwkpage.cpp
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebUIClient.cpp
Source/WebKit2/UIProcess/WebUIClient.h
Tools/ChangeLog
Tools/MiniBrowser/mac/BrowserWindowController.m
Tools/WebKitTestRunner/TestController.cpp