<rdar://problem/13924889> -webView:didPerformClientRedirectFromURL:toURL:inFrame...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 May 2013 17:57:19 +0000 (17:57 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 May 2013 17:57:19 +0000 (17:57 +0000)
commitd80b3ed11607316f73b226e4e2718167848c7b82
tree47ef1219d6c811289705705edab1719ba1fe7ebc
parente566e60635ee494533bad1613818f8b98bb137d7
<rdar://problem/13924889> -webView:didPerformClientRedirectFromURL:toURL:inFrame: should be given the redirecting URL as the “from” URL
https://bugs.webkit.org/show_bug.cgi?id=116733

Reviewed by Adele Peterson.

By the time the history controller calls updateGlobalHistoryRedirectLinks(), the document
loader already reflects the destination URL. In order to be able to provide the immediate
source URL to the delegate, we make WebFrame track a URL and provisional URL, updating them
in response to FrameLoader callbacks in exactly the same way WebFrameProxy maintains its
m_url and m_provisionalURL member variables.

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): Update
provisionalURL.
(WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): Update url.
(WebFrameLoaderClient::dispatchDidPushStateWithinPage): Ditto.
(WebFrameLoaderClient::dispatchDidReplaceStateWithinPage): Ditto.
(WebFrameLoaderClient::dispatchDidPopStateWithinPage): Ditto.
(WebFrameLoaderClient::dispatchDidStartProvisionalLoad): Update provisionalURL.
(WebFrameLoaderClient::dispatchDidCommitLoad): Update URL and provisionalURL.
(WebFrameLoaderClient::dispatchDidFailProvisionalLoad): Clear provisionalURL.
(WebFrameLoaderClient::dispatchDidFailLoad): Added an assertion.
(WebFrameLoaderClient::dispatchDidFinishLoad): Ditto.
(WebFrameLoaderClient::updateGlobalHistoryRedirectLinks): Pass the last committed URL as the
source, rather than clientRedirectSourceForHistory().
* WebView/WebFrameInternal.h: Added url and provisionalURL ivars to WebFramePrivate.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKit/mac/WebView/WebFrameInternal.h