From 35be8e356ff0621c331249134b15eae063cf1574 Mon Sep 17 00:00:00 2001 From: "radha%netscape.com" Date: Fri, 18 Aug 2000 18:33:12 +0000 Subject: [PATCH] Fix for bug # 47148. r=rpotts git-svn-id: svn://10.0.0.236/trunk@76641 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsDocShell.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 89d40c34351..6300738bfa3 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -2772,6 +2772,29 @@ NS_IMETHODIMP nsDocShell::InternalLoad(nsIURI* aURI, nsIURI* aReferrer, { mLoadType = aLoadType; OnNewURI(aURI, nsnull, mLoadType); + /* Clear out LSHE so that further anchor visits get + * recorded in SH and SH won't misbehave. i think this is + * sufficient for now to take care of any Sh mis-behaviors. + * Other option is to call OnEndDocumentLoad() with a dummy channel + * and uriloader and letting everybody know that we are done + * with this target load. I don't think that is necessay + * considering that nsIDocLoaderObserver is on its way out. + * Hopefully the following is sufficient. + */ + LSHE = nsnull; + /* Set the title for the SH entry for this target url. so that + * SH menus in go/back/forward buttons won't be empty for this. + */ + if(mSessionHistory) + { + PRInt32 index = -1; + mSessionHistory->GetIndex(&index); + nsCOMPtr shEntry; + mSessionHistory->GetEntryAtIndex(index, PR_FALSE, getter_AddRefs(shEntry)); + if(shEntry) + shEntry->SetTitle(mTitle.GetUnicode()); + } + return NS_OK; } }