<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[159965] trunk/Source/WebKit2</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/159965">159965</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2013-12-02 14:35:51 -0800 (Mon, 02 Dec 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>WKPageLoaderClient should be versioned
https://bugs.webkit.org/show_bug.cgi?id=125104
Reviewed by Sam Weinig.
Add multiple versions of the WKPageLoaderClient struct. In a subsequent patch,
WKPageLoaderClient and kWKPageLoaderClientCurrentVersion will be deprecated. Instead,
users of the API are supposed to explicitly choose a version and a versioned struct.
* Shared/APIClient.h:
Add a new API::Client class with a new ClientTraits template that uses std::tuple for versions.
* Shared/APIClientTraits.cpp:
* Shared/APIClientTraits.h:
Remove WKPageLoaderClient interface sizes.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
Add an explicit cast to WKPageLoaderClientBase. In an upcoming patch, WKPageSetPageLoaderClient
will be changed to take a WKPageLoaderClientBase instead.
* UIProcess/API/C/WKPageLoaderClient.h:
Add new versions.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(setUpPageLoaderClient):
Use an explicit version.
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didStartProvisionalLoadForFrame):
(WebKit::WebLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebLoaderClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::WebLoaderClient::didCommitLoadForFrame):
(WebKit::WebLoaderClient::didFinishDocumentLoadForFrame):
(WebKit::WebLoaderClient::didFinishLoadForFrame):
(WebKit::WebLoaderClient::didFailLoadWithErrorForFrame):
(WebKit::WebLoaderClient::didSameDocumentNavigationForFrame):
(WebKit::WebLoaderClient::didReceiveTitleForFrame):
(WebKit::WebLoaderClient::didFirstLayoutForFrame):
(WebKit::WebLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebLoaderClient::didLayout):
(WebKit::WebLoaderClient::didRemoveFrameFromHierarchy):
(WebKit::WebLoaderClient::didDisplayInsecureContentForFrame):
(WebKit::WebLoaderClient::didRunInsecureContentForFrame):
(WebKit::WebLoaderClient::didDetectXSSForFrame):
(WebKit::WebLoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
(WebKit::WebLoaderClient::didReceiveAuthenticationChallengeInFrame):
(WebKit::WebLoaderClient::didStartProgress):
(WebKit::WebLoaderClient::didChangeProgress):
(WebKit::WebLoaderClient::didFinishProgress):
(WebKit::WebLoaderClient::processDidBecomeUnresponsive):
(WebKit::WebLoaderClient::interactionOccurredWhileProcessUnresponsive):
(WebKit::WebLoaderClient::processDidBecomeResponsive):
(WebKit::WebLoaderClient::processDidCrash):
(WebKit::WebLoaderClient::didChangeBackForwardList):
(WebKit::WebLoaderClient::shouldGoToBackForwardListItem):
(WebKit::WebLoaderClient::willGoToBackForwardListItem):
(WebKit::WebLoaderClient::didFailToInitializePlugin):
(WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
(WebKit::WebLoaderClient::pluginLoadPolicy):
Go through client.base everywhere.
* UIProcess/WebLoaderClient.h:
Add API::ClientTraits specialization. Change WebLoaderClient to derive from API::Client<WKPageLoaderClientBase>.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeLoaderClient):
This now takes a WKPageLoaderClientBase*.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIClienth">trunk/Source/WebKit2/Shared/APIClient.h</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIClientTraitscpp">trunk/Source/WebKit2/Shared/APIClientTraits.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIClientTraitsh">trunk/Source/WebKit2/Shared/APIClientTraits.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPagecpp">trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPageLoaderClienth">trunk/Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKBrowsingContextControllermm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebLoaderClientcpp">trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebLoaderClienth">trunk/Source/WebKit2/UIProcess/WebLoaderClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (159964 => 159965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2013-12-02 22:33:31 UTC (rev 159964)
+++ trunk/Source/WebKit2/ChangeLog        2013-12-02 22:35:51 UTC (rev 159965)
</span><span class="lines">@@ -1,3 +1,74 @@
</span><ins>+2013-12-02 Anders Carlsson <andersca@apple.com>
+
+ WKPageLoaderClient should be versioned
+ https://bugs.webkit.org/show_bug.cgi?id=125104
+
+ Reviewed by Sam Weinig.
+
+ Add multiple versions of the WKPageLoaderClient struct. In a subsequent patch,
+ WKPageLoaderClient and kWKPageLoaderClientCurrentVersion will be deprecated. Instead,
+ users of the API are supposed to explicitly choose a version and a versioned struct.
+
+ * Shared/APIClient.h:
+ Add a new API::Client class with a new ClientTraits template that uses std::tuple for versions.
+
+ * Shared/APIClientTraits.cpp:
+ * Shared/APIClientTraits.h:
+ Remove WKPageLoaderClient interface sizes.
+
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageSetPageLoaderClient):
+ Add an explicit cast to WKPageLoaderClientBase. In an upcoming patch, WKPageSetPageLoaderClient
+ will be changed to take a WKPageLoaderClientBase instead.
+
+ * UIProcess/API/C/WKPageLoaderClient.h:
+ Add new versions.
+
+ * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
+ (setUpPageLoaderClient):
+ Use an explicit version.
+
+ * UIProcess/WebLoaderClient.cpp:
+ (WebKit::WebLoaderClient::didStartProvisionalLoadForFrame):
+ (WebKit::WebLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
+ (WebKit::WebLoaderClient::didFailProvisionalLoadWithErrorForFrame):
+ (WebKit::WebLoaderClient::didCommitLoadForFrame):
+ (WebKit::WebLoaderClient::didFinishDocumentLoadForFrame):
+ (WebKit::WebLoaderClient::didFinishLoadForFrame):
+ (WebKit::WebLoaderClient::didFailLoadWithErrorForFrame):
+ (WebKit::WebLoaderClient::didSameDocumentNavigationForFrame):
+ (WebKit::WebLoaderClient::didReceiveTitleForFrame):
+ (WebKit::WebLoaderClient::didFirstLayoutForFrame):
+ (WebKit::WebLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
+ (WebKit::WebLoaderClient::didLayout):
+ (WebKit::WebLoaderClient::didRemoveFrameFromHierarchy):
+ (WebKit::WebLoaderClient::didDisplayInsecureContentForFrame):
+ (WebKit::WebLoaderClient::didRunInsecureContentForFrame):
+ (WebKit::WebLoaderClient::didDetectXSSForFrame):
+ (WebKit::WebLoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
+ (WebKit::WebLoaderClient::didReceiveAuthenticationChallengeInFrame):
+ (WebKit::WebLoaderClient::didStartProgress):
+ (WebKit::WebLoaderClient::didChangeProgress):
+ (WebKit::WebLoaderClient::didFinishProgress):
+ (WebKit::WebLoaderClient::processDidBecomeUnresponsive):
+ (WebKit::WebLoaderClient::interactionOccurredWhileProcessUnresponsive):
+ (WebKit::WebLoaderClient::processDidBecomeResponsive):
+ (WebKit::WebLoaderClient::processDidCrash):
+ (WebKit::WebLoaderClient::didChangeBackForwardList):
+ (WebKit::WebLoaderClient::shouldGoToBackForwardListItem):
+ (WebKit::WebLoaderClient::willGoToBackForwardListItem):
+ (WebKit::WebLoaderClient::didFailToInitializePlugin):
+ (WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
+ (WebKit::WebLoaderClient::pluginLoadPolicy):
+ Go through client.base everywhere.
+
+ * UIProcess/WebLoaderClient.h:
+ Add API::ClientTraits specialization. Change WebLoaderClient to derive from API::Client<WKPageLoaderClientBase>.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::initializeLoaderClient):
+ This now takes a WKPageLoaderClientBase*.
+
</ins><span class="cx"> 2013-12-02 Beth Dakin <bdakin@apple.com>
</span><span class="cx">
</span><span class="cx"> Add a setting to opt into a mode where the background extends and fixed elements
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/APIClient.h (159964 => 159965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/APIClient.h        2013-12-02 22:33:31 UTC (rev 159964)
+++ trunk/Source/WebKit2/Shared/APIClient.h        2013-12-02 22:35:51 UTC (rev 159965)
</span><span class="lines">@@ -27,7 +27,70 @@
</span><span class="cx"> #define APIClient_h
</span><span class="cx">
</span><span class="cx"> #include "APIClientTraits.h"
</span><ins>+#include <array>
</ins><span class="cx">
</span><ins>+// FIXME: Transition all clients from WebKit::APIClient to API::Client.
+namespace API {
+
+template<typename ClientInterface> struct ClientTraits;
+
+template<typename ClientInterface> class Client {
+ typedef typename ClientTraits<ClientInterface>::Versions ClientVersions;
+ static const int latestClientVersion = std::tuple_size<ClientVersions>::value - 1;
+ typedef typename std::tuple_element<latestClientVersion, ClientVersions>::type LatestClientInterface;
+
+ // Helper class that can return an std::array of element sizes in a tuple.
+ template<typename> struct InterfaceSizes;
+ template<typename... Interfaces> struct InterfaceSizes<std::tuple<Interfaces...>> {
+ static std::array<size_t, sizeof...(Interfaces)> sizes()
+ {
+#if COMPILER(CLANG)
+// Workaround for http://llvm.org/bugs/show_bug.cgi?id=18117
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wmissing-braces"
+#endif
+ return { sizeof(Interfaces)... };
+#if COMPILER(CLANG)
+#pragma clang diagnostic pop
+#endif
+ }
+ };
+
+public:
+ Client()
+ {
+#if !ASSERT_DISABLED
+ auto interfaceSizes = InterfaceSizes<ClientVersions>::sizes();
+ ASSERT(std::is_sorted(interfaceSizes.begin(), interfaceSizes.end()));
+#endif
+
+ initialize(nullptr);
+ }
+
+ void initialize(const ClientInterface* client)
+ {
+ if (client && client->version == latestClientVersion) {
+ m_client = *reinterpret_cast<const LatestClientInterface*>(client);
+ return;
+ }
+
+ memset(&m_client, 0, sizeof(m_client));
+
+ if (client && client->version < latestClientVersion) {
+ auto interfaceSizes = InterfaceSizes<ClientVersions>::sizes();
+
+ memcpy(&m_client, client, interfaceSizes[client->version]);
+ }
+ }
+
+ const LatestClientInterface& client() const { return m_client; }
+
+protected:
+ LatestClientInterface m_client;
+};
+
+} // namespace API
+
</ins><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="cx"> template<typename ClientInterface, int currentVersion> class APIClient {
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIClientTraitscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/APIClientTraits.cpp (159964 => 159965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/APIClientTraits.cpp        2013-12-02 22:33:31 UTC (rev 159964)
+++ trunk/Source/WebKit2/Shared/APIClientTraits.cpp        2013-12-02 22:35:51 UTC (rev 159965)
</span><span class="lines">@@ -64,13 +64,6 @@
</span><span class="cx"> sizeof(WKPageContextMenuClient)
</span><span class="cx"> };
</span><span class="cx">
</span><del>-const size_t APIClientTraits<WKPageLoaderClient>::interfaceSizesByVersion[] = {
- offsetof(WKPageLoaderClient, didDetectXSSForFrame),
- offsetof(WKPageLoaderClient, didReceiveIntentForFrame_unavailable),
- offsetof(WKPageLoaderClient, pluginLoadPolicy),
- sizeof(WKPageLoaderClient)
-};
-
</del><span class="cx"> const size_t APIClientTraits<WKPagePolicyClient>::interfaceSizesByVersion[] = {
</span><span class="cx"> offsetof(WKPagePolicyClient, decidePolicyForNavigationAction),
</span><span class="cx"> sizeof(WKPagePolicyClient)
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIClientTraitsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/APIClientTraits.h (159964 => 159965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/APIClientTraits.h        2013-12-02 22:33:31 UTC (rev 159964)
+++ trunk/Source/WebKit2/Shared/APIClientTraits.h        2013-12-02 22:35:51 UTC (rev 159965)
</span><span class="lines">@@ -64,10 +64,6 @@
</span><span class="cx"> static const size_t interfaceSizesByVersion[4];
</span><span class="cx"> };
</span><span class="cx">
</span><del>-template<> struct APIClientTraits<WKPageLoaderClient> {
- static const size_t interfaceSizesByVersion[4];
-};
-
</del><span class="cx"> template<> struct APIClientTraits<WKPagePolicyClient> {
</span><span class="cx"> static const size_t interfaceSizesByVersion[2];
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (159964 => 159965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2013-12-02 22:33:31 UTC (rev 159964)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2013-12-02 22:35:51 UTC (rev 159965)
</span><span class="lines">@@ -653,7 +653,7 @@
</span><span class="cx">
</span><span class="cx"> void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClient* wkClient)
</span><span class="cx"> {
</span><del>- toImpl(pageRef)->initializeLoaderClient(wkClient);
</del><ins>+ toImpl(pageRef)->initializeLoaderClient(reinterpret_cast<const WKPageLoaderClientBase*>(wkClient));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WKPageSetPagePolicyClient(WKPageRef pageRef, const WKPagePolicyClient* wkClient)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPageLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h (159964 => 159965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h        2013-12-02 22:33:31 UTC (rev 159964)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h        2013-12-02 22:35:51 UTC (rev 159965)
</span><span class="lines">@@ -72,9 +72,13 @@
</span><span class="cx"> typedef void (*WKPagePluginDidFailCallback_deprecatedForUseWithV1)(WKPageRef page, WKErrorCode errorCode, WKStringRef mimeType, WKStringRef pluginIdentifier, WKStringRef pluginVersion, const void* clientInfo);
</span><span class="cx"> typedef WKPluginLoadPolicy (*WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2)(WKPageRef page, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInfoDictionary, const void* clientInfo);
</span><span class="cx">
</span><del>-struct WKPageLoaderClient {
</del><ins>+typedef struct WKPageLoaderClientBase {
</ins><span class="cx"> int version;
</span><span class="cx"> const void * clientInfo;
</span><ins>+} WKPageLoaderClientBase;
+
+typedef struct WKPageLoaderClientV0 {
+ WKPageLoaderClientBase base;
</ins><span class="cx"> WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
</span><span class="cx"> WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
</span><span class="cx"> WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
</span><span class="lines">@@ -104,7 +108,40 @@
</span><span class="cx"> WKPageDidChangeBackForwardListCallback didChangeBackForwardList;
</span><span class="cx"> WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
</span><span class="cx"> WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
</span><ins>+} WKPageLoaderClientV0;
</ins><span class="cx">
</span><ins>+typedef struct WKPageLoaderClientV1 {
+ WKPageLoaderClientBase base;
+ WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
+ WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
+ WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
+ WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame;
+ WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame;
+ WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame;
+ WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame;
+ WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame;
+ WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame;
+ WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame;
+ WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame;
+ WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy;
+ WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame;
+ WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame;
+ WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame;
+ WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame;
+
+ // FIXME: Move to progress client.
+ WKPageLoaderClientCallback didStartProgress;
+ WKPageLoaderClientCallback didChangeProgress;
+ WKPageLoaderClientCallback didFinishProgress;
+
+ // FIXME: These three functions should not be part of this client.
+ WKPageLoaderClientCallback processDidBecomeUnresponsive;
+ WKPageLoaderClientCallback processDidBecomeResponsive;
+ WKPageLoaderClientCallback processDidCrash;
+ WKPageDidChangeBackForwardListCallback didChangeBackForwardList;
+ WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
+ WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
+
</ins><span class="cx"> // Version 1
</span><span class="cx"> WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
</span><span class="cx">
</span><span class="lines">@@ -114,7 +151,50 @@
</span><span class="cx">
</span><span class="cx"> WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
</span><span class="cx"> WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
</span><ins>+} WKPageLoaderClientV1;
</ins><span class="cx">
</span><ins>+typedef struct WKPageLoaderClientV2 {
+ WKPageLoaderClientBase base;
+ WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
+ WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
+ WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
+ WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame;
+ WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame;
+ WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame;
+ WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame;
+ WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame;
+ WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame;
+ WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame;
+ WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame;
+ WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy;
+ WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame;
+ WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame;
+ WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame;
+ WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame;
+
+ // FIXME: Move to progress client.
+ WKPageLoaderClientCallback didStartProgress;
+ WKPageLoaderClientCallback didChangeProgress;
+ WKPageLoaderClientCallback didFinishProgress;
+
+ // FIXME: These three functions should not be part of this client.
+ WKPageLoaderClientCallback processDidBecomeUnresponsive;
+ WKPageLoaderClientCallback processDidBecomeResponsive;
+ WKPageLoaderClientCallback processDidCrash;
+ WKPageDidChangeBackForwardListCallback didChangeBackForwardList;
+ WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
+ WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
+
+ // Version 1
+ WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
+
+ void* didNewFirstVisuallyNonEmptyLayout_unavailable;
+
+ WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem;
+
+ WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
+ WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
+
</ins><span class="cx"> // Version 2
</span><span class="cx"> void (*didReceiveIntentForFrame_unavailable)(void);
</span><span class="cx"> void (*registerIntentServiceForFrame_unavailable)(void);
</span><span class="lines">@@ -122,15 +202,119 @@
</span><span class="cx"> WKPageDidLayoutCallback didLayout;
</span><span class="cx"> WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2;
</span><span class="cx"> WKPagePluginDidFailCallback pluginDidFail;
</span><ins>+} WKPageLoaderClientV2;
</ins><span class="cx">
</span><ins>+typedef struct WKPageLoaderClientV3 {
+ WKPageLoaderClientBase base;
+ WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
+ WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
+ WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
+ WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame;
+ WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame;
+ WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame;
+ WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame;
+ WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame;
+ WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame;
+ WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame;
+ WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame;
+ WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy;
+ WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame;
+ WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame;
+ WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame;
+ WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame;
+
+ // FIXME: Move to progress client.
+ WKPageLoaderClientCallback didStartProgress;
+ WKPageLoaderClientCallback didChangeProgress;
+ WKPageLoaderClientCallback didFinishProgress;
+
+ // FIXME: These three functions should not be part of this client.
+ WKPageLoaderClientCallback processDidBecomeUnresponsive;
+ WKPageLoaderClientCallback processDidBecomeResponsive;
+ WKPageLoaderClientCallback processDidCrash;
+ WKPageDidChangeBackForwardListCallback didChangeBackForwardList;
+ WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
+ WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
+
+ // Version 1
+ WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
+
+ void* didNewFirstVisuallyNonEmptyLayout_unavailable;
+
+ WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem;
+
+ WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
+ WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
+
+ // Version 2
+ void (*didReceiveIntentForFrame_unavailable)(void);
+ void (*registerIntentServiceForFrame_unavailable)(void);
+
+ WKPageDidLayoutCallback didLayout;
+ WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2;
+ WKPagePluginDidFailCallback pluginDidFail;
+
</ins><span class="cx"> // Version 3
</span><span class="cx"> WKPagePluginLoadPolicyCallback pluginLoadPolicy;
</span><del>-};
-typedef struct WKPageLoaderClient WKPageLoaderClient;
</del><ins>+} WKPageLoaderClientV3;
</ins><span class="cx">
</span><ins>+// FIXME: These should be deprecated.
</ins><span class="cx"> enum { kWKPageLoaderClientCurrentVersion = 3 };
</span><ins>+typedef struct WKPageLoaderClient {
+ int version;
+ const void * clientInfo;
+ WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
+ WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
+ WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
+ WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame;
+ WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame;
+ WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame;
+ WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame;
+ WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame;
+ WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame;
+ WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame;
+ WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame;
+ WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy;
+ WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame;
+ WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame;
+ WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame;
+ WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame;
</ins><span class="cx">
</span><ins>+ // FIXME: Move to progress client.
+ WKPageLoaderClientCallback didStartProgress;
+ WKPageLoaderClientCallback didChangeProgress;
+ WKPageLoaderClientCallback didFinishProgress;
</ins><span class="cx">
</span><ins>+ // FIXME: These three functions should not be part of this client.
+ WKPageLoaderClientCallback processDidBecomeUnresponsive;
+ WKPageLoaderClientCallback processDidBecomeResponsive;
+ WKPageLoaderClientCallback processDidCrash;
+ WKPageDidChangeBackForwardListCallback didChangeBackForwardList;
+ WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
+ WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
+
+ // Version 1
+ WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
+
+ void* didNewFirstVisuallyNonEmptyLayout_unavailable;
+
+ WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem;
+
+ WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
+ WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
+
+ // Version 2
+ void (*didReceiveIntentForFrame_unavailable)(void);
+ void (*registerIntentServiceForFrame_unavailable)(void);
+
+ WKPageDidLayoutCallback didLayout;
+ WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2;
+ WKPagePluginDidFailCallback pluginDidFail;
+
+ // Version 3
+ WKPagePluginLoadPolicyCallback pluginLoadPolicy;
+} WKPageLoaderClient;
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKBrowsingContextControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm (159964 => 159965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm        2013-12-02 22:33:31 UTC (rev 159964)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm        2013-12-02 22:35:51 UTC (rev 159965)
</span><span class="lines">@@ -435,11 +435,11 @@
</span><span class="cx">
</span><span class="cx"> static void setUpPageLoaderClient(WKBrowsingContextController *browsingContext, WebPageProxy& page)
</span><span class="cx"> {
</span><del>- WKPageLoaderClient loaderClient;
</del><ins>+ WKPageLoaderClientV3 loaderClient;
</ins><span class="cx"> memset(&loaderClient, 0, sizeof(loaderClient));
</span><span class="cx">
</span><del>- loaderClient.version = kWKPageLoaderClientCurrentVersion;
- loaderClient.clientInfo = browsingContext;
</del><ins>+ loaderClient.base.version = 3;
+ loaderClient.base.clientInfo = browsingContext;
</ins><span class="cx"> loaderClient.didStartProvisionalLoadForFrame = didStartProvisionalLoadForFrame;
</span><span class="cx"> loaderClient.didReceiveServerRedirectForProvisionalLoadForFrame = didReceiveServerRedirectForProvisionalLoadForFrame;
</span><span class="cx"> loaderClient.didFailProvisionalLoadWithErrorForFrame = didFailProvisionalLoadWithErrorForFrame;
</span><span class="lines">@@ -452,7 +452,7 @@
</span><span class="cx"> loaderClient.didFinishProgress = didFinishProgress;
</span><span class="cx"> loaderClient.didChangeBackForwardList = didChangeBackForwardList;
</span><span class="cx">
</span><del>- page.initializeLoaderClient(&loaderClient);
</del><ins>+ page.initializeLoaderClient(&loaderClient.base);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static WKPolicyDecisionHandler makePolicyDecisionBlock(WKFramePolicyListenerRef listener)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp (159964 => 159965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp        2013-12-02 22:33:31 UTC (rev 159964)
+++ trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp        2013-12-02 22:35:51 UTC (rev 159965)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> if (!m_client.didStartProvisionalLoadForFrame)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didStartProvisionalLoadForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.didStartProvisionalLoadForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame(WebPageProxy* page, WebFrameProxy* frame, API::Object* userData)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> if (!m_client.didReceiveServerRedirectForProvisionalLoadForFrame)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didReceiveServerRedirectForProvisionalLoadForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.didReceiveServerRedirectForProvisionalLoadForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didFailProvisionalLoadWithErrorForFrame(WebPageProxy* page, WebFrameProxy* frame, const ResourceError& error, API::Object* userData)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx"> if (!m_client.didFailProvisionalLoadWithErrorForFrame)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didFailProvisionalLoadWithErrorForFrame(toAPI(page), toAPI(frame), toAPI(error), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.didFailProvisionalLoadWithErrorForFrame(toAPI(page), toAPI(frame), toAPI(error), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didCommitLoadForFrame(WebPageProxy* page, WebFrameProxy* frame, API::Object* userData)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> if (!m_client.didCommitLoadForFrame)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didCommitLoadForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.didCommitLoadForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didFinishDocumentLoadForFrame(WebPageProxy* page, WebFrameProxy* frame, API::Object* userData)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> if (!m_client.didFinishDocumentLoadForFrame)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didFinishDocumentLoadForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.didFinishDocumentLoadForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didFinishLoadForFrame(WebPageProxy* page, WebFrameProxy* frame, API::Object* userData)
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> if (!m_client.didFinishLoadForFrame)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didFinishLoadForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.didFinishLoadForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didFailLoadWithErrorForFrame(WebPageProxy* page, WebFrameProxy* frame, const ResourceError& error, API::Object* userData)
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> if (!m_client.didFailLoadWithErrorForFrame)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didFailLoadWithErrorForFrame(toAPI(page), toAPI(frame), toAPI(error), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.didFailLoadWithErrorForFrame(toAPI(page), toAPI(frame), toAPI(error), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didSameDocumentNavigationForFrame(WebPageProxy* page, WebFrameProxy* frame, SameDocumentNavigationType type, API::Object* userData)
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx"> if (!m_client.didSameDocumentNavigationForFrame)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didSameDocumentNavigationForFrame(toAPI(page), toAPI(frame), toAPI(type), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.didSameDocumentNavigationForFrame(toAPI(page), toAPI(frame), toAPI(type), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didReceiveTitleForFrame(WebPageProxy* page, const String& title, WebFrameProxy* frame, API::Object* userData)
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx"> if (!m_client.didReceiveTitleForFrame)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didReceiveTitleForFrame(toAPI(page), toAPI(title.impl()), toAPI(frame), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.didReceiveTitleForFrame(toAPI(page), toAPI(title.impl()), toAPI(frame), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didFirstLayoutForFrame(WebPageProxy* page, WebFrameProxy* frame, API::Object* userData)
</span><span class="lines">@@ -115,7 +115,7 @@
</span><span class="cx"> if (!m_client.didFirstLayoutForFrame)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didFirstLayoutForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.didFirstLayoutForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame(WebPageProxy* page, WebFrameProxy* frame, API::Object* userData)
</span><span class="lines">@@ -123,7 +123,7 @@
</span><span class="cx"> if (!m_client.didFirstVisuallyNonEmptyLayoutForFrame)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didFirstVisuallyNonEmptyLayoutForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.didFirstVisuallyNonEmptyLayoutForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didLayout(WebPageProxy* page, LayoutMilestones milestones, API::Object* userData)
</span><span class="lines">@@ -131,7 +131,7 @@
</span><span class="cx"> if (!m_client.didLayout)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didLayout(toAPI(page), toWKLayoutMilestones(milestones), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.didLayout(toAPI(page), toWKLayoutMilestones(milestones), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didRemoveFrameFromHierarchy(WebPageProxy* page, WebFrameProxy* frame, API::Object* userData)
</span><span class="lines">@@ -139,7 +139,7 @@
</span><span class="cx"> if (!m_client.didRemoveFrameFromHierarchy)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didRemoveFrameFromHierarchy(toAPI(page), toAPI(frame), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.didRemoveFrameFromHierarchy(toAPI(page), toAPI(frame), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didDisplayInsecureContentForFrame(WebPageProxy* page, WebFrameProxy* frame, API::Object* userData)
</span><span class="lines">@@ -147,7 +147,7 @@
</span><span class="cx"> if (!m_client.didDisplayInsecureContentForFrame)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didDisplayInsecureContentForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.didDisplayInsecureContentForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didRunInsecureContentForFrame(WebPageProxy* page, WebFrameProxy* frame, API::Object* userData)
</span><span class="lines">@@ -155,7 +155,7 @@
</span><span class="cx"> if (!m_client.didRunInsecureContentForFrame)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didRunInsecureContentForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.didRunInsecureContentForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didDetectXSSForFrame(WebPageProxy* page, WebFrameProxy* frame, API::Object* userData)
</span><span class="lines">@@ -163,7 +163,7 @@
</span><span class="cx"> if (!m_client.didDetectXSSForFrame)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didDetectXSSForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.didDetectXSSForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebLoaderClient::canAuthenticateAgainstProtectionSpaceInFrame(WebPageProxy* page, WebFrameProxy* frame, WebProtectionSpace* protectionSpace)
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx"> if (!m_client.canAuthenticateAgainstProtectionSpaceInFrame)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- return m_client.canAuthenticateAgainstProtectionSpaceInFrame(toAPI(page), toAPI(frame), toAPI(protectionSpace), m_client.clientInfo);
</del><ins>+ return m_client.canAuthenticateAgainstProtectionSpaceInFrame(toAPI(page), toAPI(frame), toAPI(protectionSpace), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didReceiveAuthenticationChallengeInFrame(WebPageProxy* page, WebFrameProxy* frame, AuthenticationChallengeProxy* authenticationChallenge)
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx"> if (!m_client.didReceiveAuthenticationChallengeInFrame)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didReceiveAuthenticationChallengeInFrame(toAPI(page), toAPI(frame), toAPI(authenticationChallenge), m_client.clientInfo);
</del><ins>+ m_client.didReceiveAuthenticationChallengeInFrame(toAPI(page), toAPI(frame), toAPI(authenticationChallenge), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didStartProgress(WebPageProxy* page)
</span><span class="lines">@@ -187,7 +187,7 @@
</span><span class="cx"> if (!m_client.didStartProgress)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didStartProgress(toAPI(page), m_client.clientInfo);
</del><ins>+ m_client.didStartProgress(toAPI(page), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didChangeProgress(WebPageProxy* page)
</span><span class="lines">@@ -195,7 +195,7 @@
</span><span class="cx"> if (!m_client.didChangeProgress)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didChangeProgress(toAPI(page), m_client.clientInfo);
</del><ins>+ m_client.didChangeProgress(toAPI(page), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didFinishProgress(WebPageProxy* page)
</span><span class="lines">@@ -203,7 +203,7 @@
</span><span class="cx"> if (!m_client.didFinishProgress)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didFinishProgress(toAPI(page), m_client.clientInfo);
</del><ins>+ m_client.didFinishProgress(toAPI(page), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::processDidBecomeUnresponsive(WebPageProxy* page)
</span><span class="lines">@@ -211,7 +211,7 @@
</span><span class="cx"> if (!m_client.processDidBecomeUnresponsive)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.processDidBecomeUnresponsive(toAPI(page), m_client.clientInfo);
</del><ins>+ m_client.processDidBecomeUnresponsive(toAPI(page), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::interactionOccurredWhileProcessUnresponsive(WebPageProxy* page)
</span><span class="lines">@@ -219,7 +219,7 @@
</span><span class="cx"> if (!m_client.interactionOccurredWhileProcessUnresponsive)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.interactionOccurredWhileProcessUnresponsive(toAPI(page), m_client.clientInfo);
</del><ins>+ m_client.interactionOccurredWhileProcessUnresponsive(toAPI(page), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::processDidBecomeResponsive(WebPageProxy* page)
</span><span class="lines">@@ -227,7 +227,7 @@
</span><span class="cx"> if (!m_client.processDidBecomeResponsive)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.processDidBecomeResponsive(toAPI(page), m_client.clientInfo);
</del><ins>+ m_client.processDidBecomeResponsive(toAPI(page), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::processDidCrash(WebPageProxy* page)
</span><span class="lines">@@ -235,7 +235,7 @@
</span><span class="cx"> if (!m_client.processDidCrash)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.processDidCrash(toAPI(page), m_client.clientInfo);
</del><ins>+ m_client.processDidCrash(toAPI(page), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didChangeBackForwardList(WebPageProxy* page, WebBackForwardListItem* addedItem, Vector<RefPtr<API::Object>>* removedItems)
</span><span class="lines">@@ -247,7 +247,7 @@
</span><span class="cx"> if (removedItems && !removedItems->isEmpty())
</span><span class="cx"> removedItemsArray = API::Array::create(std::move(*removedItems));
</span><span class="cx">
</span><del>- m_client.didChangeBackForwardList(toAPI(page), toAPI(addedItem), toAPI(removedItemsArray.get()), m_client.clientInfo);
</del><ins>+ m_client.didChangeBackForwardList(toAPI(page), toAPI(addedItem), toAPI(removedItemsArray.get()), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebLoaderClient::shouldGoToBackForwardListItem(WebPageProxy* page, WebBackForwardListItem* item)
</span><span class="lines">@@ -255,16 +255,16 @@
</span><span class="cx"> // We should only even considering sending the shouldGoToBackForwardListItem() client callback
</span><span class="cx"> // for version 0 clients. Later versioned clients should get willGoToBackForwardListItem() instead,
</span><span class="cx"> // but due to XPC race conditions this one might have been called instead.
</span><del>- if (m_client.version > 0 || !m_client.shouldGoToBackForwardListItem)
</del><ins>+ if (m_client.base.version > 0 || !m_client.shouldGoToBackForwardListItem)
</ins><span class="cx"> return true;
</span><span class="cx">
</span><del>- return m_client.shouldGoToBackForwardListItem(toAPI(page), toAPI(item), m_client.clientInfo);
</del><ins>+ return m_client.shouldGoToBackForwardListItem(toAPI(page), toAPI(item), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::willGoToBackForwardListItem(WebPageProxy* page, WebBackForwardListItem* item, API::Object* userData)
</span><span class="cx"> {
</span><span class="cx"> if (m_client.willGoToBackForwardListItem)
</span><del>- m_client.willGoToBackForwardListItem(toAPI(page), toAPI(item), toAPI(userData), m_client.clientInfo);
</del><ins>+ m_client.willGoToBackForwardListItem(toAPI(page), toAPI(item), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="lines">@@ -275,7 +275,7 @@
</span><span class="cx"> m_client.didFailToInitializePlugin_deprecatedForUseWithV0(
</span><span class="cx"> toAPI(page),
</span><span class="cx"> toAPI(pluginInformation->get<WebString>(pluginInformationMIMETypeKey())),
</span><del>- m_client.clientInfo);
</del><ins>+ m_client.base.clientInfo);
</ins><span class="cx">
</span><span class="cx"> if (m_client.pluginDidFail_deprecatedForUseWithV1)
</span><span class="cx"> m_client.pluginDidFail_deprecatedForUseWithV1(
</span><span class="lines">@@ -284,14 +284,14 @@
</span><span class="cx"> toAPI(pluginInformation->get<WebString>(pluginInformationMIMETypeKey())),
</span><span class="cx"> 0,
</span><span class="cx"> 0,
</span><del>- m_client.clientInfo);
</del><ins>+ m_client.base.clientInfo);
</ins><span class="cx">
</span><span class="cx"> if (m_client.pluginDidFail)
</span><span class="cx"> m_client.pluginDidFail(
</span><span class="cx"> toAPI(page),
</span><span class="cx"> kWKErrorCodeCannotLoadPlugIn,
</span><span class="cx"> toAPI(pluginInformation),
</span><del>- m_client.clientInfo);
</del><ins>+ m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebLoaderClient::didBlockInsecurePluginVersion(WebPageProxy* page, ImmutableDictionary* pluginInformation)
</span><span class="lines">@@ -303,14 +303,14 @@
</span><span class="cx"> toAPI(pluginInformation->get<WebString>(pluginInformationMIMETypeKey())),
</span><span class="cx"> toAPI(pluginInformation->get<WebString>(pluginInformationBundleIdentifierKey())),
</span><span class="cx"> toAPI(pluginInformation->get<WebString>(pluginInformationBundleVersionKey())),
</span><del>- m_client.clientInfo);
</del><ins>+ m_client.base.clientInfo);
</ins><span class="cx">
</span><span class="cx"> if (m_client.pluginDidFail)
</span><span class="cx"> m_client.pluginDidFail(
</span><span class="cx"> toAPI(page),
</span><span class="cx"> kWKErrorCodeInsecurePlugInVersion,
</span><span class="cx"> toAPI(pluginInformation),
</span><del>- m_client.clientInfo);
</del><ins>+ m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PluginModuleLoadPolicy WebLoaderClient::pluginLoadPolicy(WebPageProxy* page, PluginModuleLoadPolicy currentPluginLoadPolicy, ImmutableDictionary* pluginInformation, String& unavailabilityDescription)
</span><span class="lines">@@ -319,9 +319,9 @@
</span><span class="cx"> PluginModuleLoadPolicy loadPolicy = currentPluginLoadPolicy;
</span><span class="cx">
</span><span class="cx"> if (m_client.pluginLoadPolicy_deprecatedForUseWithV2)
</span><del>- loadPolicy = toPluginModuleLoadPolicy(m_client.pluginLoadPolicy_deprecatedForUseWithV2(toAPI(page), toWKPluginLoadPolicy(currentPluginLoadPolicy), toAPI(pluginInformation), m_client.clientInfo));
</del><ins>+ loadPolicy = toPluginModuleLoadPolicy(m_client.pluginLoadPolicy_deprecatedForUseWithV2(toAPI(page), toWKPluginLoadPolicy(currentPluginLoadPolicy), toAPI(pluginInformation), m_client.base.clientInfo));
</ins><span class="cx"> else if (m_client.pluginLoadPolicy)
</span><del>- loadPolicy = toPluginModuleLoadPolicy(m_client.pluginLoadPolicy(toAPI(page), toWKPluginLoadPolicy(currentPluginLoadPolicy), toAPI(pluginInformation), &unavailabilityDescriptionOut, m_client.clientInfo));
</del><ins>+ loadPolicy = toPluginModuleLoadPolicy(m_client.pluginLoadPolicy(toAPI(page), toWKPluginLoadPolicy(currentPluginLoadPolicy), toAPI(pluginInformation), &unavailabilityDescriptionOut, m_client.base.clientInfo));
</ins><span class="cx">
</span><span class="cx"> if (unavailabilityDescriptionOut) {
</span><span class="cx"> RefPtr<WebString> webUnavailabilityDescription = adoptRef(toImpl(unavailabilityDescriptionOut));
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebLoaderClient.h (159964 => 159965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebLoaderClient.h        2013-12-02 22:33:31 UTC (rev 159964)
+++ trunk/Source/WebKit2/UIProcess/WebLoaderClient.h        2013-12-02 22:35:51 UTC (rev 159965)
</span><span class="lines">@@ -37,6 +37,11 @@
</span><span class="cx">
</span><span class="cx"> namespace API {
</span><span class="cx"> class Object;
</span><ins>+
+template<> struct ClientTraits<WKPageLoaderClientBase> {
+ typedef std::tuple<WKPageLoaderClientV0, WKPageLoaderClientV1, WKPageLoaderClientV2, WKPageLoaderClientV3> Versions;
+};
+
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -53,7 +58,7 @@
</span><span class="cx"> class WebPageProxy;
</span><span class="cx"> class WebProtectionSpace;
</span><span class="cx">
</span><del>-class WebLoaderClient : public APIClient<WKPageLoaderClient, kWKPageLoaderClientCurrentVersion> {
</del><ins>+class WebLoaderClient : public API::Client<WKPageLoaderClientBase> {
</ins><span class="cx"> public:
</span><span class="cx"> void didStartProvisionalLoadForFrame(WebPageProxy*, WebFrameProxy*, API::Object*);
</span><span class="cx"> void didReceiveServerRedirectForProvisionalLoadForFrame(WebPageProxy*, WebFrameProxy*, API::Object*);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (159964 => 159965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2013-12-02 22:33:31 UTC (rev 159964)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2013-12-02 22:35:51 UTC (rev 159965)
</span><span class="lines">@@ -398,7 +398,7 @@
</span><span class="cx"> return API::Array::create(std::move(result));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPageProxy::initializeLoaderClient(const WKPageLoaderClient* loadClient)
</del><ins>+void WebPageProxy::initializeLoaderClient(const WKPageLoaderClientBase* loadClient)
</ins><span class="cx"> {
</span><span class="cx"> m_loaderClient.initialize(loadClient);
</span><span class="cx">
</span><span class="lines">@@ -409,9 +409,9 @@
</span><span class="cx"> // didFirstLayoutInFrame and didFirstVisuallyNonEmptyLayoutInFrame. In the meantime, this is required
</span><span class="cx"> // for backwards compatibility.
</span><span class="cx"> WebCore::LayoutMilestones milestones = 0;
</span><del>- if (loadClient->didFirstLayoutForFrame)
</del><ins>+ if (m_loaderClient.client().didFirstLayoutForFrame)
</ins><span class="cx"> milestones |= WebCore::DidFirstLayout;
</span><del>- if (loadClient->didFirstVisuallyNonEmptyLayoutForFrame)
</del><ins>+ if (m_loaderClient.client().didFirstVisuallyNonEmptyLayoutForFrame)
</ins><span class="cx"> milestones |= WebCore::DidFirstVisuallyNonEmptyLayout;
</span><span class="cx">
</span><span class="cx"> if (milestones)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (159964 => 159965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2013-12-02 22:33:31 UTC (rev 159964)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2013-12-02 22:35:51 UTC (rev 159965)
</span><span class="lines">@@ -353,7 +353,7 @@
</span><span class="cx"> void initializeFindClient(const WKPageFindClient*);
</span><span class="cx"> void initializeFindMatchesClient(const WKPageFindMatchesClient*);
</span><span class="cx"> void initializeFormClient(const WKPageFormClient*);
</span><del>- void initializeLoaderClient(const WKPageLoaderClient*);
</del><ins>+ void initializeLoaderClient(const WKPageLoaderClientBase*);
</ins><span class="cx"> void initializePolicyClient(const WKPagePolicyClient*);
</span><span class="cx"> void initializeUIClient(const WKPageUIClient*);
</span><span class="cx"> #if PLATFORM(EFL)
</span></span></pre>
</div>
</div>
</body>
</html>