Commit cd1ff20c authored by ggaren's avatar ggaren

LayoutTests:

        Reviewed by Kevin McCulough.

        * http/tests/navigation/multiple-back-forward-entries-expected.txt:
        Updated results to match new behavior, which is correct (multiple
        history entries should not be created).

WebCore:

        Reviewed by Kevin McCulough.

        Fixed failing layout test.
        
        Renamed "FrameLoadTypeInternal" to "FrameLoadTypeRedirectWithLockedHistory".
        This is almost certainly not a correct name for the original intent
        of this load type, but it's a correct name for its current behavior.
        
        (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory):
        When history is supposed to be locked, and no current history item
        exists, only add a new history item if you're the top-level frame.
        
        This rule, combined with the rule that setting iframe.src should not
        create a history item, is pretty hackish. On the other hand, it
        matches WinIE and doesn't cause any test regressions. So I'm OK with
        it as a short-term solution until the solution described in 
        <rdar://problem/5339292> can be implemented.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@24367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ee758b1f
2007-07-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Kevin McCulough.
* http/tests/navigation/multiple-back-forward-entries-expected.txt:
Updated results to match new behavior, which is correct (multiple
history entries should not be created).
2007-07-17 Mitz Pettel <mitz@webkit.org>
Reviewed by Maciej.
......@@ -2,7 +2,5 @@ This test creates an iFrame via document.write(), then immediately changes the s
============== Back Forward List ==============
http://127.0.0.1:8000/navigation/multiple-back-forward-entries.html **nav target**
curr-> http://127.0.0.1:8000/navigation/multiple-back-forward-entries.html
http://127.0.0.1:8000/navigation/resources/slow-resource.pl (in frame "frame") **nav target**
curr-> http://127.0.0.1:8000/navigation/multiple-back-forward-entries.html **nav target**
===============================================
2007-07-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Kevin McCulough.
Fixed failing layout test.
Renamed "FrameLoadTypeInternal" to "FrameLoadTypeRedirectWithLockedHistory".
This is almost certainly not a correct name for the original intent
of this load type, but it's a correct name for its current behavior.
(WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory):
When history is supposed to be locked, and no current history item
exists, only add a new history item if you're the top-level frame.
This rule, combined with the rule that setting iframe.src should not
create a history item, is pretty hackish. On the other hand, it
matches WinIE and doesn't cause any test regressions. So I'm OK with
it as a short-term solution until the solution described in
<rdar://problem/5339292> can be implemented.
2007-07-17 Tristan O'Tierney <tristan@apple.com>
Reviewed by Maciej Stachowiak.
......@@ -184,7 +184,7 @@ bool isBackForwardLoadType(FrameLoadType type)
case FrameLoadTypeReload:
case FrameLoadTypeReloadAllowingStaleData:
case FrameLoadTypeSame:
case FrameLoadTypeInternal:
case FrameLoadTypeRedirectWithLockedHistory:
case FrameLoadTypeReplace:
return false;
case FrameLoadTypeBack:
......@@ -1087,7 +1087,7 @@ void FrameLoader::restoreDocumentState()
case FrameLoadTypeBack:
case FrameLoadTypeForward:
case FrameLoadTypeIndexedBackForward:
case FrameLoadTypeInternal:
case FrameLoadTypeRedirectWithLockedHistory:
case FrameLoadTypeStandard:
itemToRestore = m_currentHistoryItem.get();
}
......@@ -1818,7 +1818,7 @@ void FrameLoader::load(const FrameLoadRequest& request, bool lockHistory, bool u
if (request.resourceRequest().cachePolicy() == ReloadIgnoringCacheData)
loadType = FrameLoadTypeReload;
else if (lockHistory)
loadType = FrameLoadTypeInternal;
loadType = FrameLoadTypeRedirectWithLockedHistory;
else
loadType = FrameLoadTypeStandard;
......@@ -2463,8 +2463,8 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
m_client->makeDocumentView();
break;
case FrameLoadTypeInternal:
updateHistoryForInternalLoad();
case FrameLoadTypeRedirectWithLockedHistory:
updateHistoryForRedirectWithLockedHistory();
m_client->makeDocumentView();
break;
......@@ -3914,7 +3914,7 @@ void FrameLoader::loadItem(HistoryItem* item, FrameLoadType loadType)
request.setCachePolicy(ReturnCacheDataElseLoad);
break;
case FrameLoadTypeStandard:
case FrameLoadTypeInternal:
case FrameLoadTypeRedirectWithLockedHistory:
// no-op: leave as protocol default
// FIXME: I wonder if we ever hit this case
break;
......@@ -4121,7 +4121,7 @@ void FrameLoader::updateHistoryForReload()
updateGlobalHistoryForReload(documentLoader()->originalURL());
}
void FrameLoader::updateHistoryForInternalLoad()
void FrameLoader::updateHistoryForRedirectWithLockedHistory()
{
#if !LOG_DISABLED
if (documentLoader())
......@@ -4129,13 +4129,13 @@ void FrameLoader::updateHistoryForInternalLoad()
#endif
if (documentLoader()->isClientRedirect()) {
if (!m_currentHistoryItem)
if (!m_currentHistoryItem && !m_frame->tree()->parent())
addHistoryForCurrentLocation();
m_currentHistoryItem->setURL(documentLoader()->URL());
m_currentHistoryItem->setFormInfoFromRequest(documentLoader()->request());
if (m_currentHistoryItem) {
m_currentHistoryItem->setURL(documentLoader()->URL());
m_currentHistoryItem->setFormInfoFromRequest(documentLoader()->request());
}
} else {
// Add an item to the item tree for this frame
Frame* parentFrame = m_frame->tree()->parent();
if (parentFrame && parentFrame->loader()->m_currentHistoryItem)
parentFrame->loader()->m_currentHistoryItem->addChildItem(createHistoryItem(true));
......
......@@ -448,7 +448,7 @@ namespace WebCore {
void updateHistoryForBackForwardNavigation();
void updateHistoryForReload();
void updateHistoryForStandardLoad();
void updateHistoryForInternalLoad();
void updateHistoryForRedirectWithLockedHistory();
void updateHistoryForClientRedirect();
void updateHistoryForCommit();
......
......@@ -53,7 +53,7 @@ namespace WebCore {
FrameLoadTypeReload,
FrameLoadTypeReloadAllowingStaleData,
FrameLoadTypeSame, // user loads same URL again (but not reload button)
FrameLoadTypeInternal,
FrameLoadTypeRedirectWithLockedHistory,
FrameLoadTypeReplace
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment