Title: [160495] trunk/Source/WebKit2
Revision
160495
Author
[email protected]
Date
2013-12-12 10:41:55 -0800 (Thu, 12 Dec 2013)

Log Message

[Cocoa] Navigation action information for policy decisions is missing the original request
https://bugs.webkit.org/show_bug.cgi?id=125612

Reviewed by Anders Carlsson.

* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::callMemberFunction): Added template with additional message parameter.
* UIProcess/API/C/WKPagePolicyClientInternal.h: Added. Defines a new version of the client
interface with a new version of the policy decision callback.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(setUpPagePolicyClient): Use the new internal version of the client. Pass the original
request in the action information dictionary under a new key.
* UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h: Declared new action information
key.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction): Added originalRequest parameter,
which is passed to the policy client.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Added originalRequest parameter in
DecidePolicyForNavigationAction.
* UIProcess/WebPolicyClient.cpp:
(WebKit::WebPolicyClient::decidePolicyForNavigationAction): Pass the original request to
the client.
* UIProcess/WebPolicyClient.h:
* WebKit2.xcodeproj/project.pbxproj: Added reference to new file.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Send the original
request from the navigation action to the UI process.

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (160494 => 160495)


--- trunk/Source/WebKit2/ChangeLog	2013-12-12 18:41:35 UTC (rev 160494)
+++ trunk/Source/WebKit2/ChangeLog	2013-12-12 18:41:55 UTC (rev 160495)
@@ -1,3 +1,34 @@
+2013-12-12  Dan Bernstein  <[email protected]>
+
+        [Cocoa] Navigation action information for policy decisions is missing the original request
+        https://bugs.webkit.org/show_bug.cgi?id=125612
+
+        Reviewed by Anders Carlsson.
+
+        * Platform/CoreIPC/HandleMessage.h:
+        (CoreIPC::callMemberFunction): Added template with additional message parameter.
+        * UIProcess/API/C/WKPagePolicyClientInternal.h: Added. Defines a new version of the client
+        interface with a new version of the policy decision callback.
+        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
+        (setUpPagePolicyClient): Use the new internal version of the client. Pass the original
+        request in the action information dictionary under a new key.
+        * UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h: Declared new action information
+        key.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::decidePolicyForNavigationAction): Added originalRequest parameter,
+        which is passed to the policy client.
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in: Added originalRequest parameter in
+        DecidePolicyForNavigationAction.
+        * UIProcess/WebPolicyClient.cpp:
+        (WebKit::WebPolicyClient::decidePolicyForNavigationAction): Pass the original request to
+        the client.
+        * UIProcess/WebPolicyClient.h:
+        * WebKit2.xcodeproj/project.pbxproj: Added reference to new file.
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Send the original
+        request from the navigation action to the UI process.
+
 2013-12-12  Zan Dobersek  <[email protected]>
 
         [Autotools] Prepend the WebCore layer archives' names with 'lib'

Modified: trunk/Source/WebKit2/Platform/CoreIPC/HandleMessage.h (160494 => 160495)


--- trunk/Source/WebKit2/Platform/CoreIPC/HandleMessage.h	2013-12-12 18:41:35 UTC (rev 160494)
+++ trunk/Source/WebKit2/Platform/CoreIPC/HandleMessage.h	2013-12-12 18:41:55 UTC (rev 160495)
@@ -364,6 +364,12 @@
     (object->*function)(std::get<0>(args), std::get<1>(args), std::get<2>(args), std::get<3>(args), std::get<4>(args), std::get<5>(args), std::get<6>(args), decoder, std::get<0>(replyArgs), std::get<1>(replyArgs), std::get<2>(replyArgs));
 }
 
+template<typename C, typename MF, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename R1, typename R2, typename R3>
+void callMemberFunction(std::tuple<P1, P2, P3, P4, P5, P6, P7, P8>&& args, MessageDecoder& decoder, std::tuple<R1, R2, R3>& replyArgs, C* object, MF function)
+{
+    (object->*function)(std::get<0>(args), std::get<1>(args), std::get<2>(args), std::get<3>(args), std::get<4>(args), std::get<5>(args), std::get<6>(args), std::get<7>(args), decoder, std::get<0>(replyArgs), std::get<1>(replyArgs), std::get<2>(replyArgs));
+}
+
 // Main dispatch functions
 template<typename T, typename C, typename MF>
 void handleMessage(MessageDecoder& decoder, C* object, MF function)

Added: trunk/Source/WebKit2/UIProcess/API/C/WKPagePolicyClientInternal.h (0 => 160495)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPagePolicyClientInternal.h	                        (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPagePolicyClientInternal.h	2013-12-12 18:41:55 UTC (rev 160495)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WKPagePolicyClientInternal_h
+#define WKPagePolicyClientInternal_h
+
+#include "WKPagePolicyClient.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void (*WKPageDecidePolicyForNavigationActionCallback_internal)(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKFrameRef originatingFrame, WKURLRequestRef originalRequest, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
+
+typedef struct WKPagePolicyClientInternal {
+    WKPagePolicyClientBase                                               base;
+
+    // Version 0.
+    WKPageDecidePolicyForNavigationActionCallback_deprecatedForUseWithV0 decidePolicyForNavigationAction_deprecatedForUseWithV0;
+    WKPageDecidePolicyForNewWindowActionCallback                         decidePolicyForNewWindowAction;
+    WKPageDecidePolicyForResponseCallback_deprecatedForUseWithV0         decidePolicyForResponse_deprecatedForUseWithV0;
+    WKPageUnableToImplementPolicyCallback                                unableToImplementPolicy;
+
+    // Version 1.
+    WKPageDecidePolicyForNavigationActionCallback                        decidePolicyForNavigationAction_deprecatedForUseWithV1;
+    WKPageDecidePolicyForResponseCallback                                decidePolicyForResponse;
+
+    // Internal.
+    WKPageDecidePolicyForNavigationActionCallback_internal               decidePolicyForNavigationAction;
+} WKPagePolicyClientInternal;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // WKPagePolicyClientInternal_h

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm (160494 => 160495)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm	2013-12-12 18:41:35 UTC (rev 160494)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm	2013-12-12 18:41:55 UTC (rev 160495)
@@ -111,6 +111,7 @@
 NSString * const WKActionNavigationTypeKey = @"WKActionNavigationTypeKey";
 NSString * const WKActionMouseButtonKey = @"WKActionMouseButtonKey";
 NSString * const WKActionModifierFlagsKey = @"WKActionModifierFlagsKey";
+NSString * const WKActionOriginalURLRequestKey = @"WKActionOriginalURLRequestKey";
 NSString * const WKActionURLRequestKey = @"WKActionURLRequestKey";
 NSString * const WKActionURLResponseKey = @"WKActionURLResponseKey";
 NSString * const WKActionFrameNameKey = @"WKActionFrameNameKey";
@@ -561,13 +562,13 @@
 
 static void setUpPagePolicyClient(WKBrowsingContextController *browsingContext, WebPageProxy& page)
 {
-    WKPagePolicyClientV1 policyClient;
+    WKPagePolicyClientInternal policyClient;
     memset(&policyClient, 0, sizeof(policyClient));
 
-    policyClient.base.version = 1;
+    policyClient.base.version = 2;
     policyClient.base.clientInfo = browsingContext;
 
-    policyClient.decidePolicyForNavigationAction = [](WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKFrameRef originatingFrame, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
+    policyClient.decidePolicyForNavigationAction = [](WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKFrameRef originatingFrame, WKURLRequestRef originalRequest, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
     {
         WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo;
         auto policyDelegate = browsingContext->_policyDelegate.get();
@@ -578,6 +579,7 @@
                 WKActionNavigationTypeKey: @(navigationType),
                 WKActionModifierFlagsKey: @(modifiers),
                 WKActionMouseButtonKey: @(mouseButton),
+                WKActionOriginalURLRequestKey: adoptNS(WKURLRequestCopyNSURLRequest(originalRequest)).get(),
                 WKActionURLRequestKey: adoptNS(WKURLRequestCopyNSURLRequest(request)).get()
             };
 

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h (160494 => 160495)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h	2013-12-12 18:41:35 UTC (rev 160494)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h	2013-12-12 18:41:55 UTC (rev 160495)
@@ -33,6 +33,7 @@
 WK_EXPORT extern NSString * const WKActionNavigationTypeKey;      // NSNumber (WKNavigationType)
 WK_EXPORT extern NSString * const WKActionMouseButtonKey;         // NSNumber (0 for left button, 1 for middle button, 2 for right button)
 WK_EXPORT extern NSString * const WKActionModifierFlagsKey;       // NSNumber (unsigned)
+WK_EXPORT extern NSString * const WKActionOriginalURLRequestKey;  // NSURLRequest
 WK_EXPORT extern NSString * const WKActionURLRequestKey;          // NSURLRequest
 WK_EXPORT extern NSString * const WKActionURLResponseKey;         // NSURLResponse
 WK_EXPORT extern NSString * const WKActionFrameNameKey;           // NSString

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (160494 => 160495)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2013-12-12 18:41:35 UTC (rev 160494)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2013-12-12 18:41:55 UTC (rev 160495)
@@ -2424,7 +2424,7 @@
 }
 
 // PolicyClient
-void WebPageProxy::decidePolicyForNavigationAction(uint64_t frameID, uint32_t opaqueNavigationType, uint32_t opaqueModifiers, int32_t opaqueMouseButton, uint64_t originatingFrameID, const ResourceRequest& request, uint64_t listenerID, CoreIPC::MessageDecoder& decoder, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID)
+void WebPageProxy::decidePolicyForNavigationAction(uint64_t frameID, uint32_t opaqueNavigationType, uint32_t opaqueModifiers, int32_t opaqueMouseButton, uint64_t originatingFrameID, const WebCore::ResourceRequest& originalRequest, const ResourceRequest& request, uint64_t listenerID, CoreIPC::MessageDecoder& decoder, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID)
 {
     RefPtr<API::Object> userData;
     WebContextUserMessageDecoder messageDecoder(userData, process());
@@ -2439,6 +2439,7 @@
     WebFrameProxy* frame = m_process->webFrame(frameID);
     MESSAGE_CHECK(frame);
     MESSAGE_CHECK_URL(request.url());
+    MESSAGE_CHECK_URL(originalRequest.url());
 
     NavigationType navigationType = static_cast<NavigationType>(opaqueNavigationType);
     WebEvent::Modifiers modifiers = static_cast<WebEvent::Modifiers>(opaqueModifiers);
@@ -2452,7 +2453,7 @@
     m_inDecidePolicyForNavigationAction = true;
     m_syncNavigationActionPolicyActionIsValid = false;
     
-    if (!m_policyClient.decidePolicyForNavigationAction(this, frame, navigationType, modifiers, mouseButton, originatingFrame, request, listener.get(), userData.get()))
+    if (!m_policyClient.decidePolicyForNavigationAction(this, frame, navigationType, modifiers, mouseButton, originatingFrame, originalRequest, request, listener.get(), userData.get()))
         listener->use();
 
     m_inDecidePolicyForNavigationAction = false;

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (160494 => 160495)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2013-12-12 18:41:35 UTC (rev 160494)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2013-12-12 18:41:55 UTC (rev 160495)
@@ -898,7 +898,7 @@
     void didChangeProgress(double);
     void didFinishProgress();
 
-    void decidePolicyForNavigationAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, uint64_t originatingFrameID, const WebCore::ResourceRequest&, uint64_t listenerID, CoreIPC::MessageDecoder&, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID);
+    void decidePolicyForNavigationAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, uint64_t originatingFrameID, const WebCore::ResourceRequest& originalRequest, const WebCore::ResourceRequest& request, uint64_t listenerID, CoreIPC::MessageDecoder&, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID);
     void decidePolicyForNewWindowAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, const WebCore::ResourceRequest&, const String& frameName, uint64_t listenerID, CoreIPC::MessageDecoder&);
     void decidePolicyForResponse(uint64_t frameID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, uint64_t listenerID, CoreIPC::MessageDecoder&);
     void decidePolicyForResponseSync(uint64_t frameID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, uint64_t listenerID, CoreIPC::MessageDecoder&, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID);

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (160494 => 160495)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2013-12-12 18:41:35 UTC (rev 160494)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2013-12-12 18:41:55 UTC (rev 160495)
@@ -103,7 +103,7 @@
 
     # Policy messages
     DecidePolicyForResponseSync(uint64_t frameID, WebCore::ResourceResponse response, WebCore::ResourceRequest request, bool canShowMIMEType, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) -> (bool receivedPolicyAction, uint64_t policyAction, uint64_t downloadID) Variadic
-    DecidePolicyForNavigationAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, uint64_t originatingFrameID, WebCore::ResourceRequest request, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) -> (bool receivedPolicyAction, uint64_t policyAction, uint64_t downloadID) Variadic
+    DecidePolicyForNavigationAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, uint64_t originatingFrameID, WebCore::ResourceRequest originalRequest, WebCore::ResourceRequest request, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) -> (bool receivedPolicyAction, uint64_t policyAction, uint64_t downloadID) Variadic
     DecidePolicyForNewWindowAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, WebCore::ResourceRequest request, String frameName, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
     UnableToImplementPolicy(uint64_t frameID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData)  Variadic
 

Modified: trunk/Source/WebKit2/UIProcess/WebPolicyClient.cpp (160494 => 160495)


--- trunk/Source/WebKit2/UIProcess/WebPolicyClient.cpp	2013-12-12 18:41:35 UTC (rev 160494)
+++ trunk/Source/WebKit2/UIProcess/WebPolicyClient.cpp	2013-12-12 18:41:55 UTC (rev 160495)
@@ -34,17 +34,20 @@
 
 namespace WebKit {
 
-bool WebPolicyClient::decidePolicyForNavigationAction(WebPageProxy* page, WebFrameProxy* frame, NavigationType type, WebEvent::Modifiers modifiers, WebMouseEvent::Button mouseButton, WebFrameProxy* originatingFrame, const ResourceRequest& resourceRequest, WebFramePolicyListenerProxy* listener, API::Object* userData)
+bool WebPolicyClient::decidePolicyForNavigationAction(WebPageProxy* page, WebFrameProxy* frame, NavigationType type, WebEvent::Modifiers modifiers, WebMouseEvent::Button mouseButton, WebFrameProxy* originatingFrame, const ResourceRequest& originalResourceRequest, const ResourceRequest& resourceRequest, WebFramePolicyListenerProxy* listener, API::Object* userData)
 {
-    if (!m_client.decidePolicyForNavigationAction_deprecatedForUseWithV0 && !m_client.decidePolicyForNavigationAction)
+    if (!m_client.decidePolicyForNavigationAction_deprecatedForUseWithV0 && !m_client.decidePolicyForNavigationAction_deprecatedForUseWithV1 && !m_client.decidePolicyForNavigationAction)
         return false;
 
+    RefPtr<WebURLRequest> originalRequest = WebURLRequest::create(originalResourceRequest);
     RefPtr<WebURLRequest> request = WebURLRequest::create(resourceRequest);
 
     if (m_client.decidePolicyForNavigationAction_deprecatedForUseWithV0)
         m_client.decidePolicyForNavigationAction_deprecatedForUseWithV0(toAPI(page), toAPI(frame), toAPI(type), toAPI(modifiers), toAPI(mouseButton), toAPI(request.get()), toAPI(listener), toAPI(userData), m_client.base.clientInfo);
+    else if (m_client.decidePolicyForNavigationAction_deprecatedForUseWithV1)
+        m_client.decidePolicyForNavigationAction_deprecatedForUseWithV1(toAPI(page), toAPI(frame), toAPI(type), toAPI(modifiers), toAPI(mouseButton), toAPI(originatingFrame), toAPI(request.get()), toAPI(listener), toAPI(userData), m_client.base.clientInfo);
     else
-        m_client.decidePolicyForNavigationAction(toAPI(page), toAPI(frame), toAPI(type), toAPI(modifiers), toAPI(mouseButton), toAPI(originatingFrame), toAPI(request.get()), toAPI(listener), toAPI(userData), m_client.base.clientInfo);
+        m_client.decidePolicyForNavigationAction(toAPI(page), toAPI(frame), toAPI(type), toAPI(modifiers), toAPI(mouseButton), toAPI(originatingFrame), toAPI(originalRequest.get()), toAPI(request.get()), toAPI(listener), toAPI(userData), m_client.base.clientInfo);
 
     return true;
 }

Modified: trunk/Source/WebKit2/UIProcess/WebPolicyClient.h (160494 => 160495)


--- trunk/Source/WebKit2/UIProcess/WebPolicyClient.h	2013-12-12 18:41:35 UTC (rev 160494)
+++ trunk/Source/WebKit2/UIProcess/WebPolicyClient.h	2013-12-12 18:41:55 UTC (rev 160495)
@@ -28,6 +28,7 @@
 
 #include "APIClient.h"
 #include "WKPage.h"
+#include "WKPagePolicyClientInternal.h"
 #include "WebEvent.h"
 #include <WebCore/FrameLoaderTypes.h>
 #include <wtf/Forward.h>
@@ -36,7 +37,7 @@
 class Object;
 
 template<> struct ClientTraits<WKPagePolicyClientBase> {
-    typedef std::tuple<WKPagePolicyClientV0, WKPagePolicyClientV1> Versions;
+    typedef std::tuple<WKPagePolicyClientV0, WKPagePolicyClientV1, WKPagePolicyClientInternal> Versions;
 };
 }
 
@@ -54,7 +55,7 @@
 
 class WebPolicyClient : public API::Client<WKPagePolicyClientBase> {
 public:
-    bool decidePolicyForNavigationAction(WebPageProxy*, WebFrameProxy*, WebCore::NavigationType, WebEvent::Modifiers, WebMouseEvent::Button, WebFrameProxy* originatingFrame, const WebCore::ResourceRequest&, WebFramePolicyListenerProxy*, API::Object* userData);
+    bool decidePolicyForNavigationAction(WebPageProxy*, WebFrameProxy*, WebCore::NavigationType, WebEvent::Modifiers, WebMouseEvent::Button, WebFrameProxy* originatingFrame, const WebCore::ResourceRequest& originalRequest, const WebCore::ResourceRequest&, WebFramePolicyListenerProxy*, API::Object* userData);
     bool decidePolicyForNewWindowAction(WebPageProxy*, WebFrameProxy*, WebCore::NavigationType, WebEvent::Modifiers, WebMouseEvent::Button, const WebCore::ResourceRequest&, const String& frameName, WebFramePolicyListenerProxy*, API::Object* userData);
     bool decidePolicyForResponse(WebPageProxy*, WebFrameProxy*, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, WebFramePolicyListenerProxy*, API::Object* userData);
     void unableToImplementPolicy(WebPageProxy*, WebFrameProxy*, const WebCore::ResourceError&, API::Object* userData);

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (160494 => 160495)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2013-12-12 18:41:35 UTC (rev 160494)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2013-12-12 18:41:55 UTC (rev 160495)
@@ -450,6 +450,7 @@
 		372CAF0C1833FD910040AC27 /* WKNSError.mm in Sources */ = {isa = PBXBuildFile; fileRef = 372CAF0A1833FD910040AC27 /* WKNSError.mm */; };
 		373CEAD5185417AE008C363D /* WKNSData.mm in Sources */ = {isa = PBXBuildFile; fileRef = 373CEAD3185417AE008C363D /* WKNSData.mm */; };
 		373CEAD6185417AE008C363D /* WKNSData.h in Headers */ = {isa = PBXBuildFile; fileRef = 373CEAD4185417AE008C363D /* WKNSData.h */; };
+		373CEAD81859553F008C363D /* WKPagePolicyClientInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 373CEAD71859553F008C363D /* WKPagePolicyClientInternal.h */; };
 		374436881820E7240049579F /* WKObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 374436871820E7240049579F /* WKObject.mm */; };
 		3760881E150413E900FC82C7 /* WebRenderObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3760881C150413E900FC82C7 /* WebRenderObject.cpp */; };
 		3760881F150413E900FC82C7 /* WebRenderObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 3760881D150413E900FC82C7 /* WebRenderObject.h */; };
@@ -2002,6 +2003,7 @@
 		372CAF0A1833FD910040AC27 /* WKNSError.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKNSError.mm; sourceTree = "<group>"; };
 		373CEAD3185417AE008C363D /* WKNSData.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKNSData.mm; sourceTree = "<group>"; };
 		373CEAD4185417AE008C363D /* WKNSData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNSData.h; sourceTree = "<group>"; };
+		373CEAD71859553F008C363D /* WKPagePolicyClientInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPagePolicyClientInternal.h; sourceTree = "<group>"; };
 		374436871820E7240049579F /* WKObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKObject.mm; sourceTree = "<group>"; };
 		3760881C150413E900FC82C7 /* WebRenderObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebRenderObject.cpp; sourceTree = "<group>"; };
 		3760881D150413E900FC82C7 /* WebRenderObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebRenderObject.h; sourceTree = "<group>"; };
@@ -4661,6 +4663,7 @@
 				BC7B633512A45ABA00D174A4 /* WKPageGroup.h */,
 				1AB8A1EB1840080900E9AE69 /* WKPageLoaderClient.h */,
 				1AB8A1ED18400ACB00E9AE69 /* WKPagePolicyClient.h */,
+				373CEAD71859553F008C363D /* WKPagePolicyClientInternal.h */,
 				BC177464118B9FF4007D9E9A /* WKPagePrivate.h */,
 				1AB8A1F118400B6200E9AE69 /* WKPageUIClient.h */,
 				1AC86FF1130B46D3002C1257 /* WKPluginSiteDataManager.cpp */,
@@ -6184,6 +6187,7 @@
 				BCDDB32B124EC2AB0048D13C /* WKSharedAPICast.h in Headers */,
 				BC407606124FF0270068F20A /* WKString.h in Headers */,
 				7C9D1537184584DA009D3918 /* WKBrowsingContextGroupInternal.h in Headers */,
+				373CEAD81859553F008C363D /* WKPagePolicyClientInternal.h in Headers */,
 				BC40761A124FF0370068F20A /* WKStringCF.h in Headers */,
 				759CCD591808F1690078E8A8 /* WebOriginDataManagerProxyChangeClient.h in Headers */,
 				BC9099801256A98200083756 /* WKStringPrivate.h in Headers */,

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (160494 => 160495)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2013-12-12 18:41:35 UTC (rev 160494)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2013-12-12 18:41:55 UTC (rev 160495)
@@ -728,7 +728,7 @@
     }
 
     // Notify the UIProcess.
-    if (!webPage->sendSync(Messages::WebPageProxy::DecidePolicyForNavigationAction(m_frame->frameID(), action->navigationType(), action->modifiers(), action->mouseButton(), originatingFrame ? originatingFrame->frameID() : 0, request, listenerID, InjectedBundleUserMessageEncoder(userData.get())), Messages::WebPageProxy::DecidePolicyForNavigationAction::Reply(receivedPolicyAction, policyAction, downloadID)))
+    if (!webPage->sendSync(Messages::WebPageProxy::DecidePolicyForNavigationAction(m_frame->frameID(), action->navigationType(), action->modifiers(), action->mouseButton(), originatingFrame ? originatingFrame->frameID() : 0, navigationAction.resourceRequest(), request, listenerID, InjectedBundleUserMessageEncoder(userData.get())), Messages::WebPageProxy::DecidePolicyForNavigationAction::Reply(receivedPolicyAction, policyAction, downloadID)))
         return;
 
     // We call this synchronously because WebCore cannot gracefully handle a frame load without a synchronous navigation policy reply.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to