<!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>[177362] 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/177362">177362</a></dd>
<dt>Author</dt> <dd>mitz@apple.com</dd>
<dt>Date</dt> <dd>2014-12-16 09:45:13 -0800 (Tue, 16 Dec 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Cocoa] WKWebProcessPlugInLoadDelegate can’t tell what type of same-document navigation has happened
https://bugs.webkit.org/show_bug.cgi?id=139669

Reviewed by Anders Carlsson.

* Shared/API/Cocoa/_WKSameDocumentNavigationType.h: Added. Moved the
_WKSameDocumentNavigationType type definition here from WKNavigationDelegatePrivate.h.
* Shared/API/Cocoa/_WKSameDocumentNavigationTypeInternal.h: Added.
(WebKit::toWKSameDocumentNavigationType): Moved from NavigationState.mm.

* Shared/API/c/WKSharedAPICast.h:
(WebKit::toSameDocumentNavigationType): Added this conversion helper.

* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Added #import.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::toWKSameDocumentNavigationType): Deleted.

* WebKit2.xcodeproj/project.pbxproj: Updated for added headers.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Declared new
delegate method that take a navigation type parameter.

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(didSameDocumentNavigationForFrame): Changed to call the new delegate method, passing the
navigation type.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIcWKSharedAPICasth">trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKNavigationDelegatePrivateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.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="#trunkSourceWebKit2WebProcessInjectedBundleAPICocoaWKWebProcessPlugInLoadDelegateh">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPImacWKWebProcessPlugInBrowserContextControllermm">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2SharedAPICocoa_WKSameDocumentNavigationTypeh">trunk/Source/WebKit2/Shared/API/Cocoa/_WKSameDocumentNavigationType.h</a></li>
<li><a href="#trunkSourceWebKit2SharedAPICocoa_WKSameDocumentNavigationTypeInternalh">trunk/Source/WebKit2/Shared/API/Cocoa/_WKSameDocumentNavigationTypeInternal.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (177361 => 177362)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-12-16 17:15:24 UTC (rev 177361)
+++ trunk/Source/WebKit2/ChangeLog        2014-12-16 17:45:13 UTC (rev 177362)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2014-12-16  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        [Cocoa] WKWebProcessPlugInLoadDelegate can’t tell what type of same-document navigation has happened
+        https://bugs.webkit.org/show_bug.cgi?id=139669
+
+        Reviewed by Anders Carlsson.
+
+        * Shared/API/Cocoa/_WKSameDocumentNavigationType.h: Added. Moved the
+        _WKSameDocumentNavigationType type definition here from WKNavigationDelegatePrivate.h.
+        * Shared/API/Cocoa/_WKSameDocumentNavigationTypeInternal.h: Added.
+        (WebKit::toWKSameDocumentNavigationType): Moved from NavigationState.mm.
+
+        * Shared/API/c/WKSharedAPICast.h:
+        (WebKit::toSameDocumentNavigationType): Added this conversion helper.
+
+        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Added #import.
+
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::toWKSameDocumentNavigationType): Deleted.
+
+        * WebKit2.xcodeproj/project.pbxproj: Updated for added headers.
+
+        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Declared new
+        delegate method that take a navigation type parameter.
+
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
+        (didSameDocumentNavigationForFrame): Changed to call the new delegate method, passing the
+        navigation type.
+
</ins><span class="cx"> 2014-12-16  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.7.3 release.
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPICocoa_WKSameDocumentNavigationTypeh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/API/Cocoa/_WKSameDocumentNavigationType.h (0 => 177362)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/Cocoa/_WKSameDocumentNavigationType.h                                (rev 0)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/_WKSameDocumentNavigationType.h        2014-12-16 17:45:13 UTC (rev 177362)
</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 &lt;WebKit/WKFoundation.h&gt;
+
+#if WK_API_ENABLED
+
+typedef NS_ENUM(NSInteger, _WKSameDocumentNavigationType) {
+    _WKSameDocumentNavigationTypeAnchorNavigation,
+    _WKSameDocumentNavigationTypeSessionStatePush,
+    _WKSameDocumentNavigationTypeSessionStateReplace,
+    _WKSameDocumentNavigationTypeSessionStatePop,
+} WK_AVAILABLE(10_10, 8_0);
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharedAPICocoa_WKSameDocumentNavigationTypeInternalh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/API/Cocoa/_WKSameDocumentNavigationTypeInternal.h (0 => 177362)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/Cocoa/_WKSameDocumentNavigationTypeInternal.h                                (rev 0)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/_WKSameDocumentNavigationTypeInternal.h        2014-12-16 17:45:13 UTC (rev 177362)
</span><span class="lines">@@ -0,0 +1,48 @@
</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;SameDocumentNavigationType.h&quot;
+#import &quot;_WKSameDocumentNavigationType.h&quot;
+
+namespace WebKit {
+
+static _WKSameDocumentNavigationType toWKSameDocumentNavigationType(SameDocumentNavigationType navigationType)
+{
+    switch (navigationType) {
+    case SameDocumentNavigationAnchorNavigation:
+        return _WKSameDocumentNavigationTypeAnchorNavigation;
+    case SameDocumentNavigationSessionStatePush:
+        return _WKSameDocumentNavigationTypeSessionStatePush;
+    case SameDocumentNavigationSessionStateReplace:
+        return _WKSameDocumentNavigationTypeSessionStateReplace;
+    case SameDocumentNavigationSessionStatePop:
+        return _WKSameDocumentNavigationTypeSessionStatePop;
+    }
+
+    ASSERT_NOT_REACHED();
+    return _WKSameDocumentNavigationTypeAnchorNavigation;
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIcWKSharedAPICasth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h (177361 => 177362)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h        2014-12-16 17:15:24 UTC (rev 177361)
+++ trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h        2014-12-16 17:45:13 UTC (rev 177362)
</span><span class="lines">@@ -804,6 +804,28 @@
</span><span class="cx">     return wkType;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline SameDocumentNavigationType toSameDocumentNavigationType(WKSameDocumentNavigationType wkType)
+{
+    SameDocumentNavigationType type = SameDocumentNavigationAnchorNavigation;
+
+    switch (wkType) {
+    case kWKSameDocumentNavigationAnchorNavigation:
+        type = SameDocumentNavigationAnchorNavigation;
+        break;
+    case kWKSameDocumentNavigationSessionStatePush:
+        type = SameDocumentNavigationSessionStatePush;
+        break;
+    case kWKSameDocumentNavigationSessionStateReplace:
+        type = SameDocumentNavigationSessionStateReplace;
+        break;
+    case kWKSameDocumentNavigationSessionStatePop:
+        type = SameDocumentNavigationSessionStatePop;
+        break;
+    }
+    
+    return type;
+}
+
</ins><span class="cx"> inline WKLayoutMilestones toWKLayoutMilestones(WebCore::LayoutMilestones milestones)
</span><span class="cx"> {
</span><span class="cx">     unsigned wkMilestones = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKNavigationDelegatePrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h (177361 => 177362)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h        2014-12-16 17:15:24 UTC (rev 177361)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h        2014-12-16 17:45:13 UTC (rev 177362)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> 
</span><span class="cx"> #import &lt;WebKit/WKFrameInfo.h&gt;
</span><span class="cx"> #import &lt;WebKit/WKWebViewPrivate.h&gt;
</span><ins>+#import &lt;WebKit/_WKSameDocumentNavigationType.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> 
</span><span class="lines">@@ -34,13 +35,6 @@
</span><span class="cx"> 
</span><span class="cx"> static const WKNavigationResponsePolicy _WKNavigationResponsePolicyBecomeDownload = (WKNavigationResponsePolicy)(WKNavigationResponsePolicyAllow + 1);
</span><span class="cx"> 
</span><del>-typedef NS_ENUM(NSInteger, _WKSameDocumentNavigationType) {
-    _WKSameDocumentNavigationTypeAnchorNavigation,
-    _WKSameDocumentNavigationTypeSessionStatePush,
-    _WKSameDocumentNavigationTypeSessionStateReplace,
-    _WKSameDocumentNavigationTypeSessionStatePop,
-} WK_AVAILABLE(10_10, 8_0);
-
</del><span class="cx"> @protocol WKNavigationDelegatePrivate &lt;WKNavigationDelegate&gt;
</span><span class="cx"> 
</span><span class="cx"> @optional
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaNavigationStatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (177361 => 177362)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm        2014-12-16 17:15:24 UTC (rev 177361)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm        2014-12-16 17:45:13 UTC (rev 177362)
</span><span class="lines">@@ -56,6 +56,7 @@
</span><span class="cx"> #import &quot;WebProtectionSpace.h&quot;
</span><span class="cx"> #import &quot;_WKErrorRecoveryAttempting.h&quot;
</span><span class="cx"> #import &quot;_WKFrameHandleInternal.h&quot;
</span><ins>+#import &quot;_WKSameDocumentNavigationTypeInternal.h&quot;
</ins><span class="cx"> #import &lt;WebCore/Credential.h&gt;
</span><span class="cx"> #import &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -621,23 +622,6 @@
</span><span class="cx">     [navigationDelegate webView:m_navigationState.m_webView didFailNavigation:navigation withError:errorWithRecoveryAttempter.get()];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static _WKSameDocumentNavigationType toWKSameDocumentNavigationType(SameDocumentNavigationType navigationType)
-{
-    switch (navigationType) {
-    case SameDocumentNavigationAnchorNavigation:
-        return _WKSameDocumentNavigationTypeAnchorNavigation;
-    case SameDocumentNavigationSessionStatePush:
-        return _WKSameDocumentNavigationTypeSessionStatePush;
-    case SameDocumentNavigationSessionStateReplace:
-        return _WKSameDocumentNavigationTypeSessionStateReplace;
-    case SameDocumentNavigationSessionStatePop:
-        return _WKSameDocumentNavigationTypeSessionStatePop;
-    }
-
-    ASSERT_NOT_REACHED();
-    return _WKSameDocumentNavigationTypeAnchorNavigation;
-}
-
</del><span class="cx"> void NavigationState::LoaderClient::didSameDocumentNavigationForFrame(WebPageProxy*, WebFrameProxy* webFrameProxy, uint64_t navigationID, SameDocumentNavigationType navigationType, API::Object*)
</span><span class="cx"> {
</span><span class="cx">     if (!webFrameProxy-&gt;isMainFrame())
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (177361 => 177362)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-12-16 17:15:24 UTC (rev 177361)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-12-16 17:45:13 UTC (rev 177362)
</span><span class="lines">@@ -735,6 +735,8 @@
</span><span class="cx">                 3760881F150413E900FC82C7 /* WebRenderObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 3760881D150413E900FC82C7 /* WebRenderObject.h */; };
</span><span class="cx">                 37608822150414F700FC82C7 /* WKRenderObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37608820150414F700FC82C7 /* WKRenderObject.cpp */; };
</span><span class="cx">                 37608823150414F700FC82C7 /* WKRenderObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 37608821150414F700FC82C7 /* WKRenderObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                376311FD1A3FB5F7005A2E51 /* _WKSameDocumentNavigationType.h in Headers */ = {isa = PBXBuildFile; fileRef = 376311F81A3FB30B005A2E51 /* _WKSameDocumentNavigationType.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                376311FE1A3FB600005A2E51 /* _WKSameDocumentNavigationTypeInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 376311FA1A3FB38B005A2E51 /* _WKSameDocumentNavigationTypeInternal.h */; };
</ins><span class="cx">                 3766F9EE189A1241003CF19B /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1C7DE100E846E0078DEBC /* JavaScriptCore.framework */; };
</span><span class="cx">                 3766F9EF189A1244003CF19B /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CC5C100FA1A10078DEBC /* QuartzCore.framework */; };
</span><span class="cx">                 3766F9F1189A1254003CF19B /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BC87DFA91018101400564216 /* libicucore.dylib */; };
</span><span class="lines">@@ -2791,6 +2793,8 @@
</span><span class="cx">                 3760881D150413E900FC82C7 /* WebRenderObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebRenderObject.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37608820150414F700FC82C7 /* WKRenderObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKRenderObject.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37608821150414F700FC82C7 /* WKRenderObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKRenderObject.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                376311F81A3FB30B005A2E51 /* _WKSameDocumentNavigationType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKSameDocumentNavigationType.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                376311FA1A3FB38B005A2E51 /* _WKSameDocumentNavigationTypeInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKSameDocumentNavigationTypeInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 3769079818F31CB2001DFF04 /* APIInjectedBundlePageUIClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = APIInjectedBundlePageUIClient.h; path = API/APIInjectedBundlePageUIClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 3769079C18F340A2001DFF04 /* APIInjectedBundleFormClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIInjectedBundleFormClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 376C51171957452E0007B0FA /* _WKSecurityOrigin.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKSecurityOrigin.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -5256,6 +5260,8 @@
</span><span class="cx">                                 1A9E329C1822FEDD00F5D04C /* WKRemoteObjectCoder.mm */,
</span><span class="cx">                                 1F604BA61889FA7400EE0395 /* WKRenderingProgressEvents.h */,
</span><span class="cx">                                 1F604BA71889FA7400EE0395 /* WKRenderingProgressEventsInternal.h */,
</span><ins>+                                376311F81A3FB30B005A2E51 /* _WKSameDocumentNavigationType.h */,
+                                376311FA1A3FB38B005A2E51 /* _WKSameDocumentNavigationTypeInternal.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = Cocoa;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -7839,6 +7845,7 @@
</span><span class="cx">                                 BC5D24C716CD73C5007D5461 /* WKBundleRangeHandlePrivate.h in Headers */,
</span><span class="cx">                                 BC14DF9F120B635F00826C0C /* WKBundleScriptWorld.h in Headers */,
</span><span class="cx">                                 1AF4CEF018BC481800BC2D34 /* VisitedLinkTableController.h in Headers */,
</span><ins>+                                376311FD1A3FB5F7005A2E51 /* _WKSameDocumentNavigationType.h in Headers */,
</ins><span class="cx">                                 E4436ECC1A0D040B00EAD204 /* NetworkCache.h in Headers */,
</span><span class="cx">                                 BC4075F6124FF0270068F20A /* WKCertificateInfo.h in Headers */,
</span><span class="cx">                                 BC407627124FF0400068F20A /* WKCertificateInfoMac.h in Headers */,
</span><span class="lines">@@ -7946,6 +7953,7 @@
</span><span class="cx">                                 37C4C08918149F23003688B9 /* WKBackForwardListItemInternal.h in Headers */,
</span><span class="cx">                                 51D0D437183B353D0097041D /* DatabaseProcessIDBConnectionMessages.h in Headers */,
</span><span class="cx">                                 BCBAACED145225E30053F82F /* WKProcessGroupPrivate.h in Headers */,
</span><ins>+                                376311FE1A3FB600005A2E51 /* _WKSameDocumentNavigationTypeInternal.h in Headers */,
</ins><span class="cx">                                 512F58FC12A88A5400629530 /* WKProtectionSpace.h in Headers */,
</span><span class="cx">                                 518ACAEA12AEE6BB00B04B83 /* WKProtectionSpaceTypes.h in Headers */,
</span><span class="cx">                                 37948409150C4B9700E52CE9 /* WKRenderLayer.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPICocoaWKWebProcessPlugInLoadDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h (177361 => 177362)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h        2014-12-16 17:15:24 UTC (rev 177361)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h        2014-12-16 17:45:13 UTC (rev 177362)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx">  */
</span><span class="cx"> #import &lt;Foundation/Foundation.h&gt;
</span><span class="cx"> #import &lt;WebKit/WKRenderingProgressEvents.h&gt;
</span><ins>+#import &lt;WebKit/_WKSameDocumentNavigationType.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> @class WKWebProcessPlugInBrowsingContextController;
</span><span class="cx"> @class WKWebProcessPlugInFrame;
</span><span class="lines">@@ -40,7 +41,7 @@
</span><span class="cx"> - (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController*)controller didFinishDocumentLoadForFrame:(WKWebProcessPlugInFrame *)frame;
</span><span class="cx"> - (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController*)controller didFailLoadWithErrorForFrame:(WKWebProcessPlugInFrame *)frame error:(NSError *)error;
</span><span class="cx"> - (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController*)controller didFinishLoadForFrame:(WKWebProcessPlugInFrame *)frame;
</span><del>-- (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController*)controller didSameDocumentNavigationForFrame:(WKWebProcessPlugInFrame *)frame;
</del><ins>+- (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController*)controller didSameDocumentNavigation:(_WKSameDocumentNavigationType)navigationType forFrame:(WKWebProcessPlugInFrame *)frame;
</ins><span class="cx"> - (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController*)controller globalObjectIsAvailableForFrame:(WKWebProcessPlugInFrame *)frame inScriptWorld:(WKWebProcessPlugInScriptWorld *)scriptWorld;
</span><span class="cx"> - (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController *)controller didRemoveFrameFromHierarchy:(WKWebProcessPlugInFrame *)frame;
</span><span class="cx"> - (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController *)controller didHandleOnloadEventsForFrame:(WKWebProcessPlugInFrame *)frame;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPImacWKWebProcessPlugInBrowserContextControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm (177361 => 177362)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm        2014-12-16 17:15:24 UTC (rev 177361)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm        2014-12-16 17:45:13 UTC (rev 177362)
</span><span class="lines">@@ -56,6 +56,7 @@
</span><span class="cx"> #import &quot;WebPage.h&quot;
</span><span class="cx"> #import &quot;WebProcess.h&quot;
</span><span class="cx"> #import &quot;_WKRemoteObjectRegistryInternal.h&quot;
</span><ins>+#import &quot;_WKSameDocumentNavigationTypeInternal.h&quot;
</ins><span class="cx"> #import &lt;WebCore/Document.h&gt;
</span><span class="cx"> #import &lt;WebCore/Frame.h&gt;
</span><span class="cx"> #import &lt;WebCore/HTMLFormElement.h&gt;
</span><span class="lines">@@ -65,6 +66,10 @@
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> using namespace WebKit;
</span><span class="cx"> 
</span><ins>+@interface NSObject (WKDeprecatedDelegateMethods)
+- (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController *)controller didSameDocumentNavigationForFrame:(WKWebProcessPlugInFrame *)frame;
+@end
+
</ins><span class="cx"> @implementation WKWebProcessPlugInBrowserContextController {
</span><span class="cx">     API::ObjectStorage&lt;WebPage&gt; _page;
</span><span class="cx">     WeakObjCPtr&lt;id &lt;WKWebProcessPlugInLoadDelegate&gt;&gt; _loadDelegate;
</span><span class="lines">@@ -150,8 +155,13 @@
</span><span class="cx">     WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo;
</span><span class="cx">     auto loadDelegate = pluginContextController-&gt;_loadDelegate.get();
</span><span class="cx"> 
</span><del>-    if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didSameDocumentNavigationForFrame:)])
-        [loadDelegate webProcessPlugInBrowserContextController:pluginContextController didSameDocumentNavigationForFrame:wrapper(*toImpl(frame))];
</del><ins>+    if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didSameDocumentNavigation:forFrame:)])
+        [loadDelegate webProcessPlugInBrowserContextController:pluginContextController didSameDocumentNavigation:toWKSameDocumentNavigationType(toSameDocumentNavigationType(type)) forFrame:wrapper(*toImpl(frame))];
+    else {
+        // FIXME: Remove this once clients switch to implementing the above delegate method.
+        if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didSameDocumentNavigationForFrame:)])
+            [(NSObject *)loadDelegate webProcessPlugInBrowserContextController:pluginContextController didSameDocumentNavigationForFrame:wrapper(*toImpl(frame))];
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void didLayoutForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo)
</span></span></pre>
</div>
</div>

</body>
</html>