fixes bug 301358 "HTTP 'refresh' doesn't load page with bfcache enabled" r=biesi sr=bryner a=bsmedberg

git-svn-id: svn://10.0.0.236/trunk@177590 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
darin%meer.net
2005-08-11 20:14:00 +00:00
parent 3a708b6002
commit c8e1a406bd
2 changed files with 12 additions and 6 deletions

View File

@@ -3164,8 +3164,13 @@ nsDocShell::Stop(PRUint32 aStopFlags)
}
if (nsIWebNavigation::STOP_NETWORK & aStopFlags) {
// Cancel any timers that were set for this loader.
CancelRefreshURITimers();
// Suspend any timers that were set for this loader. We'll clear
// them out for good in CreateContentViewer.
if (mRefreshURIList) {
SuspendRefreshURIs();
mSavedRefreshURIList.swap(mRefreshURIList);
mRefreshURIList = nsnull;
}
// XXXbz We could also pass |this| to nsIURILoader::Stop. That will
// just call Stop() on us as an nsIDocumentLoader... We need fewer
@@ -4879,12 +4884,9 @@ nsDocShell::CaptureState()
NS_ENSURE_SUCCESS(rv, rv);
// Suspend refresh URIs and save off the timer queue
SuspendRefreshURIs();
rv = mOSHE->SetRefreshURIList(mRefreshURIList);
rv = mOSHE->SetRefreshURIList(mSavedRefreshURIList);
NS_ENSURE_SUCCESS(rv, rv);
mRefreshURIList = nsnull;
// Capture the current content viewer bounds.
nsCOMPtr<nsIPresShell> shell;
nsDocShell::GetPresShell(getter_AddRefs(shell));
@@ -5183,6 +5185,8 @@ nsDocShell::RestoreFromHistory()
}
}
mSavedRefreshURIList = nsnull;
// Save off the root view's parent and sibling so that we can insert the
// new content viewer's root view at the same position. Also save the
// bounds of the root view's widget.
@@ -5476,6 +5480,7 @@ nsDocShell::CreateContentViewer(const char *aContentType,
NS_ENSURE_SUCCESS(Embed(viewer, "", (nsISupports *) nsnull),
NS_ERROR_FAILURE);
mSavedRefreshURIList = nsnull;
mSavingOldViewer = PR_FALSE;
mEODForCurrentDocument = PR_FALSE;