From 1db037ca17c8a5cfc47111a09a3652ed9f47aacd Mon Sep 17 00:00:00 2001 From: "hpradhan%hotpop.com" Date: Thu, 18 Aug 2005 11:16:52 +0000 Subject: [PATCH] bug 229392 : minor cleanup in session history r=alecf sr=bz git-svn-id: svn://10.0.0.236/trunk@178134 18797224-902f-48f8-a5cc-f745e15eee43 --- .../shistory/public/nsISHTransaction.idl | 7 +---- .../docshell/shistory/src/nsSHTransaction.cpp | 26 ------------------- .../docshell/shistory/src/nsSHTransaction.h | 1 - mozilla/docshell/shistory/src/nsSHistory.cpp | 6 ++--- mozilla/docshell/shistory/src/nsSHistory.h | 5 +++- 5 files changed, 8 insertions(+), 37 deletions(-) diff --git a/mozilla/docshell/shistory/public/nsISHTransaction.idl b/mozilla/docshell/shistory/public/nsISHTransaction.idl index 8f26f9ab9f9..02f9f0d1acc 100644 --- a/mozilla/docshell/shistory/public/nsISHTransaction.idl +++ b/mozilla/docshell/shistory/public/nsISHTransaction.idl @@ -30,7 +30,7 @@ */ -[scriptable, uuid(2F0C3A72-988B-11d3-BDC7-0050040A9B44)] +[scriptable, uuid(2EDF705F-D252-4971-9F09-71DD0F760DC6)] interface nsISHTransaction : nsISupports { /** @@ -48,11 +48,6 @@ interface nsISHTransaction : nsISupports */ attribute nsISHTransaction next; - /** - * The other paths that have been navigated from this transaction - */ - readonly attribute nsISHTransaction lrvList; - /** * Specifies if this transaction should persist. If not it will be replaced * by new additions to the list. diff --git a/mozilla/docshell/shistory/src/nsSHTransaction.cpp b/mozilla/docshell/shistory/src/nsSHTransaction.cpp index 636a4966bba..727485a1799 100644 --- a/mozilla/docshell/shistory/src/nsSHTransaction.cpp +++ b/mozilla/docshell/shistory/src/nsSHTransaction.cpp @@ -94,23 +94,6 @@ nsSHTransaction::GetNext(nsISHTransaction * * aResult) NS_IMETHODIMP nsSHTransaction::SetNext(nsISHTransaction * aNext) { - if(mNext) - { - /* We do not want to maintain the previous traversals - * and make SessionHistory grow unboundewd for the - * seamonkey release. We will let go off - * all previous traversals. However, based on a pref - * previous traversals can be maintained. The Pref - * work will be done at a future date.Commenting off - * the following lines will delete previous traversals - */ -#if 0 - // There is already a child. Move the child to the LRV list - mLRVList = mNext; -#endif - - } - NS_ENSURE_SUCCESS(aNext->SetPrev(this), NS_ERROR_FAILURE); mNext = aNext; @@ -134,15 +117,6 @@ nsSHTransaction::GetPrev(nsISHTransaction ** aResult) return NS_OK; } -NS_IMETHODIMP -nsSHTransaction::GetLrvList(nsISHTransaction ** aResult) -{ - NS_ENSURE_ARG_POINTER(aResult); - *aResult = mLRVList; - NS_IF_ADDREF(*aResult); - return NS_OK; -} - NS_IMETHODIMP nsSHTransaction::SetPersist(PRBool aPersist) { diff --git a/mozilla/docshell/shistory/src/nsSHTransaction.h b/mozilla/docshell/shistory/src/nsSHTransaction.h index a3df8719c6e..4fb82e40bb1 100644 --- a/mozilla/docshell/shistory/src/nsSHTransaction.h +++ b/mozilla/docshell/shistory/src/nsSHTransaction.h @@ -47,7 +47,6 @@ protected: nsISHTransaction * mPrev; // Weak Reference nsCOMPtr mNext; - nsCOMPtr mLRVList; nsCOMPtr mSHEntry; }; diff --git a/mozilla/docshell/shistory/src/nsSHistory.cpp b/mozilla/docshell/shistory/src/nsSHistory.cpp index ec994e890ed..7a55c1c229e 100644 --- a/mozilla/docshell/shistory/src/nsSHistory.cpp +++ b/mozilla/docshell/shistory/src/nsSHistory.cpp @@ -259,7 +259,8 @@ nsSHistory::GetTransactionAtIndex(PRInt32 aIndex, nsISHTransaction ** aResult) return NS_OK; } -NS_IMETHODIMP +#ifdef DEBUG +nsresult nsSHistory::PrintHistory() { @@ -318,13 +319,12 @@ nsSHistory::PrintHistory() return NS_OK; } +#endif NS_IMETHODIMP nsSHistory::GetRootTransaction(nsISHTransaction ** aResult) { - nsCOMPtr entry; - NS_ENSURE_ARG_POINTER(aResult); *aResult=mListRoot; NS_IF_ADDREF(*aResult); diff --git a/mozilla/docshell/shistory/src/nsSHistory.h b/mozilla/docshell/shistory/src/nsSHistory.h index 86bf61c617a..cfd62127df2 100644 --- a/mozilla/docshell/shistory/src/nsSHistory.h +++ b/mozilla/docshell/shistory/src/nsSHistory.h @@ -57,7 +57,6 @@ protected: friend class nsSHEnumerator; // Could become part of nsIWebNavigation - NS_IMETHOD PrintHistory(); NS_IMETHOD GetEntryAtIndex(PRInt32 aIndex, PRBool aModifyIndex, nsISHEntry** aResult); NS_IMETHOD GetTransactionAtIndex(PRInt32 aIndex, nsISHTransaction ** aResult); nsresult CompareFrames(nsISHEntry * prevEntry, nsISHEntry * nextEntry, nsIDocShell * rootDocShell, long aLoadType, PRBool * aIsFrameFound); @@ -65,6 +64,10 @@ protected: NS_IMETHOD LoadEntry(PRInt32 aIndex, long aLoadType, PRUint32 histCmd); +#ifdef DEBUG + nsresult PrintHistory(); +#endif + protected: nsCOMPtr mListRoot; PRInt32 mIndex;