From bd8c73ffba8a7883d383b8507764f7e404f064b0 Mon Sep 17 00:00:00 2001 From: "tbogard%aol.net" Date: Wed, 1 Mar 2000 05:18:04 +0000 Subject: [PATCH] ShouldAddGlobalHistory is now a little smarter. It will only add items that are loaded in contentType'd docShells. I'm sure there are more things we should restrict on, but this is a start. r=mscott, a=jar git-svn-id: svn://10.0.0.236/trunk@61956 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsDocShell.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 416cc546773..851d9cb4dad 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -2165,10 +2165,14 @@ NS_IMETHODIMP nsDocShell::LoadHistoryEntry(nsISHEntry* aEntry) NS_IMETHODIMP nsDocShell::ShouldAddToGlobalHistory(nsIURI* aURI, PRBool* aShouldAdd) { - *aShouldAdd = PR_TRUE; + if(typeContent == mItemType) + { + *aShouldAdd = PR_TRUE; + return NS_OK; + } + + *aShouldAdd = PR_FALSE; - //XXX Should add code here for things we don't want added to global - // history return NS_OK; }