WK2 needs printing support on Windows
authorjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Mar 2011 01:21:09 +0000 (01:21 +0000)
committerjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Mar 2011 01:21:09 +0000 (01:21 +0000)
commit2ffd0114c3bc06c17a596a77d735571f3af52114
treecd7fd0b2d0b03fba6224ce2eb318b6c986ee1a08
parent8a007615a09b8b5de93d6767ce52a3825303e74f
WK2 needs printing support on Windows
https://bugs.webkit.org/show_bug.cgi?id=55800
<rdar://problem/8903808>

Reviewed by Darin Adler.

* UIProcess/API/C/WKPage.cpp:
(ComputedPagesContext::ComputedPagesContext):
(computedPagesCallback):
From the Vector of WebCore::IntRects, build up a Vector of WKRects.
Call the callback, passing these rects and the scale factor.
(printInfoFromWKPrintInfo):
Return a PrintInfo structure from the WKPrintInfo.
(WKPageComputePagesForPrinting):
Call WebPageProxy::computePagesForPrinting(). Pass
computedPagesCallback as the callback function, so that we can
translate the WebCore rect type to WKRect before calling the caller's
callback function.
(WKPageBeginPrinting):
Call WebPageProxy::beginPrinting().
(WKPageDrawPagesToPDF):
Call WebPageProxy::drawPagesToPDF().

* UIProcess/API/C/WKPagePrivate.h:
Declare the WKPrintInfo type and new functions.

* UIProcess/WebPageProxy.cpp:
Compile this code on Windows.

* UIProcess/WebPageProxy.h:
Ditto.

* UIProcess/win/WebView.cpp:
(WebKit::WebView::paint):
We're painting the window; leave printing mode.

* WebProcess/WebPage/WebPage.cpp:
Compile this code on Windows.

* WebProcess/WebPage/WebPage.h:
Ditto.

* WebProcess/WebPage/WebPage.messages.in:
Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/C/WKPagePrivate.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/win/WebView.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in