save the presentation even if the next load is an error page

Bug 299547 r=bryner sr=darin a=brendan+shaver


git-svn-id: svn://10.0.0.236/trunk@177422 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cbiesinger%web.de 2005-08-09 12:31:36 +00:00
parent 9778732be8
commit f1a6b8728a

View File

@ -165,7 +165,7 @@ static NS_DEFINE_CID(kDocumentCharsetInfoCID, NS_DOCUMENTCHARSETINFO_CID);
static NS_DEFINE_CID(kDOMScriptObjectFactoryCID,
NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
#if defined(DEBUG_bryner)
#if defined(DEBUG_bryner) || defined(DEBUG_chb)
//#define DEBUG_DOCSHELL_FOCUS
#define DEBUG_PAGE_CACHE
#endif
@ -4817,7 +4817,8 @@ nsDocShell::CanSavePresentation(PRUint32 aLoadType, nsIRequest *aNewRequest)
aLoadType != LOAD_HISTORY &&
aLoadType != LOAD_LINK &&
aLoadType != LOAD_STOP_CONTENT &&
aLoadType != LOAD_STOP_CONTENT_AND_REPLACE)
aLoadType != LOAD_STOP_CONTENT_AND_REPLACE &&
aLoadType != LOAD_ERROR_PAGE)
return PR_FALSE;
// If the session history entry has the saveLayoutState flag set to false,
@ -6359,10 +6360,10 @@ nsDocShell::InternalLoad(nsIURI * aURI,
// mLSHE should be assigned to aSHEntry, only after Stop() has
// been called. But when loading an error page, do not clear the
// mLSHE for the real page.
if (mLoadType != LOAD_ERROR_PAGE) {
if (mLoadType != LOAD_ERROR_PAGE)
SetHistoryEntry(&mLSHE, aSHEntry);
mSavingOldViewer = savePresentation;
}
mSavingOldViewer = savePresentation;
// If we have a saved content viewer in history, restore and show it now.
if (aSHEntry && (mLoadType & LOAD_CMD_HISTORY)) {