| Index: third_party/WebKit/WebCore/loader/FrameLoader.cpp
|
| ===================================================================
|
| --- third_party/WebKit/WebCore/loader/FrameLoader.cpp (revision 9391)
|
| +++ third_party/WebKit/WebCore/loader/FrameLoader.cpp (working copy)
|
| @@ -2353,7 +2353,8 @@
|
| // FIXME: is this the right place to reset loadType? Perhaps this should be done after loading is finished or aborted.
|
| m_loadType = FrameLoadTypeStandard;
|
| RefPtr<DocumentLoader> loader = m_client->createDocumentLoader(request, substituteData);
|
| - loader->setURLForHistoryReflectsClientRedirect(lockHistory);
|
| + if (lockHistory && m_documentLoader)
|
| + loader->setClientRedirectSourceForHistory(m_documentLoader->didCreateGlobalHistoryEntry() ? m_documentLoader->urlForHistory() : m_documentLoader->clientRedirectSourceForHistory());
|
| load(loader.get());
|
| }
|
|
|
| @@ -2376,7 +2377,8 @@
|
| void FrameLoader::loadWithNavigationAction(const ResourceRequest& request, const NavigationAction& action, bool lockHistory, FrameLoadType type, PassRefPtr<FormState> formState)
|
| {
|
| RefPtr<DocumentLoader> loader = m_client->createDocumentLoader(request, SubstituteData());
|
| - loader->setURLForHistoryReflectsClientRedirect(lockHistory);
|
| + if (lockHistory && m_documentLoader)
|
| + loader->setClientRedirectSourceForHistory(m_documentLoader->didCreateGlobalHistoryEntry() ? m_documentLoader->urlForHistory() : m_documentLoader->clientRedirectSourceForHistory());
|
|
|
| loader->setTriggeringAction(action);
|
| if (m_documentLoader) {
|
| @@ -2783,11 +2785,6 @@
|
| m_documentLoader = loader;
|
| }
|
|
|
| -DocumentLoader* FrameLoader::documentLoader() const
|
| -{
|
| - return m_documentLoader.get();
|
| -}
|
| -
|
| void FrameLoader::setPolicyDocumentLoader(DocumentLoader* loader)
|
| {
|
| if (m_policyDocumentLoader == loader)
|
| @@ -2804,16 +2801,6 @@
|
| m_policyDocumentLoader = loader;
|
| }
|
|
|
| -DocumentLoader* FrameLoader::policyDocumentLoader() const
|
| -{
|
| - return m_policyDocumentLoader.get();
|
| -}
|
| -
|
| -DocumentLoader* FrameLoader::provisionalDocumentLoader() const
|
| -{
|
| - return m_provisionalDocumentLoader.get();
|
| -}
|
| -
|
| void FrameLoader::setProvisionalDocumentLoader(DocumentLoader* loader)
|
| {
|
| ASSERT(!loader || !m_provisionalDocumentLoader);
|
| @@ -2825,11 +2812,6 @@
|
| m_provisionalDocumentLoader = loader;
|
| }
|
|
|
| -FrameState FrameLoader::state() const
|
| -{
|
| - return m_state;
|
| -}
|
| -
|
| double FrameLoader::timeOfLastCompletedLoad()
|
| {
|
| return storedTimeOfLastCompletedLoad;
|
| @@ -4813,13 +4795,12 @@
|
| m_navigationDuringLoad = false;
|
| }
|
|
|
| - bool didUpdateGlobalHistory = false;
|
| if (!frameNavigationDuringLoad && !documentLoader()->isClientRedirect()) {
|
| if (!historyURL.isEmpty()) {
|
| addBackForwardItemClippedAtTarget(true);
|
| if (!needPrivacy) {
|
| m_client->updateGlobalHistory();
|
| - didUpdateGlobalHistory = true;
|
| + m_documentLoader->setDidCreateGlobalHistoryEntry(true);
|
| }
|
| if (Page* page = m_frame->page())
|
| page->setGlobalHistoryItem(needPrivacy ? 0 : page->backForwardList()->currentItem());
|
| @@ -4833,8 +4814,8 @@
|
| if (Page* page = m_frame->page())
|
| page->group().addVisitedLink(historyURL);
|
|
|
| - if (!didUpdateGlobalHistory && !url().isEmpty())
|
| - m_client->updateGlobalHistoryForRedirectWithoutHistoryItem();
|
| + if (!m_documentLoader->didCreateGlobalHistoryEntry() && documentLoader()->unreachableURL().isEmpty() && !url().isEmpty())
|
| + m_client->updateGlobalHistoryRedirectLinks();
|
| }
|
| }
|
|
|
| @@ -4903,14 +4884,13 @@
|
| bool needPrivacy = !settings || settings->privateBrowsingEnabled();
|
| const KURL& historyURL = documentLoader()->urlForHistory();
|
|
|
| - bool didUpdateGlobalHistory = false;
|
| if (documentLoader()->isClientRedirect()) {
|
| if (!m_currentHistoryItem && !m_frame->tree()->parent()) {
|
| if (!historyURL.isEmpty()) {
|
| addBackForwardItemClippedAtTarget(true);
|
| if (!needPrivacy) {
|
| m_client->updateGlobalHistory();
|
| - didUpdateGlobalHistory = true;
|
| + m_documentLoader->setDidCreateGlobalHistoryEntry(true);
|
| }
|
| if (Page* page = m_frame->page())
|
| page->setGlobalHistoryItem(needPrivacy ? 0 : page->backForwardList()->currentItem());
|
| @@ -4930,8 +4910,8 @@
|
| if (Page* page = m_frame->page())
|
| page->group().addVisitedLink(historyURL);
|
|
|
| - if (!didUpdateGlobalHistory && !url().isEmpty())
|
| - m_client->updateGlobalHistoryForRedirectWithoutHistoryItem();
|
| + if (!m_documentLoader->didCreateGlobalHistoryEntry() && documentLoader()->unreachableURL().isEmpty() && !url().isEmpty())
|
| + m_client->updateGlobalHistoryRedirectLinks();
|
| }
|
| }
|
|
|
|
|