WebCore:
Don't include substitute data URLs in global history redirect chains
<rdar://6690169>
Reviewed by Darin Adler.
This might be testable if:
- support were added to DRT for providing substitute data on failed
loads
- support were added to DRT for dumping redirect chains
I tried doing the above and was still unable to make a test.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::updateHistoryForStandardLoad):
(WebCore::FrameLoader::updateHistoryForRedirectWithLockedBackForwardList):
Call updateGlobalHistoryRedirectLinks only if the load succeeded
(i.e., there is no unreachableURL). Previous the FrameLoaderClient
implementations were unconditionally calling
updateGlobalHistoryRedirectLinks from within updateGlobalHistory.
WebKit/mac:
Don't include substitute data URLs in global history redirect chains
<rdar://6690169>
Reviewed by Darin Adler.
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::updateGlobalHistory): Don't call
updateGlobalHistoryRedirectLinks. FrameLoader calls this for us now.
(WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
Added an assertion to help catch cases where we might be adding a
substitute data URL into a redirect chain.
WebKit/win:
Don't include substitute data URLs in global history redirect chains
<rdar://6690169>
Reviewed by Darin Adler.
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::updateGlobalHistory): Don't call
updateGlobalHistoryRedirectLinks. FrameLoader calls this for us now.
(WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
Added an assertion to help catch cases where we might be adding a
substitute data URL into a redirect chain.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@42046
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2009-03-27 Adam Roben <aroben@apple.com>
+
+ Don't include substitute data URLs in global history redirect chains
+
+ <rdar://6690169>
+
+ Reviewed by Darin Adler.
+
+ This might be testable if:
+ - support were added to DRT for providing substitute data on failed
+ loads
+ - support were added to DRT for dumping redirect chains
+
+ I tried doing the above and was still unable to make a test.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::updateHistoryForStandardLoad):
+ (WebCore::FrameLoader::updateHistoryForRedirectWithLockedBackForwardList):
+ Call updateGlobalHistoryRedirectLinks only if the load succeeded
+ (i.e., there is no unreachableURL). Previous the FrameLoaderClient
+ implementations were unconditionally calling
+ updateGlobalHistoryRedirectLinks from within updateGlobalHistory.
+
2009-03-27 Peter Kasting <pkasting@google.com>
Reviewed by Eric Seidel.
if (!needPrivacy) {
m_client->updateGlobalHistory();
m_documentLoader->setDidCreateGlobalHistoryEntry(true);
+ if (m_documentLoader->unreachableURL().isEmpty())
+ m_client->updateGlobalHistoryRedirectLinks();
}
if (Page* page = m_frame->page())
page->setGlobalHistoryItem(needPrivacy ? 0 : page->backForwardList()->currentItem());
if (!needPrivacy) {
m_client->updateGlobalHistory();
m_documentLoader->setDidCreateGlobalHistoryEntry(true);
+ if (m_documentLoader->unreachableURL().isEmpty())
+ m_client->updateGlobalHistoryRedirectLinks();
}
if (Page* page = m_frame->page())
page->setGlobalHistoryItem(needPrivacy ? 0 : page->backForwardList()->currentItem());
+2009-03-27 Adam Roben <aroben@apple.com>
+
+ Don't include substitute data URLs in global history redirect chains
+
+ <rdar://6690169>
+
+ Reviewed by Darin Adler.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::updateGlobalHistory): Don't call
+ updateGlobalHistoryRedirectLinks. FrameLoader calls this for us now.
+ (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
+ Added an assertion to help catch cases where we might be adding a
+ substitute data URL into a redirect chain.
+
2009-03-27 Darin Adler <darin@apple.com>
Reviewed by Adam Roben.
withTitle:loader->title()
method:loader->originalRequestCopy().httpMethod()
wasFailure:loader->urlForHistoryReflectsFailure()];
-
- updateGlobalHistoryRedirectLinks();
}
void WebFrameLoaderClient::updateGlobalHistoryRedirectLinks()
{
DocumentLoader* loader = core(m_webFrame.get())->loader()->documentLoader();
+ ASSERT(loader->unreachableURL().isEmpty());
if (!loader->clientRedirectSourceForHistory().isNull()) {
if (WebHistoryItem *item = [[WebHistory optionalSharedHistory] _itemForURLString:loader->clientRedirectSourceForHistory()])
+2009-03-27 Adam Roben <aroben@apple.com>
+
+ Don't include substitute data URLs in global history redirect chains
+
+ <rdar://6690169>
+
+ Reviewed by Darin Adler.
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::updateGlobalHistory): Don't call
+ updateGlobalHistoryRedirectLinks. FrameLoader calls this for us now.
+ (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
+ Added an assertion to help catch cases where we might be adding a
+ substitute data URL into a redirect chain.
+
2009-03-26 Dan Bernstein <mitz@apple.com>
Reviewed by Adam Roben.
DocumentLoader* loader = core(m_webFrame)->loader()->documentLoader();
history->visitedURL(loader->urlForHistory(), loader->title(), loader->originalRequestCopy().httpMethod(), loader->urlForHistoryReflectsFailure());
- updateGlobalHistoryRedirectLinks();
}
void WebFrameLoaderClient::updateGlobalHistoryRedirectLinks()
return;
DocumentLoader* loader = core(m_webFrame)->loader()->documentLoader();
+ ASSERT(loader->unreachableURL().isEmpty());
if (!loader->clientRedirectSourceForHistory().isNull()) {
if (COMPtr<IWebHistoryItem> iWebHistoryItem = history->itemForURLString(loader->clientRedirectSourceForHistory())) {