From 12bb7e7da428cc24cc20a09b5c3e3fc8e98e62b3 Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Mon, 19 Nov 2001 20:22:14 +0000 Subject: [PATCH] fix for bug 102043 - hide redirected URLs after adding them to global history r=radha, sr=rpotts --- docshell/base/nsDocShell.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 184fcefcb8a..d5bdf18b3fa 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -3327,6 +3327,19 @@ nsDocShell::OnStateChange(nsIWebProgress * aProgress, nsIRequest * aRequest, ShouldAddToGlobalHistory(uri, &updateHistory); if (updateHistory) { AddToGlobalHistory(uri); + // this is a redirect, so hide the page from + // being enumerated in history + // this is temporary until bug 71482 is fixed + if (mGlobalHistory) { + nsCOMPtr browserHistory = + do_QueryInterface(mGlobalHistory); + if (browserHistory) { + nsXPIDLCString urlString; + if (NS_SUCCEEDED(uri->GetSpec(getter_Copies(urlString)))) + browserHistory->HidePage(urlString); + } + } + } } // uri } // channel