2011-01-19 Darin Fisher <darin@chromium.org>
authordarin@chromium.org <darin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jan 2011 05:49:51 +0000 (05:49 +0000)
committerdarin@chromium.org <darin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jan 2011 05:49:51 +0000 (05:49 +0000)
commit956d76fc8b2d62123d9c8c73ddd69032b7390d02
tree4b2fa951f397dd038f8acc2e637a199d34a0143f
parentd2c2cfdda3259128734cfc74e53e5b7c9694eb2a
2011-01-19  Darin Fisher  <darin@chromium.org>

        Reviewed by Mihai Parparita.

        Re-initialize the HistoryItem fully when navigating to a HistoryItem,
        or replacing a HistoryItem, results in a different URL.

        https://bugs.webkit.org/show_bug.cgi?id=49654

        This patch also forces all HistoryItems to record the post-redirect
        URL.  Previously, frames would remember the pre-redirect URL.  This is
        problematic since other members of the HistoryItem correspond to the
        post-redirect URL.

        Tests: fast/history/history-replace-updates-current-item.html
               http/tests/navigation/redirect-on-back-updates-history-item.html
               http/tests/navigation/redirect-on-reload-updates-history-item.html

        * history/HistoryItem.cpp:
        (WebCore::HistoryItem::HistoryItem):
        (WebCore::HistoryItem::reset):
        * history/HistoryItem.h:
        * loader/HistoryController.cpp:
        (WebCore::HistoryController::updateForBackForwardNavigation):
        (WebCore::HistoryController::updateForReload):
        (WebCore::HistoryController::updateForStandardLoad):
        (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
        (WebCore::HistoryController::initializeItem):
        (WebCore::HistoryController::createItem):
        (WebCore::HistoryController::createItemTree):
        (WebCore::HistoryController::updateCurrentItem):
        * loader/HistoryController.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@76205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
35 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/history/history-replace-updates-current-item-expected.txt [new file with mode: 0644]
LayoutTests/fast/history/history-replace-updates-current-item.html [new file with mode: 0644]
LayoutTests/fast/history/resources/history-replace-updates-current-item-done.html [new file with mode: 0644]
LayoutTests/fast/history/resources/history-replace-updates-current-item-goback.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/postredirect-frames-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/navigation/postredirect-frames-goback1-expected.txt
LayoutTests/http/tests/navigation/postredirect-frames.html
LayoutTests/http/tests/navigation/redirect-on-back-updates-history-item-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/navigation/redirect-on-back-updates-history-item.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/redirect-on-reload-updates-history-item-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/navigation/redirect-on-reload-updates-history-item.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/redirect302-frames-expected.txt
LayoutTests/http/tests/navigation/redirect302-subframeload-expected.txt
LayoutTests/http/tests/navigation/resources/redirect-on-back-updates-history-item-goback.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/resources/redirect-on-back-updates-history-item.php [new file with mode: 0644]
LayoutTests/http/tests/navigation/resources/redirect-on-reload-updates-history-item-goback.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/resources/redirect-on-reload-updates-history-item.php [new file with mode: 0644]
LayoutTests/http/tests/navigation/resources/redirect-to-cookie.php [new file with mode: 0644]
LayoutTests/http/tests/navigation/resources/redirect-updates-history-item-done.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/resources/redirect-updates-history-item.js [new file with mode: 0644]
LayoutTests/platform/chromium-linux/http/tests/navigation/postredirect-frames-expected.checksum [deleted file]
LayoutTests/platform/chromium-linux/http/tests/navigation/postredirect-frames-expected.png [deleted file]
LayoutTests/platform/chromium-win/http/tests/navigation/postredirect-frames-expected.checksum [deleted file]
LayoutTests/platform/chromium-win/http/tests/navigation/postredirect-frames-expected.png [deleted file]
LayoutTests/platform/chromium-win/http/tests/navigation/postredirect-frames-expected.txt [deleted file]
LayoutTests/platform/mac/http/tests/navigation/postredirect-frames-expected.checksum [deleted file]
LayoutTests/platform/mac/http/tests/navigation/postredirect-frames-expected.png [deleted file]
LayoutTests/platform/mac/http/tests/navigation/postredirect-frames-expected.txt [deleted file]
LayoutTests/platform/qt/http/tests/navigation/postredirect-frames-expected.txt [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/history/HistoryItem.cpp
Source/WebCore/history/HistoryItem.h
Source/WebCore/loader/HistoryController.cpp
Source/WebCore/loader/HistoryController.h