From f021d78bd79d5d22c3152462d35ff38ae5333feb 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 git-svn-id: svn://10.0.0.236/trunk@108485 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsDocShell.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 184fcefcb8a..d5bdf18b3fa 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/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