Optimizing loads when creating new pages
authorjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Mar 2019 03:41:13 +0000 (03:41 +0000)
committerjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Mar 2019 03:41:13 +0000 (03:41 +0000)
commitaeb8100abeffde4858be9d45e378cc1bac2825b4
tree68614ecd4a285cd0a6f547ac9b6a687b1d3760f1
parent54f7ba03f788bd483c19a2a8415c503f4a4a5503
Optimizing loads when creating new pages
https://bugs.webkit.org/show_bug.cgi?id=195516
<rdar://problem/48738086>

Reviewed by Darin Adler.

This patch adds hooks in WebPageProxy::createNewPage to optimize loads, and moves the creationParameters
of API::NavigationAction from UI clients to WebPageProxy::createNewPage. Also, we now pass the whole
API::NavigationAction to the load optimizer instead of the request within.

* UIProcess/API/APINavigationAction.h:
* UIProcess/API/APIUIClient.h:
(API::UIClient::createNewPage):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/glib/WebKitUIClient.cpp:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::tryOptimizingLoad):
(WebKit::tryInterceptNavigation):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::tryOptimizingLoad):
(WebKit::WebPageProxy::createNewPage):
* UIProcess/WebPageProxy.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/APINavigationAction.h
Source/WebKit/UIProcess/API/APIUIClient.h
Source/WebKit/UIProcess/API/C/WKPage.cpp
Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp
Source/WebKit/UIProcess/Cocoa/NavigationState.mm
Source/WebKit/UIProcess/Cocoa/UIDelegate.h
Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h