| Index: Source/WebCore/loader/HistoryController.cpp
|
| diff --git a/Source/WebCore/loader/HistoryController.cpp b/Source/WebCore/loader/HistoryController.cpp
|
| index 4468e61f751f2e2f23d6d40ae6178c79000d370d..5c225ac5d6abc8390f303ce0715c1793c746935f 100644
|
| --- a/Source/WebCore/loader/HistoryController.cpp
|
| +++ b/Source/WebCore/loader/HistoryController.cpp
|
| @@ -360,20 +360,16 @@ void HistoryController::updateForStandardLoad(HistoryUpdateType updateType)
|
|
|
| FrameLoader* frameLoader = m_frame->loader();
|
|
|
| - Settings* settings = m_frame->settings();
|
| - bool needPrivacy = !settings || settings->privateBrowsingEnabled();
|
| const KURL& historyURL = frameLoader->documentLoader()->urlForHistory();
|
|
|
| if (!frameLoader->documentLoader()->isClientRedirect()) {
|
| if (!historyURL.isEmpty()) {
|
| if (updateType != UpdateAllExceptBackForwardList)
|
| updateBackForwardListClippedAtTarget(true);
|
| - if (!needPrivacy) {
|
| - frameLoader->client()->updateGlobalHistory();
|
| - frameLoader->documentLoader()->setDidCreateGlobalHistoryEntry(true);
|
| - if (frameLoader->documentLoader()->unreachableURL().isEmpty())
|
| - frameLoader->client()->updateGlobalHistoryRedirectLinks();
|
| - }
|
| + frameLoader->client()->updateGlobalHistory();
|
| + frameLoader->documentLoader()->setDidCreateGlobalHistoryEntry(true);
|
| + if (frameLoader->documentLoader()->unreachableURL().isEmpty())
|
| + frameLoader->client()->updateGlobalHistoryRedirectLinks();
|
|
|
| m_frame->loader()->client()->updateGlobalHistoryItemForPage();
|
| }
|
| @@ -382,7 +378,7 @@ void HistoryController::updateForStandardLoad(HistoryUpdateType updateType)
|
| updateCurrentItem();
|
| }
|
|
|
| - if (!historyURL.isEmpty() && !needPrivacy) {
|
| + if (!historyURL.isEmpty()) {
|
| if (Page* page = m_frame->page())
|
| addVisitedLink(page, historyURL);
|
|
|
| @@ -398,20 +394,16 @@ void HistoryController::updateForRedirectWithLockedBackForwardList()
|
| LOG(History, "WebCoreHistory: Updating History for redirect load in frame %s", m_frame->loader()->documentLoader()->title().string().utf8().data());
|
| #endif
|
|
|
| - Settings* settings = m_frame->settings();
|
| - bool needPrivacy = !settings || settings->privateBrowsingEnabled();
|
| const KURL& historyURL = m_frame->loader()->documentLoader()->urlForHistory();
|
|
|
| if (m_frame->loader()->documentLoader()->isClientRedirect()) {
|
| if (!m_currentItem && !m_frame->tree()->parent()) {
|
| if (!historyURL.isEmpty()) {
|
| updateBackForwardListClippedAtTarget(true);
|
| - if (!needPrivacy) {
|
| - m_frame->loader()->client()->updateGlobalHistory();
|
| - m_frame->loader()->documentLoader()->setDidCreateGlobalHistoryEntry(true);
|
| - if (m_frame->loader()->documentLoader()->unreachableURL().isEmpty())
|
| - m_frame->loader()->client()->updateGlobalHistoryRedirectLinks();
|
| - }
|
| + m_frame->loader()->client()->updateGlobalHistory();
|
| + m_frame->loader()->documentLoader()->setDidCreateGlobalHistoryEntry(true);
|
| + if (m_frame->loader()->documentLoader()->unreachableURL().isEmpty())
|
| + m_frame->loader()->client()->updateGlobalHistoryRedirectLinks();
|
|
|
| m_frame->loader()->client()->updateGlobalHistoryItemForPage();
|
| }
|
| @@ -424,7 +416,7 @@ void HistoryController::updateForRedirectWithLockedBackForwardList()
|
| parentFrame->loader()->history()->m_currentItem->setChildItem(createItem());
|
| }
|
|
|
| - if (!historyURL.isEmpty() && !needPrivacy) {
|
| + if (!historyURL.isEmpty()) {
|
| if (Page* page = m_frame->page())
|
| addVisitedLink(page, historyURL);
|
|
|
| @@ -447,11 +439,9 @@ void HistoryController::updateForClientRedirect()
|
| m_currentItem->clearScrollPoint();
|
| }
|
|
|
| - Settings* settings = m_frame->settings();
|
| - bool needPrivacy = !settings || settings->privateBrowsingEnabled();
|
| const KURL& historyURL = m_frame->loader()->documentLoader()->urlForHistory();
|
|
|
| - if (!historyURL.isEmpty() && !needPrivacy) {
|
| + if (!historyURL.isEmpty()) {
|
| if (Page* page = m_frame->page())
|
| addVisitedLink(page, historyURL);
|
| }
|
| @@ -540,10 +530,6 @@ void HistoryController::updateForSameDocumentNavigation()
|
| if (m_frame->document()->url().isEmpty())
|
| return;
|
|
|
| - Settings* settings = m_frame->settings();
|
| - if (!settings || settings->privateBrowsingEnabled())
|
| - return;
|
| -
|
| Page* page = m_frame->page();
|
| if (!page)
|
| return;
|
| @@ -869,10 +855,6 @@ void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject,
|
|
|
| page->backForward()->addItem(topItem.release());
|
|
|
| - Settings* settings = m_frame->settings();
|
| - if (!settings || settings->privateBrowsingEnabled())
|
| - return;
|
| -
|
| addVisitedLink(page, KURL(ParsedURLString, urlString));
|
| m_frame->loader()->client()->updateGlobalHistory();
|
|
|
| @@ -890,10 +872,6 @@ void HistoryController::replaceState(PassRefPtr<SerializedScriptValue> stateObje
|
| m_currentItem->setFormData(0);
|
| m_currentItem->setFormContentType(String());
|
|
|
| - Settings* settings = m_frame->settings();
|
| - if (!settings || settings->privateBrowsingEnabled())
|
| - return;
|
| -
|
| ASSERT(m_frame->page());
|
| addVisitedLink(m_frame->page(), KURL(ParsedURLString, urlString));
|
| m_frame->loader()->client()->updateGlobalHistory();
|
|
|