<!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>[186591] branches/safari-600.1.4.17-branch</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/186591">186591</a></dd>
<dt>Author</dt> <dd>ddkilzer@apple.com</dd>
<dt>Date</dt> <dd>2015-07-09 07:41:30 -0700 (Thu, 09 Jul 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/184151">r184151</a>, and a small part of <a href="http://trac.webkit.org/projects/webkit/changeset/183813">r183813</a>.  rdar://problem/21716549</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6001417branchSourceWebCoreChangeLog">branches/safari-600.1.4.17-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6001417branchSourceWebCoreloaderDocumentLoadercpp">branches/safari-600.1.4.17-branch/Source/WebCore/loader/DocumentLoader.cpp</a></li>
<li><a href="#branchessafari6001417branchSourceWebCoreloaderFrameLoaderClienth">branches/safari-600.1.4.17-branch/Source/WebCore/loader/FrameLoaderClient.h</a></li>
<li><a href="#branchessafari6001417branchSourceWebKit2ChangeLog">branches/safari-600.1.4.17-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari6001417branchSourceWebKit2UIProcessFrameLoadStateh">branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/FrameLoadState.h</a></li>
<li><a href="#branchessafari6001417branchSourceWebKit2UIProcessWebPageProxycpp">branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#branchessafari6001417branchSourceWebKit2UIProcessWebPageProxyh">branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#branchessafari6001417branchSourceWebKit2UIProcessWebPageProxymessagesin">branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#branchessafari6001417branchSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp">branches/safari-600.1.4.17-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#branchessafari6001417branchSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClienth">branches/safari-600.1.4.17-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h</a></li>
<li><a href="#branchessafari6001417branchToolsChangeLog">branches/safari-600.1.4.17-branch/Tools/ChangeLog</a></li>
<li><a href="#branchessafari6001417branchToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">branches/safari-600.1.4.17-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari6001417branchToolsTestWebKitAPITestsWebKit2CocoaProvisionalURLChangemm">branches/safari-600.1.4.17-branch/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ProvisionalURLChange.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6001417branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.17-branch/Source/WebCore/ChangeLog (186590 => 186591)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.17-branch/Source/WebCore/ChangeLog        2015-07-09 08:58:49 UTC (rev 186590)
+++ branches/safari-600.1.4.17-branch/Source/WebCore/ChangeLog        2015-07-09 14:41:30 UTC (rev 186591)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2015-07-09  David Kilzer  &lt;ddkilzer@apple.com&gt;
+
+        &lt;rdar://problem/21716549&gt; Donner: Safari URL And Javascript Prompt Origin Spoof Vulnerability
+
+        Merge r184151.
+
+    2015-05-11  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        WebCore part of &lt;rdar://problem/20878075&gt; Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL
+
+        Reviewed by Alexey Proskuryakov.
+
+        Test: TestWebKitAPI/Tests/WebKit2Cocoa/ProvisionalURLChange.mm
+
+        In some cases, trying to navigate to an invalid URL results in navigation to about:blank.
+        When the about:blank load is committed, the UI process still thinks that the provisional
+        URL is the original, invalid URL, and updates its state to reflect that that’s the URL that
+        has been committed.
+
+        The provisional URL changes (1) when a provisional load begins, (2) when a server redirect
+        happens, (3) when the client changes the request in willSendRequest, and (4) in this
+        about:blank case. For (1) and (2), there are frame loader client callbacks. (3) is client-
+        initiated. So this patch addresses (4).
+
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::maybeLoadEmpty): If our request URL is changing to about:blank and
+        while loading the main resource, call FrameLoaderClient::dispatchDidChangeProvisionalURL.
+        * loader/FrameLoaderClient.h: Added dispatchDidChangeProvisionalURL with an empty
+        implementation.
+
</ins><span class="cx"> 2015-07-08  Lucas Forschler  &lt;lforschler@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r186165. rdar://problem/21533207
</span></span></pre></div>
<a id="branchessafari6001417branchSourceWebCoreloaderDocumentLoadercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.17-branch/Source/WebCore/loader/DocumentLoader.cpp (186590 => 186591)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.17-branch/Source/WebCore/loader/DocumentLoader.cpp        2015-07-09 08:58:49 UTC (rev 186590)
+++ branches/safari-600.1.4.17-branch/Source/WebCore/loader/DocumentLoader.cpp        2015-07-09 14:41:30 UTC (rev 186591)
</span><span class="lines">@@ -1389,8 +1389,12 @@
</span><span class="cx">     if (!shouldLoadEmpty &amp;&amp; !frameLoader()-&gt;client().representationExistsForURLScheme(m_request.url().protocol()))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    if (m_request.url().isEmpty() &amp;&amp; !frameLoader()-&gt;stateMachine().creatingInitialEmptyDocument())
</del><ins>+    if (m_request.url().isEmpty() &amp;&amp; !frameLoader()-&gt;stateMachine().creatingInitialEmptyDocument()) {
</ins><span class="cx">         m_request.setURL(blankURL());
</span><ins>+        if (isLoadingMainResource())
+            frameLoader()-&gt;client().dispatchDidChangeProvisionalURL();
+    }
+
</ins><span class="cx">     String mimeType = shouldLoadEmpty ? &quot;text/html&quot; : frameLoader()-&gt;client().generatedMIMETypeForURLScheme(m_request.url().protocol());
</span><span class="cx">     m_response = ResourceResponse(m_request.url(), mimeType, 0, String(), String());
</span><span class="cx">     finishedLoading(monotonicallyIncreasingTime());
</span></span></pre></div>
<a id="branchessafari6001417branchSourceWebCoreloaderFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.17-branch/Source/WebCore/loader/FrameLoaderClient.h (186590 => 186591)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.17-branch/Source/WebCore/loader/FrameLoaderClient.h        2015-07-09 08:58:49 UTC (rev 186590)
+++ branches/safari-600.1.4.17-branch/Source/WebCore/loader/FrameLoaderClient.h        2015-07-09 14:41:30 UTC (rev 186591)
</span><span class="lines">@@ -153,6 +153,7 @@
</span><span class="cx"> 
</span><span class="cx">         virtual void dispatchDidHandleOnloadEvents() = 0;
</span><span class="cx">         virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() = 0;
</span><ins>+        virtual void dispatchDidChangeProvisionalURL() { }
</ins><span class="cx">         virtual void dispatchDidCancelClientRedirect() = 0;
</span><span class="cx">         virtual void dispatchWillPerformClientRedirect(const URL&amp;, double interval, double fireDate) = 0;
</span><span class="cx">         virtual void dispatchDidNavigateWithinPage() { }
</span></span></pre></div>
<a id="branchessafari6001417branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.17-branch/Source/WebKit2/ChangeLog (186590 => 186591)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.17-branch/Source/WebKit2/ChangeLog        2015-07-09 08:58:49 UTC (rev 186590)
+++ branches/safari-600.1.4.17-branch/Source/WebKit2/ChangeLog        2015-07-09 14:41:30 UTC (rev 186591)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2015-07-09  David Kilzer  &lt;ddkilzer@apple.com&gt;
+
+        &lt;rdar://problem/21716549&gt; Donner: Safari URL And Javascript Prompt Origin Spoof Vulnerability
+
+        Merge r184151.
+
+        * UIProcess/FrameLoadState.h:
+        (WebKit::FrameLoadState::state):
+        (WebKit::FrameLoadState::url):
+        (WebKit::FrameLoadState::provisionalURL):
+        (WebKit::FrameLoadState::unreachableURL):
+        - Merge FrameLoadState getter methods from r183813.  Only
+          FrameLoadState::state() is used in this patch, but there may
+          be later patches that depend on these methods.
+
+    2015-05-11  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        WebKit2 part of &lt;rdar://problem/20878075&gt; Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL
+
+        Reviewed by Alexey Proskuryakov.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didChangeProvisionalURLForFrame): Added. Update internal state the
+        same way we update it for server redirects, but don’t make client callbacks. Clients
+        observing the URL property will see it change.
+        * UIProcess/WebPageProxy.h:
+
+        * UIProcess/WebPageProxy.messages.in: Added DidChangeProvisionalURLForFrame.
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::dispatchDidChangeProvisionalURL): Override this new
+        FrameLoaderClient function to send a DidChangeProvisionalURLForFrame message to the UI
+        process.
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+
</ins><span class="cx"> 2015-07-08  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r183861. rdar://problem/21716677
</span></span></pre></div>
<a id="branchessafari6001417branchSourceWebKit2UIProcessFrameLoadStateh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/FrameLoadState.h (186590 => 186591)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/FrameLoadState.h        2015-07-09 08:58:49 UTC (rev 186590)
+++ branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/FrameLoadState.h        2015-07-09 14:41:30 UTC (rev 186591)
</span><span class="lines">@@ -51,7 +51,12 @@
</span><span class="cx"> 
</span><span class="cx">     void didSameDocumentNotification(const String&amp;);
</span><span class="cx"> 
</span><ins>+    State state() const { return m_state; }
+    const String&amp; url() const { return m_url; }
+    const String&amp; provisionalURL() const { return m_provisionalURL; }
+
</ins><span class="cx">     void setUnreachableURL(const String&amp;);
</span><ins>+    const String&amp; unreachableURL() const { return m_unreachableURL; }
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: These should all be private, and FrameLoadState should
</span><span class="cx">     // provide state transition member functions.
</span></span></pre></div>
<a id="branchessafari6001417branchSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp (186590 => 186591)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-07-09 08:58:49 UTC (rev 186590)
+++ branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-07-09 14:41:30 UTC (rev 186591)
</span><span class="lines">@@ -2558,6 +2558,23 @@
</span><span class="cx">     m_loaderClient-&gt;didReceiveServerRedirectForProvisionalLoadForFrame(this, frame, navigationID, userData.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebPageProxy::didChangeProvisionalURLForFrame(uint64_t frameID, uint64_t, const String&amp; url)
+{
+    WebFrameProxy* frame = m_process-&gt;webFrame(frameID);
+    MESSAGE_CHECK(frame);
+    MESSAGE_CHECK(frame-&gt;frameLoadState().state() == FrameLoadState::State::Provisional);
+    MESSAGE_CHECK_URL(url);
+
+    auto transaction = m_pageLoadState.transaction();
+
+    // Internally, we handle this the same way we handle a server redirect. There are no client callbacks
+    // for this, but if this is the main frame, clients may observe a change to the page's URL.
+    if (frame-&gt;isMainFrame())
+        m_pageLoadState.didReceiveServerRedirectForProvisionalLoad(transaction, url);
+
+    frame-&gt;didReceiveServerRedirectForProvisionalLoad(url);
+}
+
</ins><span class="cx"> void WebPageProxy::didFailProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const ResourceError&amp; error, IPC::MessageDecoder&amp; decoder)
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;API::Object&gt; userData;
</span></span></pre></div>
<a id="branchessafari6001417branchSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/WebPageProxy.h (186590 => 186591)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2015-07-09 08:58:49 UTC (rev 186590)
+++ branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2015-07-09 14:41:30 UTC (rev 186591)
</span><span class="lines">@@ -959,6 +959,7 @@
</span><span class="cx"> 
</span><span class="cx">     void didStartProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const String&amp; url, const String&amp; unreachableURL, IPC::MessageDecoder&amp;);
</span><span class="cx">     void didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const String&amp;, IPC::MessageDecoder&amp;);
</span><ins>+    void didChangeProvisionalURLForFrame(uint64_t frameID, uint64_t navigationID, const String&amp; url);
</ins><span class="cx">     void didFailProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const WebCore::ResourceError&amp;, IPC::MessageDecoder&amp;);
</span><span class="cx">     void didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, const String&amp; mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&amp;, IPC::MessageDecoder&amp;);
</span><span class="cx">     void didFinishDocumentLoadForFrame(uint64_t frameID, uint64_t navigationID, IPC::MessageDecoder&amp;);
</span></span></pre></div>
<a id="branchessafari6001417branchSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in (186590 => 186591)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2015-07-09 08:58:49 UTC (rev 186590)
+++ branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2015-07-09 14:41:30 UTC (rev 186591)
</span><span class="lines">@@ -128,6 +128,7 @@
</span><span class="cx">     # Frame load messages
</span><span class="cx">     DidStartProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, String url, String unreachableURL, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
</span><span class="cx">     DidReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, String url, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
</span><ins>+    DidChangeProvisionalURLForFrame(uint64_t frameID, uint64_t navigationID, String url)
</ins><span class="cx">     DidFailProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
</span><span class="cx">     DidCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, String mimeType, bool hasCustomContentProvider, uint32_t loadType, WebCore::CertificateInfo certificateInfo, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
</span><span class="cx">     DidFailLoadForFrame(uint64_t frameID, uint64_t navigationID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
</span></span></pre></div>
<a id="branchessafari6001417branchSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.17-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (186590 => 186591)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.17-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2015-07-09 08:58:49 UTC (rev 186590)
+++ branches/safari-600.1.4.17-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2015-07-09 14:41:30 UTC (rev 186591)
</span><span class="lines">@@ -299,6 +299,16 @@
</span><span class="cx">     webPage-&gt;send(Messages::WebPageProxy::DidReceiveServerRedirectForProvisionalLoadForFrame(m_frame-&gt;frameID(), documentLoader.navigationID(), url, InjectedBundleUserMessageEncoder(userData.get())));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebFrameLoaderClient::dispatchDidChangeProvisionalURL()
+{
+    WebPage* webPage = m_frame-&gt;page();
+    if (!webPage)
+        return;
+
+    WebDocumentLoader&amp; documentLoader = static_cast&lt;WebDocumentLoader&amp;&gt;(*m_frame-&gt;coreFrame()-&gt;loader().provisionalDocumentLoader());
+    webPage-&gt;send(Messages::WebPageProxy::DidChangeProvisionalURLForFrame(m_frame-&gt;frameID(), documentLoader.navigationID(), documentLoader.url().string()));
+}
+
</ins><span class="cx"> void WebFrameLoaderClient::dispatchDidCancelClientRedirect()
</span><span class="cx"> {
</span><span class="cx">     WebPage* webPage = m_frame-&gt;page();
</span></span></pre></div>
<a id="branchessafari6001417branchSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.17-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (186590 => 186591)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.17-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h        2015-07-09 08:58:49 UTC (rev 186590)
+++ branches/safari-600.1.4.17-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h        2015-07-09 14:41:30 UTC (rev 186591)
</span><span class="lines">@@ -80,6 +80,7 @@
</span><span class="cx">     
</span><span class="cx">     virtual void dispatchDidHandleOnloadEvents() override;
</span><span class="cx">     virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() override;
</span><ins>+    virtual void dispatchDidChangeProvisionalURL() override;
</ins><span class="cx">     virtual void dispatchDidCancelClientRedirect() override;
</span><span class="cx">     virtual void dispatchWillPerformClientRedirect(const WebCore::URL&amp;, double interval, double fireDate) override;
</span><span class="cx">     virtual void dispatchDidChangeLocationWithinPage() override;
</span></span></pre></div>
<a id="branchessafari6001417branchToolsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.17-branch/Tools/ChangeLog (186590 => 186591)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.17-branch/Tools/ChangeLog        2015-07-09 08:58:49 UTC (rev 186590)
+++ branches/safari-600.1.4.17-branch/Tools/ChangeLog        2015-07-09 14:41:30 UTC (rev 186591)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-07-09  David Kilzer  &lt;ddkilzer@apple.com&gt;
+
+        &lt;rdar://problem/21716549&gt; Donner: Safari URL And Javascript Prompt Origin Spoof Vulnerability
+
+        Merge r184151.
+
+    2015-05-11  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        Test for &lt;rdar://problem/20878075&gt; Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL
+
+        Reviewed by Alexey Proskuryakov.
+
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WebKit2Cocoa/LoadAlternateHTMLString.mm: Fixed copyright header.
+        * TestWebKitAPI/Tests/WebKit2Cocoa/ProvisionalURLChange.mm: Added.
+        (-[ProvisionalURLChangeController webView:didFinishNavigation:]):
+
</ins><span class="cx"> 2015-07-08  Lucas Forschler  &lt;lforschler@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r184975. rdar://problem/21716564 
</span><span class="lines">@@ -812,6 +829,18 @@
</span><span class="cx">         Reviewed by Simon Fraser.
</span><span class="cx"> 
</span><span class="cx">         * Scripts/webkitpy/layout_tests/models/test_run_results.py:
</span><ins>+2015-05-01  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        Test for &lt;rdar://problem/8636045&gt; Back/forward navigation to an error page in Safari breaks the back-forward list
+        https://bugs.webkit.org/show_bug.cgi?id=144501
+
+        Reviewed by Darin Adler.
+
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WebKit2Cocoa/LoadAlternateHTMLString.mm: Added.
+        (-[LoadAlternateHTMLStringFromProvisionalLoadErrorController webView:didFailProvisionalNavigation:withError:]):
+        (-[LoadAlternateHTMLStringFromProvisionalLoadErrorController webView:didFinishNavigation:]):
+
</ins><span class="cx">         * Scripts/webkitpy/layout_tests/views/buildbot_results.py:
</span><span class="cx">         Count these as regressions, not as flaky tests.
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6001417branchToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.17-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (186590 => 186591)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.17-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2015-07-09 08:58:49 UTC (rev 186590)
+++ branches/safari-600.1.4.17-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2015-07-09 14:41:30 UTC (rev 186591)
</span><span class="lines">@@ -82,6 +82,7 @@
</span><span class="cx">                 3799AD3A14120A43005EB0C6 /* StringByEvaluatingJavaScriptFromString.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3799AD3914120A43005EB0C6 /* StringByEvaluatingJavaScriptFromString.mm */; };
</span><span class="cx">                 37A6895F148A9B50005100FA /* SubresourceErrorCrash.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37A6895D148A9B50005100FA /* SubresourceErrorCrash.mm */; };
</span><span class="cx">                 37C784E0197C8F2E0010A496 /* RenderedImageFromDOMNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37C784DE197C8F2E0010A496 /* RenderedImageFromDOMNode.mm */; };
</span><ins>+                37D36F321B004DD400BAF5D9 /* ProvisionalURLChange.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37D36F311B004DD400BAF5D9 /* ProvisionalURLChange.mm */; };
</ins><span class="cx">                 37DC678D140D7C5000ABCCDB /* DOMRangeOfString.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37DC678B140D7C5000ABCCDB /* DOMRangeOfString.mm */; };
</span><span class="cx">                 37DC6791140D7D7600ABCCDB /* DOMRangeOfString.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 37DC678F140D7D3A00ABCCDB /* DOMRangeOfString.html */; };
</span><span class="cx">                 37E1064C1697681800B78BD0 /* DOMHTMLTableCellElementCellAbove.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 37E1064B169767F700B78BD0 /* DOMHTMLTableCellElementCellAbove.html */; };
</span><span class="lines">@@ -425,6 +426,7 @@
</span><span class="cx">                 3799AD3914120A43005EB0C6 /* StringByEvaluatingJavaScriptFromString.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StringByEvaluatingJavaScriptFromString.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37A6895D148A9B50005100FA /* SubresourceErrorCrash.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SubresourceErrorCrash.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37C784DE197C8F2E0010A496 /* RenderedImageFromDOMNode.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RenderedImageFromDOMNode.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                37D36F311B004DD400BAF5D9 /* ProvisionalURLChange.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ProvisionalURLChange.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 37DC678B140D7C5000ABCCDB /* DOMRangeOfString.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMRangeOfString.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37DC678F140D7D3A00ABCCDB /* DOMRangeOfString.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = DOMRangeOfString.html; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37E1064A1697676400B78BD0 /* DOMHTMLTableCellCellAbove.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMHTMLTableCellCellAbove.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -710,6 +712,7 @@
</span><span class="cx">                                 A1A4FE5D18DD3DB700B5EA8A /* Download.mm */,
</span><span class="cx">                                 1ABC3DED1899BE6D004F0626 /* Navigation.mm */,
</span><span class="cx">                                 CEA6CF2219CCF5BD0064F5A7 /* OpenAndCloseWindow.mm */,
</span><ins>+                                37D36F311B004DD400BAF5D9 /* ProvisionalURLChange.mm */,
</ins><span class="cx">                                 7CC3E1FA197E234100BE6252 /* UserContentController.mm */,
</span><span class="cx">                         );
</span><span class="cx">                         name = &quot;WebKit2 Cocoa&quot;;
</span><span class="lines">@@ -1231,6 +1234,7 @@
</span><span class="cx">                                 29AB8AA1164C735800D49BEC /* CustomProtocolsTest.mm in Sources */,
</span><span class="cx">                                 3776BC63150946BC0043A66D /* DeviceScaleFactorInDashboardRegions.mm in Sources */,
</span><span class="cx">                                 939BA91714103412001A01BD /* DeviceScaleFactorOnBack.mm in Sources */,
</span><ins>+                                37D36F321B004DD400BAF5D9 /* ProvisionalURLChange.mm in Sources */,
</ins><span class="cx">                                 BCB68040126FBFE100642A61 /* DocumentStartUserScriptAlertCrash.cpp in Sources */,
</span><span class="cx">                                 37E1064D16976C8500B78BD0 /* DOMHTMLTableCellCellAbove.mm in Sources */,
</span><span class="cx">                                 7560917819259C59009EF06E /* MemoryCacheAddImageToCacheIOS.mm in Sources */,
</span></span></pre></div>
<a id="branchessafari6001417branchToolsTestWebKitAPITestsWebKit2CocoaProvisionalURLChangemmfromrev186577branchessafari6001417branchSourceWebKit2UIProcessFrameLoadStateh"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.17-branch/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ProvisionalURLChange.mm (from rev 186577, branches/safari-600.1.4.17-branch/Source/WebKit2/UIProcess/FrameLoadState.h) (0 => 186591)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.17-branch/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ProvisionalURLChange.mm                                (rev 0)
+++ branches/safari-600.1.4.17-branch/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ProvisionalURLChange.mm        2015-07-09 14:41:30 UTC (rev 186591)
</span><span class="lines">@@ -0,0 +1,66 @@
</span><ins>+/*
+ * Copyright (C) 2015 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 &lt;WebKit/WKFoundation.h&gt;
+
+#if WK_API_ENABLED
+
+#import &quot;PlatformUtilities.h&quot;
+#import &quot;Test.h&quot;
+#import &lt;wtf/RetainPtr.h&gt;
+
+static bool isDone;
+
+@interface ProvisionalURLChangeController : NSObject &lt;WKNavigationDelegate&gt;
+@end
+
+@implementation ProvisionalURLChangeController
+
+- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation
+{
+    isDone = true;
+}
+
+@end
+
+TEST(WKWebView, ProvisionalURLChange)
+{
+    auto webView = adoptNS([[WKWebView alloc] init]);
+    auto controller = adoptNS([[ProvisionalURLChangeController alloc] init]);
+    [webView setNavigationDelegate:controller.get()];
+
+    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@&quot;data:text/html,start&quot;]]];
+    TestWebKitAPI::Util::run(&amp;isDone);
+    isDone = false;
+
+    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@&quot;http://www.webkit.org!&quot;]]];
+    TestWebKitAPI::Util::run(&amp;isDone);
+    isDone = false;
+
+    EXPECT_STREQ([webView URL].absoluteString.UTF8String, &quot;about:blank&quot;);
+}
+
+#endif
</ins></span></pre>
</div>
</div>

</body>
</html>