<!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>[163501] trunk</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/163501">163501</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2014-02-05 17:49:06 -0800 (Wed, 05 Feb 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add sourceFrame to WKNavigationAction
https://bugs.webkit.org/show_bug.cgi?id=128280
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKFrameInfo.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionInternal.h.
* UIProcess/API/Cocoa/WKFrameInfo.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionInternal.h.
(-[WKFrameInfo request]):
(-[WKFrameInfo setRequest:]):
* UIProcess/API/Cocoa/WKFrameInfoInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionInternal.h.
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationAction.mm:
(-[WKNavigationAction sourceFrame]):
(-[WKNavigationAction setSourceFrame:]):
* UIProcess/API/Cocoa/WKNavigationActionInternal.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::frameInfoFromWebFrameProxy):
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
* WebKit2.xcodeproj/project.pbxproj:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKNavigationActionh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKNavigationActionmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKNavigationActionInternalh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionInternal.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>
<li><a href="#trunkToolsMiniBrowsermacWK1BrowserWindowControllerm">trunk/Tools/MiniBrowser/mac/WK1BrowserWindowController.m</a></li>
<li><a href="#trunkToolsMiniBrowsermacWK2BrowserWindowControllerm">trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKFrameInfoh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.h</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>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (163500 => 163501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-02-06 01:19:43 UTC (rev 163500)
+++ trunk/Source/WebKit2/ChangeLog        2014-02-06 01:49:06 UTC (rev 163501)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2014-02-05 Anders Carlsson <andersca@apple.com>
+
+ Add sourceFrame to WKNavigationAction
+ https://bugs.webkit.org/show_bug.cgi?id=128280
+
+ Reviewed by Dan Bernstein.
+
+ * UIProcess/API/Cocoa/WKFrameInfo.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionInternal.h.
+ * UIProcess/API/Cocoa/WKFrameInfo.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionInternal.h.
+ (-[WKFrameInfo request]):
+ (-[WKFrameInfo setRequest:]):
+ * UIProcess/API/Cocoa/WKFrameInfoInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionInternal.h.
+ * UIProcess/API/Cocoa/WKNavigationAction.h:
+ * UIProcess/API/Cocoa/WKNavigationAction.mm:
+ (-[WKNavigationAction sourceFrame]):
+ (-[WKNavigationAction setSourceFrame:]):
+ * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
+ * UIProcess/Cocoa/NavigationState.mm:
+ (WebKit::frameInfoFromWebFrameProxy):
+ (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
+ * WebKit2.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2014-02-05 Enrica Casucci <enrica@apple.com>
</span><span class="cx">
</span><span class="cx"> WK2: Tap highlight is positioned incorrectly in iframes.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKFrameInfohfromrev163499trunkSourceWebKit2UIProcessAPICocoaWKNavigationActionInternalh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.h (from rev 163499, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionInternal.h) (0 => 163501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.h         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.h        2014-02-06 01:49:06 UTC (rev 163501)
</span><span class="lines">@@ -0,0 +1,39 @@
</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 <Foundation/Foundation.h>
+#import <WebKit2/WKFoundation.h>
+
+#if WK_API_ENABLED
+
+WK_API_CLASS
+@interface WKFrameInfo : NSObject
+
+@property (nonatomic, readonly, getter=isMainFrame) BOOL mainFrame;
+@property (nonatomic, readonly) NSURLRequest *request;
+
+@end
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKFrameInfommfromrev163499trunkSourceWebKit2UIProcessAPICocoaWKNavigationActionInternalh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm (from rev 163499, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionInternal.h) (0 => 163501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm        2014-02-06 01:49:06 UTC (rev 163501)
</span><span class="lines">@@ -0,0 +1,50 @@
</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 "config.h"
+#import "WKFrameInfoInternal.h"
+
+#if WK_API_ENABLED
+
+#import <wtf/RetainPtr.h>
+
+@implementation WKFrameInfo {
+ RetainPtr<NSURLRequest> _request;
+}
+
+- (NSURLRequest *)request
+{
+ return _request.get();
+}
+
+- (void)setRequest:(NSURLRequest *)request
+{
+ _request = adoptNS([request copy]);
+}
+
+@end
+
+#endif
+
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKFrameInfoInternalhfromrev163499trunkSourceWebKit2UIProcessAPICocoaWKNavigationActionInternalh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h (from rev 163499, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionInternal.h) (0 => 163501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h        2014-02-06 01:49:06 UTC (rev 163501)
</span><span class="lines">@@ -0,0 +1,37 @@
</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 "WKFrameInfo.h"
+
+#if WK_API_ENABLED
+
+@interface WKFrameInfo ()
+
+@property (nonatomic, readwrite, getter=isMainFrame) BOOL mainFrame;
+@property (nonatomic, readwrite, copy) NSURLRequest *request;
+
+@end
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKNavigationActionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h (163500 => 163501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h        2014-02-06 01:19:43 UTC (rev 163500)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h        2014-02-06 01:49:06 UTC (rev 163501)
</span><span class="lines">@@ -28,6 +28,8 @@
</span><span class="cx">
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx">
</span><ins>+@class WKFrameInfo;
+
</ins><span class="cx"> typedef NS_ENUM(NSInteger, WKNavigationType) {
</span><span class="cx"> WKNavigationTypeLinkActivated,
</span><span class="cx"> WKNavigationTypeFormSubmitted,
</span><span class="lines">@@ -40,6 +42,8 @@
</span><span class="cx"> WK_API_CLASS
</span><span class="cx"> @interface WKNavigationAction : NSObject
</span><span class="cx">
</span><ins>+@property (nonatomic, readonly) WKFrameInfo *sourceFrame;
+
</ins><span class="cx"> @property (nonatomic, readonly) WKNavigationType navigationType;
</span><span class="cx">
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKNavigationActionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.mm (163500 => 163501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.mm        2014-02-06 01:19:43 UTC (rev 163500)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.mm        2014-02-06 01:49:06 UTC (rev 163501)
</span><span class="lines">@@ -23,13 +23,27 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#include "config.h"
-#include "WKNavigationAction.h"
</del><ins>+#import "config.h"
+#import "WKNavigationActionInternal.h"
</ins><span class="cx">
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx">
</span><del>-@implementation WKNavigationAction
</del><ins>+#import <wtf/RetainPtr.h>
</ins><span class="cx">
</span><ins>+@implementation WKNavigationAction {
+ RetainPtr<WKFrameInfo> _sourceFrame;
+}
+
+- (WKFrameInfo *)sourceFrame
+{
+ return _sourceFrame.get();
+}
+
+- (void)setSourceFrame:(WKFrameInfo *)sourceFrame
+{
+ _sourceFrame = sourceFrame;
+}
+
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKNavigationActionInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionInternal.h (163500 => 163501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionInternal.h        2014-02-06 01:19:43 UTC (rev 163500)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionInternal.h        2014-02-06 01:49:06 UTC (rev 163501)
</span><span class="lines">@@ -29,6 +29,8 @@
</span><span class="cx">
</span><span class="cx"> @interface WKNavigationAction ()
</span><span class="cx">
</span><ins>+@property (nonatomic, readwrite, strong) WKFrameInfo *sourceFrame;
+
</ins><span class="cx"> @property (nonatomic, readwrite) WKNavigationType navigationType;
</span><span class="cx">
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaNavigationStatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (163500 => 163501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm        2014-02-06 01:19:43 UTC (rev 163500)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm        2014-02-06 01:49:06 UTC (rev 163501)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx">
</span><span class="cx"> #import "NavigationActionData.h"
</span><span class="cx"> #import "PageLoadState.h"
</span><ins>+#import "WKFrameInfoInternal.h"
</ins><span class="cx"> #import "WKNavigationActionInternal.h"
</span><span class="cx"> #import "WKNavigationDelegate.h"
</span><span class="cx"> #import "WKNavigationInternal.h"
</span><span class="lines">@@ -126,6 +127,15 @@
</span><span class="cx"> return WKNavigationTypeOther;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static RetainPtr<WKFrameInfo> frameInfoFromWebFrameProxy(WebFrameProxy& webFrameProxy)
+{
+ auto frameInfo = adoptNS([[WKFrameInfo alloc] init]);
+
+ [frameInfo setMainFrame:webFrameProxy.isMainFrame()];
+
+ return frameInfo;
+}
+
</ins><span class="cx"> void NavigationState::PolicyClient::decidePolicyForNavigationAction(WebPageProxy*, WebFrameProxy* destinationFrame, const NavigationActionData& navigationActionData, WebFrameProxy* sourceFrame, const WebCore::ResourceRequest& originalRequest, const WebCore::ResourceRequest&, RefPtr<WebFramePolicyListenerProxy> listener, API::Object* userData)
</span><span class="cx"> {
</span><span class="cx"> if (!m_navigationState.m_navigationDelegateMethods.webViewDecidePolicyForNavigationActionDecisionHandler) {
</span><span class="lines">@@ -141,6 +151,12 @@
</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><ins>+ if (sourceFrame) {
+ auto sourceFrameInfo = frameInfoFromWebFrameProxy(*sourceFrame);
+ [sourceFrameInfo setRequest:originalRequest.nsURLRequest(WebCore::DoNotUpdateHTTPBody)];
+ [navigationAction setSourceFrame:sourceFrameInfo.get()];
+ }
+
</ins><span class="cx"> [navigationAction setNavigationType:toWKNavigationType(navigationActionData.navigationType)];
</span><span class="cx">
</span><span class="cx"> [navigationDelegate webView:m_navigationState.m_webView decidePolicyForNavigationAction:navigationAction.get() decisionHandler:[listener](WKNavigationPolicyDecision policyDecision) {
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (163500 => 163501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-02-06 01:19:43 UTC (rev 163500)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-02-06 01:49:06 UTC (rev 163501)
</span><span class="lines">@@ -118,7 +118,7 @@
</span><span class="cx">                 1A24BED5120894D100FBB059 /* SharedMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A24BED3120894D100FBB059 /* SharedMemory.h */; };
</span><span class="cx">                 1A24BF3A120896A600FBB059 /* SharedMemoryMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A24BF39120896A600FBB059 /* SharedMemoryMac.cpp */; };
</span><span class="cx">                 1A256E3718A1A788006FB922 /* WKNavigationAction.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A256E3518A1A788006FB922 /* WKNavigationAction.mm */; };
</span><del>-                1A256E3818A1A788006FB922 /* WKNavigationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A256E3618A1A788006FB922 /* WKNavigationAction.h */; };
</del><ins>+                1A256E3818A1A788006FB922 /* WKNavigationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A256E3618A1A788006FB922 /* WKNavigationAction.h */; settings = {ATTRIBUTES = (Public, ); }; };
</ins><span class="cx">                 1A256E3A18A1A7DF006FB922 /* WKNavigationActionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A256E3918A1A7DF006FB922 /* WKNavigationActionInternal.h */; };
</span><span class="cx">                 1A2A4B0E1586A2240090C9E9 /* ColorSpaceData.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A4AFD158693920090C9E9 /* ColorSpaceData.mm */; };
</span><span class="cx">                 1A2BB6D014117B4D000F35D4 /* PluginProcessConnectionMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2BB6CE14117B4D000F35D4 /* PluginProcessConnectionMessageReceiver.cpp */; };
</span><span class="lines">@@ -178,6 +178,9 @@
</span><span class="cx">                 1A4A9C9A12B821CD008FE984 /* NetscapePluginModuleMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A4A9C9912B821CD008FE984 /* NetscapePluginModuleMac.mm */; };
</span><span class="cx">                 1A4A9F3312B844E2008FE984 /* PluginQuirks.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4A9F3112B844E2008FE984 /* PluginQuirks.h */; };
</span><span class="cx">                 1A4D664818A2D91A00D82E21 /* APIUIClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4D664718A2D91A00D82E21 /* APIUIClient.h */; };
</span><ins>+                1A4D664B18A3030E00D82E21 /* WKFrameInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A4D664918A3030E00D82E21 /* WKFrameInfo.mm */; };
+                1A4D664C18A3030E00D82E21 /* WKFrameInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4D664A18A3030E00D82E21 /* WKFrameInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
+                1A4D664E18A3031B00D82E21 /* WKFrameInfoInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4D664D18A3031B00D82E21 /* WKFrameInfoInternal.h */; };
</ins><span class="cx">                 1A50DB66110A3D57000D3FE5 /* WebProcess.app in Copy Files */ = {isa = PBXBuildFile; fileRef = 1A50DB1E110A3BDC000D3FE5 /* WebProcess.app */; };
</span><span class="cx">                 1A5B1C501898606F004FCF9B /* WKNavigation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A5B1C4E1898606F004FCF9B /* WKNavigation.mm */; };
</span><span class="cx">                 1A5B1C511898606F004FCF9B /* WKNavigation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5B1C4F1898606F004FCF9B /* WKNavigation.h */; settings = {ATTRIBUTES = (Public, ); }; };
</span><span class="lines">@@ -1822,6 +1825,9 @@
</span><span class="cx">                 1A4A9C9912B821CD008FE984 /* NetscapePluginModuleMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NetscapePluginModuleMac.mm; sourceTree = "<group>"; };
</span><span class="cx">                 1A4A9F3112B844E2008FE984 /* PluginQuirks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginQuirks.h; sourceTree = "<group>"; };
</span><span class="cx">                 1A4D664718A2D91A00D82E21 /* APIUIClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIUIClient.h; sourceTree = "<group>"; };
</span><ins>+                1A4D664918A3030E00D82E21 /* WKFrameInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKFrameInfo.mm; sourceTree = "<group>"; };
+                1A4D664A18A3030E00D82E21 /* WKFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFrameInfo.h; sourceTree = "<group>"; };
+                1A4D664D18A3031B00D82E21 /* WKFrameInfoInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFrameInfoInternal.h; sourceTree = "<group>"; };
</ins><span class="cx">                 1A4F976A100E7B6600637A18 /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
</span><span class="cx">                 1A4F976B100E7B6600637A18 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
</span><span class="cx">                 1A4F976C100E7B6600637A18 /* FeatureDefines.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = FeatureDefines.xcconfig; sourceTree = "<group>"; };
</span><span class="lines">@@ -4287,6 +4293,9 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 1A43E826188F38E2009E4D30 /* Deprecated */,
</span><ins>+                                1A4D664A18A3030E00D82E21 /* WKFrameInfo.h */,
+                                1A4D664918A3030E00D82E21 /* WKFrameInfo.mm */,
+                                1A4D664D18A3031B00D82E21 /* WKFrameInfoInternal.h */,
</ins><span class="cx">                                 1A5B1C4F1898606F004FCF9B /* WKNavigation.h */,
</span><span class="cx">                                 1A5B1C4E1898606F004FCF9B /* WKNavigation.mm */,
</span><span class="cx">                                 1A256E3618A1A788006FB922 /* WKNavigationAction.h */,
</span><span class="lines">@@ -6418,6 +6427,7 @@
</span><span class="cx">                                 514BDED316C98EDD00E4E25E /* StatisticsRequest.h in Headers */,
</span><span class="cx">                                 2DA944871884E3B500ED86DB /* PageClientImplIOS.h in Headers */,
</span><span class="cx">                                 1AD3306F16B1D991004F60E7 /* StorageAreaImpl.h in Headers */,
</span><ins>+                                1A4D664E18A3031B00D82E21 /* WKFrameInfoInternal.h in Headers */,
</ins><span class="cx">                                 1ACECD2517162DB1001FC9EF /* StorageAreaMap.h in Headers */,
</span><span class="cx">                                 1A334DEE16DE8F88006A8E38 /* StorageAreaMapMessages.h in Headers */,
</span><span class="cx">                                 1A44B95C16B73F9F00B7BBD8 /* StorageManager.h in Headers */,
</span><span class="lines">@@ -6730,6 +6740,7 @@
</span><span class="cx">                                 BCC8B374125FB69000DE46A4 /* WKGeometry.h in Headers */,
</span><span class="cx">                                 B62E7312143047B00069EC35 /* WKHitTestResult.h in Headers */,
</span><span class="cx">                                 5110AE0D133C16CB0072717A /* WKIconDatabase.h in Headers */,
</span><ins>+                                1A4D664C18A3030E00D82E21 /* WKFrameInfo.h in Headers */,
</ins><span class="cx">                                 5123CF1C133D260A0056F800 /* WKIconDatabaseCG.h in Headers */,
</span><span class="cx">                                 37C4C0941814B3AF003688B9 /* WKNSArray.h in Headers */,
</span><span class="cx">                                 BCCF6AC312C91F34008F9C35 /* WKImage.h in Headers */,
</span><span class="lines">@@ -7609,6 +7620,7 @@
</span><span class="cx">                                 93FC67BF12D3CCF200A60610 /* EncoderAdapter.cpp in Sources */,
</span><span class="cx">                                 2DA944AD1884E9BA00ED86DB /* TextCheckerIOS.mm in Sources */,
</span><span class="cx">                                 2DA944A21884E4F000ED86DB /* WebPlatformTouchPointIOS.cpp in Sources */,
</span><ins>+                                1A4D664B18A3030E00D82E21 /* WKFrameInfo.mm in Sources */,
</ins><span class="cx">                                 2D28F3E51885CCC1004B9EAE /* WebDatabaseManagerIOS.mm in Sources */,
</span><span class="cx">                                 51B15A8413843A3900321AD8 /* EnvironmentUtilities.cpp in Sources */,
</span><span class="cx">                                 1A43E829188F3CDC009E4D30 /* WKProcessClassConfiguration.mm in Sources */,
</span></span></pre></div>
<a id="trunkToolsMiniBrowsermacWK1BrowserWindowControllerm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/MiniBrowser/mac/WK1BrowserWindowController.m (163500 => 163501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/MiniBrowser/mac/WK1BrowserWindowController.m        2014-02-06 01:19:43 UTC (rev 163500)
+++ trunk/Tools/MiniBrowser/mac/WK1BrowserWindowController.m        2014-02-06 01:49:06 UTC (rev 163501)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> [_webView setFrameLoadDelegate:self];
</span><span class="cx"> [_webView setUIDelegate:self];
</span><span class="cx"> [_webView setResourceLoadDelegate:self];
</span><ins>+ [_webView setPolicyDelegate:self];
</ins><span class="cx">
</span><span class="cx"> [containerView addSubview:_webView];
</span><span class="cx"> }
</span><span class="lines">@@ -257,6 +258,13 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener
+{
+ NSLog(@"request %@ actionInformation %@", request, actionInformation);
+
+ [listener use];
+}
+
</ins><span class="cx"> // WebFrameLoadDelegate Methods
</span><span class="cx"> - (void)webView:(WebView *)sender didStartProvisionalLoadForFrame:(WebFrame *)frame
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkToolsMiniBrowsermacWK2BrowserWindowControllerm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m (163500 => 163501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m        2014-02-06 01:19:43 UTC (rev 163500)
+++ trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m        2014-02-06 01:49:06 UTC (rev 163501)
</span><span class="lines">@@ -672,6 +672,7 @@
</span><span class="cx"> - (void)browsingContextController:(WKBrowsingContextController *)browsingContext decidePolicyForNavigationAction:(NSDictionary *)actionInformation decisionHandler:(WKPolicyDecisionHandler)decisionHandler
</span><span class="cx"> {
</span><span class="cx"> LOG(@"decidePolicyForNavigationAction");
</span><ins>+ NSLog(@"action information %@", actionInformation);
</ins><span class="cx"> decisionHandler(WKPolicyDecisionAllow);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>