<!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>[162673] 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/162673">162673</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2014-01-23 18:20:08 -0800 (Thu, 23 Jan 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Simplify API::LoaderClient management
https://bugs.webkit.org/show_bug.cgi?id=127531
Reviewed by Tim Horton.
Add default implementations to API::LoaderClient and change WebPageProxy::setLoaderClient to
always create a policy client, even if the loader client set is null. That way we don't have to null
check the loader client everywhere.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didStartProvisionalLoadForFrame):
(API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(API::LoaderClient::didCommitLoadForFrame):
(API::LoaderClient::didFinishDocumentLoadForFrame):
(API::LoaderClient::didFinishLoadForFrame):
(API::LoaderClient::didFailLoadWithErrorForFrame):
(API::LoaderClient::didSameDocumentNavigationForFrame):
(API::LoaderClient::didReceiveTitleForFrame):
(API::LoaderClient::didFirstLayoutForFrame):
(API::LoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
(API::LoaderClient::didRemoveFrameFromHierarchy):
(API::LoaderClient::didDisplayInsecureContentForFrame):
(API::LoaderClient::didRunInsecureContentForFrame):
(API::LoaderClient::didDetectXSSForFrame):
(API::LoaderClient::didLayout):
(API::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
(API::LoaderClient::didReceiveAuthenticationChallengeInFrame):
(API::LoaderClient::didStartProgress):
(API::LoaderClient::didChangeProgress):
(API::LoaderClient::didFinishProgress):
(API::LoaderClient::processDidBecomeUnresponsive):
(API::LoaderClient::interactionOccurredWhileProcessUnresponsive):
(API::LoaderClient::processDidBecomeResponsive):
(API::LoaderClient::processDidCrash):
(API::LoaderClient::didChangeBackForwardList):
(API::LoaderClient::willGoToBackForwardListItem):
(API::LoaderClient::pluginLoadPolicy):
(API::LoaderClient::didFailToInitializePlugin):
(API::LoaderClient::didBlockInsecurePluginVersion):
(API::LoaderClient::webGLLoadPolicy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setLoaderClient):
(WebKit::WebPageProxy::didChangeBackForwardList):
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::didStartProgress):
(WebKit::WebPageProxy::didChangeProgress):
(WebKit::WebPageProxy::didFinishProgress):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstLayoutForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didLayout):
(WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::didDetectXSSForFrame):
(WebKit::WebPageProxy::webGLPolicyForURL):
(WebKit::WebPageProxy::processDidBecomeUnresponsive):
(WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive):
(WebKit::WebPageProxy::processDidBecomeResponsive):
(WebKit::WebPageProxy::processDidCrash):
(WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame):
(WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
(WebKit::WebPageProxy::didFailToInitializePlugin):
(WebKit::WebPageProxy::didBlockInsecurePluginVersion):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPILoaderClienth">trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (162672 => 162673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-01-24 02:08:34 UTC (rev 162672)
+++ trunk/Source/WebKit2/ChangeLog        2014-01-24 02:20:08 UTC (rev 162673)
</span><span class="lines">@@ -1,5 +1,82 @@
</span><span class="cx"> 2014-01-23 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><ins>+ Simplify API::LoaderClient management
+ https://bugs.webkit.org/show_bug.cgi?id=127531
+
+ Reviewed by Tim Horton.
+
+ Add default implementations to API::LoaderClient and change WebPageProxy::setLoaderClient to
+ always create a policy client, even if the loader client set is null. That way we don't have to null
+ check the loader client everywhere.
+
+ * UIProcess/API/APILoaderClient.h:
+ (API::LoaderClient::didStartProvisionalLoadForFrame):
+ (API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
+ (API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
+ (API::LoaderClient::didCommitLoadForFrame):
+ (API::LoaderClient::didFinishDocumentLoadForFrame):
+ (API::LoaderClient::didFinishLoadForFrame):
+ (API::LoaderClient::didFailLoadWithErrorForFrame):
+ (API::LoaderClient::didSameDocumentNavigationForFrame):
+ (API::LoaderClient::didReceiveTitleForFrame):
+ (API::LoaderClient::didFirstLayoutForFrame):
+ (API::LoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
+ (API::LoaderClient::didRemoveFrameFromHierarchy):
+ (API::LoaderClient::didDisplayInsecureContentForFrame):
+ (API::LoaderClient::didRunInsecureContentForFrame):
+ (API::LoaderClient::didDetectXSSForFrame):
+ (API::LoaderClient::didLayout):
+ (API::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
+ (API::LoaderClient::didReceiveAuthenticationChallengeInFrame):
+ (API::LoaderClient::didStartProgress):
+ (API::LoaderClient::didChangeProgress):
+ (API::LoaderClient::didFinishProgress):
+ (API::LoaderClient::processDidBecomeUnresponsive):
+ (API::LoaderClient::interactionOccurredWhileProcessUnresponsive):
+ (API::LoaderClient::processDidBecomeResponsive):
+ (API::LoaderClient::processDidCrash):
+ (API::LoaderClient::didChangeBackForwardList):
+ (API::LoaderClient::willGoToBackForwardListItem):
+ (API::LoaderClient::pluginLoadPolicy):
+ (API::LoaderClient::didFailToInitializePlugin):
+ (API::LoaderClient::didBlockInsecurePluginVersion):
+ (API::LoaderClient::webGLLoadPolicy):
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::setLoaderClient):
+ (WebKit::WebPageProxy::didChangeBackForwardList):
+ (WebKit::WebPageProxy::willGoToBackForwardListItem):
+ (WebKit::WebPageProxy::findPlugin):
+ (WebKit::WebPageProxy::didStartProgress):
+ (WebKit::WebPageProxy::didChangeProgress):
+ (WebKit::WebPageProxy::didFinishProgress):
+ (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
+ (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
+ (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
+ (WebKit::WebPageProxy::didCommitLoadForFrame):
+ (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
+ (WebKit::WebPageProxy::didFinishLoadForFrame):
+ (WebKit::WebPageProxy::didFailLoadForFrame):
+ (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
+ (WebKit::WebPageProxy::didReceiveTitleForFrame):
+ (WebKit::WebPageProxy::didFirstLayoutForFrame):
+ (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
+ (WebKit::WebPageProxy::didLayout):
+ (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
+ (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
+ (WebKit::WebPageProxy::didRunInsecureContentForFrame):
+ (WebKit::WebPageProxy::didDetectXSSForFrame):
+ (WebKit::WebPageProxy::webGLPolicyForURL):
+ (WebKit::WebPageProxy::processDidBecomeUnresponsive):
+ (WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive):
+ (WebKit::WebPageProxy::processDidBecomeResponsive):
+ (WebKit::WebPageProxy::processDidCrash):
+ (WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame):
+ (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
+ (WebKit::WebPageProxy::didFailToInitializePlugin):
+ (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
+
+2014-01-23 Anders Carlsson <andersca@apple.com>
+
</ins><span class="cx"> Simplify API::PolicyClient management
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=127529
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPILoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h (162672 => 162673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h        2014-01-24 02:08:34 UTC (rev 162672)
+++ trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h        2014-01-24 02:20:08 UTC (rev 162673)
</span><span class="lines">@@ -53,51 +53,51 @@
</span><span class="cx"> public:
</span><span class="cx"> virtual ~LoaderClient() { }
</span><span class="cx">
</span><del>- virtual void didStartProvisionalLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
- virtual void didReceiveServerRedirectForProvisionalLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
- virtual void didFailProvisionalLoadWithErrorForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, const WebCore::ResourceError&, API::Object*) = 0;
- virtual void didCommitLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
- virtual void didFinishDocumentLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
- virtual void didFinishLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
- virtual void didFailLoadWithErrorForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, const WebCore::ResourceError&, API::Object*) = 0;
- virtual void didSameDocumentNavigationForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::SameDocumentNavigationType, API::Object*) = 0;
- virtual void didReceiveTitleForFrame(WebKit::WebPageProxy*, const WTF::String&, WebKit::WebFrameProxy*, API::Object*) = 0;
- virtual void didFirstLayoutForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
</del><ins>+ virtual void didStartProvisionalLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) { }
+ virtual void didReceiveServerRedirectForProvisionalLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) { }
+ virtual void didFailProvisionalLoadWithErrorForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, const WebCore::ResourceError&, API::Object*) { }
+ virtual void didCommitLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) { }
+ virtual void didFinishDocumentLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) { }
+ virtual void didFinishLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) { }
+ virtual void didFailLoadWithErrorForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, const WebCore::ResourceError&, API::Object*) { }
+ virtual void didSameDocumentNavigationForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::SameDocumentNavigationType, API::Object*) { }
+ virtual void didReceiveTitleForFrame(WebKit::WebPageProxy*, const WTF::String&, WebKit::WebFrameProxy*, API::Object*) { }
+ virtual void didFirstLayoutForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) { }
</ins><span class="cx">
</span><span class="cx"> // FIXME: We should consider removing didFirstVisuallyNonEmptyLayoutForFrame since it is replaced by didLayout.
</span><del>- virtual void didFirstVisuallyNonEmptyLayoutForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
</del><ins>+ virtual void didFirstVisuallyNonEmptyLayoutForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) { }
</ins><span class="cx">
</span><del>- virtual void didRemoveFrameFromHierarchy(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
- virtual void didDisplayInsecureContentForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
- virtual void didRunInsecureContentForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
- virtual void didDetectXSSForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
</del><ins>+ virtual void didRemoveFrameFromHierarchy(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) { }
+ virtual void didDisplayInsecureContentForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) { }
+ virtual void didRunInsecureContentForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) { }
+ virtual void didDetectXSSForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) { }
</ins><span class="cx">
</span><del>- virtual void didLayout(WebKit::WebPageProxy*, WebCore::LayoutMilestones, API::Object*) = 0;
</del><ins>+ virtual void didLayout(WebKit::WebPageProxy*, WebCore::LayoutMilestones, API::Object*) { }
</ins><span class="cx">
</span><del>- virtual bool canAuthenticateAgainstProtectionSpaceInFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::WebProtectionSpace*) = 0;
- virtual void didReceiveAuthenticationChallengeInFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::AuthenticationChallengeProxy*) = 0;
</del><ins>+ virtual bool canAuthenticateAgainstProtectionSpaceInFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::WebProtectionSpace*) { return false; }
+ virtual void didReceiveAuthenticationChallengeInFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::AuthenticationChallengeProxy*) { }
</ins><span class="cx">
</span><del>- virtual void didStartProgress(WebKit::WebPageProxy*) = 0;
- virtual void didChangeProgress(WebKit::WebPageProxy*)= 0;
- virtual void didFinishProgress(WebKit::WebPageProxy*)= 0;
</del><ins>+ virtual void didStartProgress(WebKit::WebPageProxy*) { }
+ virtual void didChangeProgress(WebKit::WebPageProxy*) { }
+ virtual void didFinishProgress(WebKit::WebPageProxy*) { }
</ins><span class="cx">
</span><span class="cx"> // FIXME: These three functions should not be part of this client.
</span><del>- virtual void processDidBecomeUnresponsive(WebKit::WebPageProxy*) = 0;
- virtual void interactionOccurredWhileProcessUnresponsive(WebKit::WebPageProxy*) = 0;
- virtual void processDidBecomeResponsive(WebKit::WebPageProxy*) = 0;
- virtual void processDidCrash(WebKit::WebPageProxy*) = 0;
</del><ins>+ virtual void processDidBecomeUnresponsive(WebKit::WebPageProxy*) { }
+ virtual void interactionOccurredWhileProcessUnresponsive(WebKit::WebPageProxy*) { }
+ virtual void processDidBecomeResponsive(WebKit::WebPageProxy*) { }
+ virtual void processDidCrash(WebKit::WebPageProxy*) { }
</ins><span class="cx">
</span><del>- virtual void didChangeBackForwardList(WebKit::WebPageProxy*, WebKit::WebBackForwardListItem* addedItem, Vector<RefPtr<API::Object>>* removedItems) = 0;
- virtual void willGoToBackForwardListItem(WebKit::WebPageProxy*, WebKit::WebBackForwardListItem*, API::Object*) = 0;
</del><ins>+ virtual void didChangeBackForwardList(WebKit::WebPageProxy*, WebKit::WebBackForwardListItem* addedItem, Vector<RefPtr<API::Object>>* removedItems) { }
+ virtual void willGoToBackForwardListItem(WebKit::WebPageProxy*, WebKit::WebBackForwardListItem*, API::Object*) { }
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><del>- virtual WebKit::PluginModuleLoadPolicy pluginLoadPolicy(WebKit::WebPageProxy*, WebKit::PluginModuleLoadPolicy currentPluginLoadPolicy, WebKit::ImmutableDictionary*, WTF::String& unavailabilityDescription, WTF::String& useBlockedPluginTitle) = 0;
- virtual void didFailToInitializePlugin(WebKit::WebPageProxy*, WebKit::ImmutableDictionary*) = 0;
- virtual void didBlockInsecurePluginVersion(WebKit::WebPageProxy*, WebKit::ImmutableDictionary*) = 0;
</del><ins>+ virtual WebKit::PluginModuleLoadPolicy pluginLoadPolicy(WebKit::WebPageProxy*, WebKit::PluginModuleLoadPolicy currentPluginLoadPolicy, WebKit::ImmutableDictionary*, WTF::String& unavailabilityDescription, WTF::String& useBlockedPluginTitle) { return currentPluginLoadPolicy; }
+ virtual void didFailToInitializePlugin(WebKit::WebPageProxy*, WebKit::ImmutableDictionary*) { }
+ virtual void didBlockInsecurePluginVersion(WebKit::WebPageProxy*, WebKit::ImmutableDictionary*) { }
</ins><span class="cx"> #endif // ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx">
</span><span class="cx"> #if ENABLE(WEBGL)
</span><del>- virtual WebCore::WebGLLoadPolicy webGLLoadPolicy(WebKit::WebPageProxy*, const WTF::String&) const = 0;
</del><ins>+ virtual WebCore::WebGLLoadPolicy webGLLoadPolicy(WebKit::WebPageProxy*, const WTF::String&) const { return WebCore::WebGLLoadPolicy::WebGLAllow; }
</ins><span class="cx"> #endif // ENABLE(WEBGL)
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (162672 => 162673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-01-24 02:08:34 UTC (rev 162672)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-01-24 02:20:08 UTC (rev 162673)
</span><span class="lines">@@ -402,6 +402,11 @@
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::setLoaderClient(std::unique_ptr<API::LoaderClient> loaderClient)
</span><span class="cx"> {
</span><ins>+ if (!loaderClient) {
+ m_loaderClient = std::make_unique<API::LoaderClient>();
+ return;
+ }
+
</ins><span class="cx"> m_loaderClient = std::move(loaderClient);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -822,8 +827,7 @@
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didChangeBackForwardList(WebBackForwardListItem* added, Vector<RefPtr<API::Object>>* removed)
</span><span class="cx"> {
</span><del>- if (m_loaderClient)
- m_loaderClient->didChangeBackForwardList(this, added, removed);
</del><ins>+ m_loaderClient->didChangeBackForwardList(this, added, removed);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::willGoToBackForwardListItem(uint64_t itemID, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -833,10 +837,8 @@
</span><span class="cx"> if (!decoder.decode(messageDecoder))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (WebBackForwardListItem* item = m_process->webBackForwardItem(itemID)) {
- if (m_loaderClient)
- m_loaderClient->willGoToBackForwardListItem(this, item, userData.get());
- }
</del><ins>+ if (WebBackForwardListItem* item = m_process->webBackForwardItem(itemID))
+ m_loaderClient->willGoToBackForwardListItem(this, item, userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebPageProxy::canShowMIMEType(const String& mimeType)
</span><span class="lines">@@ -1331,8 +1333,7 @@
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> RefPtr<ImmutableDictionary> pluginInformation = createPluginInformationDictionary(plugin, frameURLString, String(), pageURLString, String(), String());
</span><del>- if (m_loaderClient)
- pluginLoadPolicy = m_loaderClient->pluginLoadPolicy(this, static_cast<PluginModuleLoadPolicy>(pluginLoadPolicy), pluginInformation.get(), unavailabilityDescription, useBlockedPluginTitle);
</del><ins>+ pluginLoadPolicy = m_loaderClient->pluginLoadPolicy(this, static_cast<PluginModuleLoadPolicy>(pluginLoadPolicy), pluginInformation.get(), unavailabilityDescription, useBlockedPluginTitle);
</ins><span class="cx"> #else
</span><span class="cx"> UNUSED_PARAM(frameURLString);
</span><span class="cx"> UNUSED_PARAM(pageURLString);
</span><span class="lines">@@ -2068,8 +2069,7 @@
</span><span class="cx"> m_pageLoadState.didStartProgress(transaction);
</span><span class="cx">
</span><span class="cx"> m_pageLoadState.commitChanges();
</span><del>- if (m_loaderClient)
- m_loaderClient->didStartProgress(this);
</del><ins>+ m_loaderClient->didStartProgress(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didChangeProgress(double value)
</span><span class="lines">@@ -2078,8 +2078,7 @@
</span><span class="cx"> m_pageLoadState.didChangeProgress(transaction, value);
</span><span class="cx">
</span><span class="cx"> m_pageLoadState.commitChanges();
</span><del>- if (m_loaderClient)
- m_loaderClient->didChangeProgress(this);
</del><ins>+ m_loaderClient->didChangeProgress(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didFinishProgress()
</span><span class="lines">@@ -2088,8 +2087,7 @@
</span><span class="cx"> m_pageLoadState.didFinishProgress(transaction);
</span><span class="cx">
</span><span class="cx"> m_pageLoadState.commitChanges();
</span><del>- if (m_loaderClient)
- m_loaderClient->didFinishProgress(this);
</del><ins>+ m_loaderClient->didFinishProgress(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didStartProvisionalLoadForFrame(uint64_t frameID, const String& url, const String& unreachableURL, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -2114,8 +2112,7 @@
</span><span class="cx"> frame->didStartProvisionalLoad(url);
</span><span class="cx">
</span><span class="cx"> m_pageLoadState.commitChanges();
</span><del>- if (m_loaderClient)
- m_loaderClient->didStartProvisionalLoadForFrame(this, frame, userData.get());
</del><ins>+ m_loaderClient->didStartProvisionalLoadForFrame(this, frame, userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, const String& url, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -2137,8 +2134,7 @@
</span><span class="cx"> frame->didReceiveServerRedirectForProvisionalLoad(url);
</span><span class="cx">
</span><span class="cx"> m_pageLoadState.commitChanges();
</span><del>- if (m_loaderClient)
- m_loaderClient->didReceiveServerRedirectForProvisionalLoadForFrame(this, frame, userData.get());
</del><ins>+ m_loaderClient->didReceiveServerRedirectForProvisionalLoadForFrame(this, frame, userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didFailProvisionalLoadForFrame(uint64_t frameID, const ResourceError& error, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -2159,8 +2155,7 @@
</span><span class="cx"> frame->didFailProvisionalLoad();
</span><span class="cx">
</span><span class="cx"> m_pageLoadState.commitChanges();
</span><del>- if (m_loaderClient)
- m_loaderClient->didFailProvisionalLoadWithErrorForFrame(this, frame, error, userData.get());
</del><ins>+ m_loaderClient->didFailProvisionalLoadWithErrorForFrame(this, frame, error, userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::clearLoadDependentCallbacks()
</span><span class="lines">@@ -2213,8 +2208,7 @@
</span><span class="cx"> m_pageScaleFactor = 1;
</span><span class="cx">
</span><span class="cx"> m_pageLoadState.commitChanges();
</span><del>- if (m_loaderClient)
- m_loaderClient->didCommitLoadForFrame(this, frame, userData.get());
</del><ins>+ m_loaderClient->didCommitLoadForFrame(this, frame, userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didFinishDocumentLoadForFrame(uint64_t frameID, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -2227,8 +2221,7 @@
</span><span class="cx"> WebFrameProxy* frame = m_process->webFrame(frameID);
</span><span class="cx"> MESSAGE_CHECK(frame);
</span><span class="cx">
</span><del>- if (m_loaderClient)
- m_loaderClient->didFinishDocumentLoadForFrame(this, frame, userData.get());
</del><ins>+ m_loaderClient->didFinishDocumentLoadForFrame(this, frame, userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didFinishLoadForFrame(uint64_t frameID, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -2249,8 +2242,7 @@
</span><span class="cx"> frame->didFinishLoad();
</span><span class="cx">
</span><span class="cx"> m_pageLoadState.commitChanges();
</span><del>- if (m_loaderClient)
- m_loaderClient->didFinishLoadForFrame(this, frame, userData.get());
</del><ins>+ m_loaderClient->didFinishLoadForFrame(this, frame, userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didFailLoadForFrame(uint64_t frameID, const ResourceError& error, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -2273,8 +2265,7 @@
</span><span class="cx"> frame->didFailLoad();
</span><span class="cx">
</span><span class="cx"> m_pageLoadState.commitChanges();
</span><del>- if (m_loaderClient)
- m_loaderClient->didFailLoadWithErrorForFrame(this, frame, error, userData.get());
</del><ins>+ m_loaderClient->didFailLoadWithErrorForFrame(this, frame, error, userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didSameDocumentNavigationForFrame(uint64_t frameID, uint32_t opaqueSameDocumentNavigationType, const String& url, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -2297,8 +2288,7 @@
</span><span class="cx"> frame->didSameDocumentNavigation(url);
</span><span class="cx">
</span><span class="cx"> m_pageLoadState.commitChanges();
</span><del>- if (m_loaderClient)
- m_loaderClient->didSameDocumentNavigationForFrame(this, frame, static_cast<SameDocumentNavigationType>(opaqueSameDocumentNavigationType), userData.get());
</del><ins>+ m_loaderClient->didSameDocumentNavigationForFrame(this, frame, static_cast<SameDocumentNavigationType>(opaqueSameDocumentNavigationType), userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didReceiveTitleForFrame(uint64_t frameID, const String& title, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -2319,8 +2309,7 @@
</span><span class="cx"> frame->didChangeTitle(title);
</span><span class="cx">
</span><span class="cx"> m_pageLoadState.commitChanges();
</span><del>- if (m_loaderClient)
- m_loaderClient->didReceiveTitleForFrame(this, title, frame, userData.get());
</del><ins>+ m_loaderClient->didReceiveTitleForFrame(this, title, frame, userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didFirstLayoutForFrame(uint64_t frameID, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -2333,8 +2322,7 @@
</span><span class="cx"> WebFrameProxy* frame = m_process->webFrame(frameID);
</span><span class="cx"> MESSAGE_CHECK(frame);
</span><span class="cx">
</span><del>- if (m_loaderClient)
- m_loaderClient->didFirstLayoutForFrame(this, frame, userData.get());
</del><ins>+ m_loaderClient->didFirstLayoutForFrame(this, frame, userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -2347,8 +2335,7 @@
</span><span class="cx"> WebFrameProxy* frame = m_process->webFrame(frameID);
</span><span class="cx"> MESSAGE_CHECK(frame);
</span><span class="cx">
</span><del>- if (m_loaderClient)
- m_loaderClient->didFirstVisuallyNonEmptyLayoutForFrame(this, frame, userData.get());
</del><ins>+ m_loaderClient->didFirstVisuallyNonEmptyLayoutForFrame(this, frame, userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didLayout(uint32_t layoutMilestones, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -2358,8 +2345,7 @@
</span><span class="cx"> if (!decoder.decode(messageDecoder))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (m_loaderClient)
- m_loaderClient->didLayout(this, static_cast<LayoutMilestones>(layoutMilestones), userData.get());
</del><ins>+ m_loaderClient->didLayout(this, static_cast<LayoutMilestones>(layoutMilestones), userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didRemoveFrameFromHierarchy(uint64_t frameID, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -2372,8 +2358,7 @@
</span><span class="cx"> WebFrameProxy* frame = m_process->webFrame(frameID);
</span><span class="cx"> MESSAGE_CHECK(frame);
</span><span class="cx">
</span><del>- if (m_loaderClient)
- m_loaderClient->didRemoveFrameFromHierarchy(this, frame, userData.get());
</del><ins>+ m_loaderClient->didRemoveFrameFromHierarchy(this, frame, userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didDisplayInsecureContentForFrame(uint64_t frameID, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -2390,8 +2375,7 @@
</span><span class="cx"> m_pageLoadState.didDisplayOrRunInsecureContent(transaction);
</span><span class="cx">
</span><span class="cx"> m_pageLoadState.commitChanges();
</span><del>- if (m_loaderClient)
- m_loaderClient->didDisplayInsecureContentForFrame(this, frame, userData.get());
</del><ins>+ m_loaderClient->didDisplayInsecureContentForFrame(this, frame, userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didRunInsecureContentForFrame(uint64_t frameID, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -2408,8 +2392,7 @@
</span><span class="cx"> m_pageLoadState.didDisplayOrRunInsecureContent(transaction);
</span><span class="cx">
</span><span class="cx"> m_pageLoadState.commitChanges();
</span><del>- if (m_loaderClient)
- m_loaderClient->didRunInsecureContentForFrame(this, frame, userData.get());
</del><ins>+ m_loaderClient->didRunInsecureContentForFrame(this, frame, userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didDetectXSSForFrame(uint64_t frameID, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -2422,8 +2405,7 @@
</span><span class="cx"> WebFrameProxy* frame = m_process->webFrame(frameID);
</span><span class="cx"> MESSAGE_CHECK(frame);
</span><span class="cx">
</span><del>- if (m_loaderClient)
- m_loaderClient->didDetectXSSForFrame(this, frame, userData.get());
</del><ins>+ m_loaderClient->didDetectXSSForFrame(this, frame, userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::frameDidBecomeFrameSet(uint64_t frameID, bool value)
</span><span class="lines">@@ -2704,10 +2686,7 @@
</span><span class="cx"> #if ENABLE(WEBGL)
</span><span class="cx"> void WebPageProxy::webGLPolicyForURL(const String& url, uint32_t& loadPolicy)
</span><span class="cx"> {
</span><del>- if (!m_loaderClient)
- loadPolicy = WebGLAllow;
- else
- loadPolicy = static_cast<uint32_t>(m_loaderClient->webGLLoadPolicy(this, url));
</del><ins>+ loadPolicy = static_cast<uint32_t>(m_loaderClient->webGLLoadPolicy(this, url));
</ins><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(WEBGL)
</span><span class="cx">
</span><span class="lines">@@ -3737,8 +3716,7 @@
</span><span class="cx">
</span><span class="cx"> updateBackingStoreDiscardableState();
</span><span class="cx">
</span><del>- if (m_loaderClient)
- m_loaderClient->processDidBecomeUnresponsive(this);
</del><ins>+ m_loaderClient->processDidBecomeUnresponsive(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::interactionOccurredWhileProcessUnresponsive()
</span><span class="lines">@@ -3746,8 +3724,7 @@
</span><span class="cx"> if (!isValid())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (m_loaderClient)
- m_loaderClient->interactionOccurredWhileProcessUnresponsive(this);
</del><ins>+ m_loaderClient->interactionOccurredWhileProcessUnresponsive(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::processDidBecomeResponsive()
</span><span class="lines">@@ -3757,8 +3734,7 @@
</span><span class="cx">
</span><span class="cx"> updateBackingStoreDiscardableState();
</span><span class="cx">
</span><del>- if (m_loaderClient)
- m_loaderClient->processDidBecomeResponsive(this);
</del><ins>+ m_loaderClient->processDidBecomeResponsive(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::processDidCrash()
</span><span class="lines">@@ -3773,8 +3749,7 @@
</span><span class="cx">
</span><span class="cx"> m_pageClient.processDidCrash();
</span><span class="cx">
</span><del>- if (m_loaderClient)
- m_loaderClient->processDidCrash(this);
</del><ins>+ m_loaderClient->processDidCrash(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::resetState()
</span><span class="lines">@@ -3973,10 +3948,7 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<WebProtectionSpace> protectionSpace = WebProtectionSpace::create(coreProtectionSpace);
</span><span class="cx">
</span><del>- if (!m_loaderClient)
- canAuthenticate = false;
- else
- canAuthenticate = m_loaderClient->canAuthenticateAgainstProtectionSpaceInFrame(this, frame, protectionSpace.get());
</del><ins>+ canAuthenticate = m_loaderClient->canAuthenticateAgainstProtectionSpaceInFrame(this, frame, protectionSpace.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didReceiveAuthenticationChallenge(uint64_t frameID, const AuthenticationChallenge& coreChallenge, uint64_t challengeID)
</span><span class="lines">@@ -3992,8 +3964,7 @@
</span><span class="cx"> MESSAGE_CHECK(frame);
</span><span class="cx">
</span><span class="cx"> RefPtr<AuthenticationChallengeProxy> authenticationChallenge = prpAuthenticationChallenge;
</span><del>- if (m_loaderClient)
- m_loaderClient->didReceiveAuthenticationChallengeInFrame(this, frame, authenticationChallenge.get());
</del><ins>+ m_loaderClient->didReceiveAuthenticationChallengeInFrame(this, frame, authenticationChallenge.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply> reply)
</span><span class="lines">@@ -4151,8 +4122,7 @@
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx"> void WebPageProxy::didFailToInitializePlugin(const String& mimeType, const String& frameURLString, const String& pageURLString)
</span><span class="cx"> {
</span><del>- if (m_loaderClient)
- m_loaderClient->didFailToInitializePlugin(this, createPluginInformationDictionary(mimeType, frameURLString, pageURLString).get());
</del><ins>+ m_loaderClient->didFailToInitializePlugin(this, createPluginInformationDictionary(mimeType, frameURLString, pageURLString).get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didBlockInsecurePluginVersion(const String& mimeType, const String& pluginURLString, const String& frameURLString, const String& pageURLString, bool replacementObscured)
</span><span class="lines">@@ -4171,8 +4141,7 @@
</span><span class="cx"> UNUSED_PARAM(replacementObscured);
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- if (m_loaderClient)
- m_loaderClient->didBlockInsecurePluginVersion(this, pluginInformation.get());
</del><ins>+ m_loaderClient->didBlockInsecurePluginVersion(this, pluginInformation.get());
</ins><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>