Add WKUIDelegatePrivate equivalent of WKPageUIClient's drawHeader, drawFooter, header...
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Sep 2017 23:37:32 +0000 (23:37 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Sep 2017 23:37:32 +0000 (23:37 +0000)
commit7218f1572e584e0443bb097b4d74d5ddbd37e5c5
treeaf27571ee8bdb2ac2abc0761c685c2a2f5d1b575
parenta495b00147d15012be66d118c4586bbb1de1da90
Add WKUIDelegatePrivate equivalent of WKPageUIClient's drawHeader, drawFooter, headerHeight, and footerHeight
https://bugs.webkit.org/show_bug.cgi?id=176889
<rdar://problem/29270035>

Reviewed by Andy Estes.

Source/WebKit:

* UIProcess/API/C/WKPage.cpp:
(WKPageLoadAlternateHTMLString):
(WKPageLoadAlternateHTMLStringWithUserData):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController loadAlternateHTMLString:baseURL:forUnreachableURL:]):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _loadAlternateHTMLString:baseURL:forUnreachableURL:]):
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::headerHeight):
(WebKit::UIDelegate::UIClient::footerHeight):
(WebKit::UIDelegate::UIClient::drawHeader):
(WebKit::UIDelegate::UIClient::drawFooter):
* UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm:
(-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::printOperationWithPrintInfo):
* UIProcess/FrameLoadState.cpp:
(WebKit::FrameLoadState::didStartProvisionalLoad):
(WebKit::FrameLoadState::didReceiveServerRedirectForProvisionalLoad):
(WebKit::FrameLoadState::didFailProvisionalLoad):
(WebKit::FrameLoadState::didCommitLoad):
(WebKit::FrameLoadState::didSameDocumentNotification):
(WebKit::FrameLoadState::setUnreachableURL):
(WebKit::FrameLoadState::FrameLoadState): Deleted.
* UIProcess/FrameLoadState.h:
(WebKit::FrameLoadState::url const):
(WebKit::FrameLoadState::provisionalURL const):
(WebKit::FrameLoadState::unreachableURL const):
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::loadURL):
(WebKit::WebFrameProxy::didStartProvisionalLoad):
(WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad):
(WebKit::WebFrameProxy::didSameDocumentNavigation):
(WebKit::WebFrameProxy::setUnreachableURL):
* UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::url const):
(WebKit::WebFrameProxy::provisionalURL const):
(WebKit::WebFrameProxy::unreachableURL const):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadAlternateHTMLString):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidChangeProvisionalURL):
(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadURLInFrame):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(-[PrintDelegate _webView:printFrame:]):
(-[PrintDelegate _webViewHeaderHeight:]):
(-[PrintDelegate _webViewFooterHeight:]):
(-[PrintDelegate _webView:drawHeaderInRect:forPageWithTitle:URL:]):
(-[PrintDelegate _webView:drawFooterInRect:forPageWithTitle:URL:]):
(callbacksEqual):
(TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView hostWindow]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
25 files changed:
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/C/WKPage.cpp
Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm
Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
Source/WebKit/UIProcess/Cocoa/UIDelegate.h
Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
Source/WebKit/UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm
Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit/UIProcess/FrameLoadState.cpp
Source/WebKit/UIProcess/FrameLoadState.h
Source/WebKit/UIProcess/WebFrameProxy.cpp
Source/WebKit/UIProcess/WebFrameProxy.h
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/WebPageProxy.messages.in
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/WebPage.messages.in
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm
Tools/TestWebKitAPI/cocoa/TestWKWebView.h
Tools/TestWebKitAPI/cocoa/TestWKWebView.mm