<!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>[163563] 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/163563">163563</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2014-02-06 14:04:33 -0800 (Thu, 06 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add WKNavigationResponse class
https://bugs.webkit.org/show_bug.cgi?id=128326

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKFrameInfo.mm:
(-[WKFrameInfo initWithWebFrameProxy:WebKit::]):
* UIProcess/API/Cocoa/WKFrameInfoInternal.h:
* UIProcess/API/Cocoa/WKNavigationResponse.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm.
* UIProcess/API/Cocoa/WKNavigationResponse.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm.
(-[WKNavigationResponse frame]):
(-[WKNavigationResponse setFrame:]):
(-[WKNavigationResponse response]):
(-[WKNavigationResponse setResponse:]):
* UIProcess/API/Cocoa/WKNavigationResponseInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
* WebKit2.xcodeproj/project.pbxproj:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKFrameInfomm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKFrameInfoInternalh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaNavigationStatemm">trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKNavigationResponseh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKNavigationResponsemm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKNavigationResponseInternalh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponseInternal.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (163562 => 163563)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-02-06 21:53:31 UTC (rev 163562)
+++ trunk/Source/WebKit2/ChangeLog        2014-02-06 22:04:33 UTC (rev 163563)
</span><span class="lines">@@ -1,5 +1,27 @@
</span><span class="cx"> 2014-02-06  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Add WKNavigationResponse class
+        https://bugs.webkit.org/show_bug.cgi?id=128326
+
+        Reviewed by Dan Bernstein.
+
+        * UIProcess/API/Cocoa/WKFrameInfo.mm:
+        (-[WKFrameInfo initWithWebFrameProxy:WebKit::]):
+        * UIProcess/API/Cocoa/WKFrameInfoInternal.h:
+        * UIProcess/API/Cocoa/WKNavigationResponse.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm.
+        * UIProcess/API/Cocoa/WKNavigationResponse.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm.
+        (-[WKNavigationResponse frame]):
+        (-[WKNavigationResponse setFrame:]):
+        (-[WKNavigationResponse response]):
+        (-[WKNavigationResponse setResponse:]):
+        * UIProcess/API/Cocoa/WKNavigationResponseInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h.
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
+        (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
+        * WebKit2.xcodeproj/project.pbxproj:
+
+2014-02-06  Anders Carlsson  &lt;andersca@apple.com&gt;
+
</ins><span class="cx">         Replace ’ with ' to silence the check-for-webkit-framework-include-consistency script.
</span><span class="cx"> 
</span><span class="cx">         * UIProcess/API/Cocoa/WKWebView.h:
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKFrameInfomm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm (163562 => 163563)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm        2014-02-06 21:53:31 UTC (rev 163562)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm        2014-02-06 22:04:33 UTC (rev 163563)
</span><span class="lines">@@ -28,12 +28,26 @@
</span><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> 
</span><ins>+#import &quot;WebFrameProxy.h&quot;
</ins><span class="cx"> #import &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> 
</span><span class="cx"> @implementation WKFrameInfo {
</span><span class="cx">     RetainPtr&lt;NSURLRequest&gt; _request;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (instancetype)initWithWebFrameProxy:(WebKit::WebFrameProxy&amp;)webFrameProxy
+{
+    if (!(self = [super init]))
+        return nil;
+
+    _mainFrame = webFrameProxy.isMainFrame();
+
+    // FIXME: This should use the full request of the frame, not just the URL.
+    _request = [NSURLRequest requestWithURL:[NSURL URLWithString:webFrameProxy.url()]];
+
+    return self;
+}
+
</ins><span class="cx"> - (NSURLRequest *)request
</span><span class="cx"> {
</span><span class="cx">     return _request.get();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKFrameInfoInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h (163562 => 163563)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h        2014-02-06 21:53:31 UTC (rev 163562)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h        2014-02-06 22:04:33 UTC (rev 163563)
</span><span class="lines">@@ -27,10 +27,13 @@
</span><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> 
</span><ins>+namespace WebKit {
+class WebFrameProxy;
+}
+
</ins><span class="cx"> @interface WKFrameInfo ()
</span><span class="cx"> 
</span><del>-@property (nonatomic, readwrite, getter=isMainFrame) BOOL mainFrame;
-@property (nonatomic, readwrite, copy) NSURLRequest *request;
</del><ins>+- (instancetype)initWithWebFrameProxy:(WebKit::WebFrameProxy&amp;)webFrameProxy;
</ins><span class="cx"> 
</span><span class="cx"> @end
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKNavigationResponsehfromrev163555trunkSourceWebKit2UIProcessAPICocoaWKFrameInfomm"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h (from rev 163555, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm) (0 => 163563)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h        2014-02-06 22:04:33 UTC (rev 163563)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+/*
+ * Copyright (C) 2014 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.
+ */
+
+#import &lt;Foundation/Foundation.h&gt;
+#import &lt;WebKit2/WKFoundation.h&gt;
+
+#if WK_API_ENABLED
+
+@class WKFrameInfo;
+
+WK_API_CLASS
+@interface WKNavigationResponse : NSObject
+
+@property (nonatomic, readonly) WKFrameInfo *frame;
+@property (nonatomic, readonly) NSURLResponse *response;
+@property (nonatomic, readonly) BOOL canShowMIMEType;
+
+@end
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKNavigationResponsemmfromrev163555trunkSourceWebKit2UIProcessAPICocoaWKFrameInfomm"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.mm (from rev 163555, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm) (0 => 163563)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.mm        2014-02-06 22:04:33 UTC (rev 163563)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+/*
+ * Copyright (C) 2014 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.
+ */
+
+#import &quot;config.h&quot;
+#import &quot;WKNavigationResponseInternal.h&quot;
+
+#if WK_API_ENABLED
+
+#import &lt;wtf/RetainPtr.h&gt;
+
+@implementation WKNavigationResponse {
+    RetainPtr&lt;WKFrameInfo&gt; _frame;
+    RetainPtr&lt;NSURLResponse&gt; _response;
+}
+
+- (WKFrameInfo *)frame
+{
+    return _frame.get();
+}
+
+- (void)setFrame:(WKFrameInfo *)frame
+{
+    _frame = frame;
+}
+
+- (NSURLResponse *)response
+{
+    return _response.get();
+}
+
+- (void)setResponse:(NSURLResponse *)response
+{
+    _response = adoptNS([response copy]);
+}
+
+@end
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKNavigationResponseInternalhfromrev163555trunkSourceWebKit2UIProcessAPICocoaWKFrameInfoInternalh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponseInternal.h (from rev 163555, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h) (0 => 163563)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponseInternal.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponseInternal.h        2014-02-06 22:04:33 UTC (rev 163563)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+/*
+ * Copyright (C) 2014 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.
+ */
+
+#import &quot;WKNavigationResponse.h&quot;
+
+#if WK_API_ENABLED
+
+@interface WKNavigationResponse ()
+
+@property (nonatomic, readwrite, strong) WKFrameInfo *frame;
+@property (nonatomic, readwrite, copy) NSURLResponse *response;
+@property (nonatomic, readwrite) BOOL canShowMIMEType;
+
+@end
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaNavigationStatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (163562 => 163563)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm        2014-02-06 21:53:31 UTC (rev 163562)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm        2014-02-06 22:04:33 UTC (rev 163563)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #import &quot;WKNavigationActionInternal.h&quot;
</span><span class="cx"> #import &quot;WKNavigationDelegate.h&quot;
</span><span class="cx"> #import &quot;WKNavigationInternal.h&quot;
</span><ins>+#import &quot;WKNavigationResponseInternal.h&quot;
</ins><span class="cx"> #import &quot;WKWebViewInternal.h&quot;
</span><span class="cx"> #import &quot;WebFrameProxy.h&quot;
</span><span class="cx"> #import &quot;WebPageProxy.h&quot;
</span><span class="lines">@@ -127,18 +128,6 @@
</span><span class="cx">     return WKNavigationTypeOther;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static RetainPtr&lt;WKFrameInfo&gt; frameInfoFromWebFrameProxy(WebFrameProxy&amp; webFrameProxy)
-{
-    auto frameInfo = adoptNS([[WKFrameInfo alloc] init]);
-
-    [frameInfo setMainFrame:webFrameProxy.isMainFrame()];
-
-    // FIXME: This should use the full request of the frame, not just the URL.
-    [frameInfo setRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:webFrameProxy.url()]]];
-
-    return frameInfo;
-}
-
</del><span class="cx"> void NavigationState::PolicyClient::decidePolicyForNavigationAction(WebPageProxy*, WebFrameProxy* destinationFrame, const NavigationActionData&amp; navigationActionData, WebFrameProxy* sourceFrame, const WebCore::ResourceRequest&amp; originalRequest, const WebCore::ResourceRequest&amp; request, RefPtr&lt;WebFramePolicyListenerProxy&gt; listener, API::Object* userData)
</span><span class="cx"> {
</span><span class="cx">     if (!m_navigationState.m_navigationDelegateMethods.webViewDecidePolicyForNavigationActionDecisionHandler) {
</span><span class="lines">@@ -154,8 +143,10 @@
</span><span class="cx">     // FIXME: Set up the navigation action object.
</span><span class="cx">     auto navigationAction = adoptNS([[WKNavigationAction alloc] init]);
</span><span class="cx"> 
</span><del>-    if (sourceFrame)
-        [navigationAction setSourceFrame:frameInfoFromWebFrameProxy(*sourceFrame).get()];
</del><ins>+    if (sourceFrame) {
+        auto frameInfo = adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:*sourceFrame]);
+        [navigationAction setSourceFrame:frameInfo.get()];
+    }
</ins><span class="cx"> 
</span><span class="cx">     [navigationAction setNavigationType:toWKNavigationType(navigationActionData.navigationType)];
</span><span class="cx">     [navigationAction setRequest:request.nsURLRequest(WebCore::DoNotUpdateHTTPBody)];
</span><span class="lines">@@ -182,7 +173,7 @@
</span><span class="cx">     decidePolicyForNavigationAction(webPageProxy, nullptr, navigationActionData, sourceFrame, request, request, std::move(listener), userData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NavigationState::PolicyClient::decidePolicyForResponse(WebPageProxy*, WebFrameProxy*, const WebCore::ResourceResponse&amp;, const WebCore::ResourceRequest&amp; resourceRequest, bool canShowMIMEType, RefPtr&lt;WebFramePolicyListenerProxy&gt; listener, API::Object* userData)
</del><ins>+void NavigationState::PolicyClient::decidePolicyForResponse(WebPageProxy*, WebFrameProxy* frame, const WebCore::ResourceResponse&amp; resourceResponse, const WebCore::ResourceRequest&amp; resourceRequest, bool canShowMIMEType, RefPtr&lt;WebFramePolicyListenerProxy&gt; listener, API::Object* userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_navigationState.m_navigationDelegateMethods.webViewDecidePolicyForNavigationResponseDecisionHandler) {
</span><span class="cx">         // FIXME: &lt;rdar://problem/15949822&gt; Figure out what the &quot;default delegate behavior&quot; should be here.
</span><span class="lines">@@ -195,9 +186,13 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Set up the navigation response object.
</span><del>-    WKNavigationResponse *navigationResponse = nil;
</del><ins>+    auto navigationResponse = adoptNS([[WKNavigationResponse alloc] init]);
</ins><span class="cx"> 
</span><del>-    [navigationDelegate webView:m_navigationState.m_webView decidePolicyForNavigationResponse:navigationResponse decisionHandler:[listener](WKNavigationResponsePolicyDecision policyDecision) {
</del><ins>+    [navigationResponse setFrame:adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:*frame]).get()];
+    [navigationResponse setResponse:resourceResponse.nsURLResponse()];
+    [navigationResponse setCanShowMIMEType:canShowMIMEType];
+
+    [navigationDelegate webView:m_navigationState.m_webView decidePolicyForNavigationResponse:navigationResponse.get() decisionHandler:[listener](WKNavigationResponsePolicyDecision policyDecision) {
</ins><span class="cx">         switch (policyDecision) {
</span><span class="cx">         case WKNavigationResponsePolicyDecisionAllow:
</span><span class="cx">             listener-&gt;use();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (163562 => 163563)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-02-06 21:53:31 UTC (rev 163562)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-02-06 22:04:33 UTC (rev 163563)
</span><span class="lines">@@ -96,6 +96,9 @@
</span><span class="cx">                 1A179780137EE82C00F97D45 /* PluginCreationParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A17977E137EE82C00F97D45 /* PluginCreationParameters.h */; };
</span><span class="cx">                 1A186EEA12EF7618008E5F37 /* LayerTreeHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A186EE812EF7618008E5F37 /* LayerTreeHost.h */; };
</span><span class="cx">                 1A186EEB12EF7618008E5F37 /* LayerTreeHost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A186EE912EF7618008E5F37 /* LayerTreeHost.cpp */; };
</span><ins>+                1A1B0EB518A424950038481A /* WKNavigationResponse.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A1B0EB318A424950038481A /* WKNavigationResponse.mm */; };
+                1A1B0EB618A424950038481A /* WKNavigationResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A1B0EB418A424950038481A /* WKNavigationResponse.h */; };
+                1A1B0EB818A424CD0038481A /* WKNavigationResponseInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A1B0EB718A424CD0038481A /* WKNavigationResponseInternal.h */; };
</ins><span class="cx">                 1A1C649B11F4174200553C19 /* WebContextMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A1C648611F415B700553C19 /* WebContextMac.mm */; };
</span><span class="cx">                 1A1D8BA11731A36300141DA4 /* LocalStorageDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1D8B9F1731A36300141DA4 /* LocalStorageDatabase.cpp */; };
</span><span class="cx">                 1A1D8BA21731A36300141DA4 /* LocalStorageDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A1D8BA01731A36300141DA4 /* LocalStorageDatabase.h */; };
</span><span class="lines">@@ -1738,6 +1741,9 @@
</span><span class="cx">                 1A17977E137EE82C00F97D45 /* PluginCreationParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginCreationParameters.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A186EE812EF7618008E5F37 /* LayerTreeHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayerTreeHost.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A186EE912EF7618008E5F37 /* LayerTreeHost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayerTreeHost.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1A1B0EB318A424950038481A /* WKNavigationResponse.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKNavigationResponse.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1A1B0EB418A424950038481A /* WKNavigationResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNavigationResponse.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1A1B0EB718A424CD0038481A /* WKNavigationResponseInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNavigationResponseInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1A1C648611F415B700553C19 /* WebContextMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebContextMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A1D8B9F1731A36300141DA4 /* LocalStorageDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalStorageDatabase.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A1D8BA01731A36300141DA4 /* LocalStorageDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalStorageDatabase.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4305,6 +4311,9 @@
</span><span class="cx">                                 1A256E3918A1A7DF006FB922 /* WKNavigationActionInternal.h */,
</span><span class="cx">                                 1ABC3DFB1899F51C004F0626 /* WKNavigationDelegate.h */,
</span><span class="cx">                                 1ABC3DF01899C6B6004F0626 /* WKNavigationInternal.h */,
</span><ins>+                                1A1B0EB418A424950038481A /* WKNavigationResponse.h */,
+                                1A1B0EB318A424950038481A /* WKNavigationResponse.mm */,
+                                1A1B0EB718A424CD0038481A /* WKNavigationResponseInternal.h */,
</ins><span class="cx">                                 1AFDD3161891C94700153970 /* WKPreferences.h */,
</span><span class="cx">                                 1AFDD3181891CA1200153970 /* WKPreferences.mm */,
</span><span class="cx">                                 1A158418189044F50017616C /* WKProcessClass.h */,
</span><span class="lines">@@ -6282,6 +6291,7 @@
</span><span class="cx">                                 1AA9BAE1184FFAC7003B6BC6 /* WeakObjCPtr.h in Headers */,
</span><span class="cx">                                 BC4BEEAB120A0A5F00FBA0C7 /* InjectedBundleNodeHandle.h in Headers */,
</span><span class="cx">                                 378E1A4E18208D700031007A /* WKNSURL.h in Headers */,
</span><ins>+                                1A1B0EB818A424CD0038481A /* WKNavigationResponseInternal.h in Headers */,
</ins><span class="cx">                                 512935E41288D97800A4B695 /* InjectedBundlePageContextMenuClient.h in Headers */,
</span><span class="cx">                                 E1EE53E311F8CFC000CCBEE4 /* InjectedBundlePageEditorClient.h in Headers */,
</span><span class="cx">                                 BC14E10A120B905E00826C0C /* InjectedBundlePageFormClient.h in Headers */,
</span><span class="lines">@@ -6708,6 +6718,7 @@
</span><span class="cx">                                 1AB8A1EE18400ACB00E9AE69 /* WKPagePolicyClient.h in Headers */,
</span><span class="cx">                                 37183D57182F4E700080C811 /* WKNSURLExtras.h in Headers */,
</span><span class="cx">                                 BCC938E11180DE440085E5FE /* WKContextPrivate.h in Headers */,
</span><ins>+                                1A1B0EB618A424950038481A /* WKNavigationResponse.h in Headers */,
</ins><span class="cx">                                 9FB5F395169E6A80002C25BF /* WKContextPrivateMac.h in Headers */,
</span><span class="cx">                                 1AE00D5D182DADE100087DD7 /* KeyedEncoder.h in Headers */,
</span><span class="cx">                                 3309345B1315B9980097A7BC /* WKCookieManager.h in Headers */,
</span><span class="lines">@@ -7770,6 +7781,7 @@
</span><span class="cx">                                 1A3CC16618906ACF001E6ED8 /* WKWebView.mm in Sources */,
</span><span class="cx">                                 1A3D610113A7CC2A00F95D4E /* PluginModuleInfo.cpp in Sources */,
</span><span class="cx">                                 1A043977124D034800FFBFB5 /* PluginProcess.cpp in Sources */,
</span><ins>+                                1A1B0EB518A424950038481A /* WKNavigationResponse.mm in Sources */,
</ins><span class="cx">                                 1A0EC907124C0AB8007EF4A5 /* PluginProcessConnection.cpp in Sources */,
</span><span class="cx">                                 1A0EC910124C0AF5007EF4A5 /* PluginProcessConnectionManager.cpp in Sources */,
</span><span class="cx">                                 1A7865B916CAC71500ACE83A /* PluginProcessConnectionManagerMessageReceiver.cpp in Sources */,
</span></span></pre>
</div>
</div>

</body>
</html>