From 4434fdcd2f3cb0e4d3987295469a93fb72b6bb18 Mon Sep 17 00:00:00 2001 From: "vidur%netscape.com" Date: Tue, 21 Sep 1999 05:27:35 +0000 Subject: [PATCH] Changed nsIWebShell::GoTo to use LOAD_HISTORY as the load flag - going to the current entry shouldn't reload. git-svn-id: svn://10.0.0.236/trunk@48510 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsWebShell.cpp | 5 ++++- mozilla/webshell/src/nsWebShell.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index f9e2cd9dbee..506f5ee2be3 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -2484,7 +2484,7 @@ nsWebShell::GoTo(PRInt32 aHistoryIndex) rv = DoLoadURL(uri, // URL string "view", // Command nsnull, // Post Data - nsIChannel::LOAD_NORMAL, // the reload type + LOAD_HISTORY, // the reload type 0, // load attributes nsnull); // referrer } @@ -2528,6 +2528,9 @@ nsWebShell::GetURL(PRInt32 aHistoryIndex, const PRUnichar** aURLResult) { nsresult rv = NS_ERROR_ILLEGAL_VALUE; #ifdef OLD_HISTORY + // XXX Ownership rules for the string passed back from this + // method are not XPCOM compliant. If they were correct, + // the caller would deallocate the string. if ((aHistoryIndex >= 0) && (aHistoryIndex <= mHistory.Count() - 1)) { nsString* s = (nsString*) mHistory.ElementAt(aHistoryIndex); diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index f9e2cd9dbee..506f5ee2be3 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -2484,7 +2484,7 @@ nsWebShell::GoTo(PRInt32 aHistoryIndex) rv = DoLoadURL(uri, // URL string "view", // Command nsnull, // Post Data - nsIChannel::LOAD_NORMAL, // the reload type + LOAD_HISTORY, // the reload type 0, // load attributes nsnull); // referrer } @@ -2528,6 +2528,9 @@ nsWebShell::GetURL(PRInt32 aHistoryIndex, const PRUnichar** aURLResult) { nsresult rv = NS_ERROR_ILLEGAL_VALUE; #ifdef OLD_HISTORY + // XXX Ownership rules for the string passed back from this + // method are not XPCOM compliant. If they were correct, + // the caller would deallocate the string. if ((aHistoryIndex >= 0) && (aHistoryIndex <= mHistory.Count() - 1)) { nsString* s = (nsString*) mHistory.ElementAt(aHistoryIndex);