From a549ceb10521bbfd4deb253c579f8964cffb7664 Mon Sep 17 00:00:00 2001 From: "locka%iol.ie" Date: Thu, 18 Aug 2005 11:15:51 +0000 Subject: [PATCH] Changes to loadURI & reload methods on nsIDocShell, nsIWebNavigation. b=50949, r=radha, a=radha --- docshell/shistory/src/nsSHistory.cpp | 29 +++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/docshell/shistory/src/nsSHistory.cpp b/docshell/shistory/src/nsSHistory.cpp index 18969a185f8a..03bca9d007d9 100644 --- a/docshell/shistory/src/nsSHistory.cpp +++ b/docshell/shistory/src/nsSHistory.cpp @@ -360,11 +360,27 @@ nsSHistory::GoForward() } NS_IMETHODIMP -nsSHistory::Reload(PRInt32 aReloadType) +nsSHistory::Reload(PRUint32 aReloadFlags) { - - return LoadEntry(mIndex, PR_TRUE, aReloadType); - + nsDocShellInfoLoadType loadType; + if (aReloadFlags & nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY && + aReloadFlags & nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE) + { + loadType = nsIDocShellLoadInfo::loadReloadBypassProxyAndCache; + } + else if (aReloadFlags & nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY) + { + loadType = nsIDocShellLoadInfo::loadReloadBypassProxy; + } + else if (aReloadFlags & nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE) + { + loadType = nsIDocShellLoadInfo::loadReloadBypassCache; + } + else + { + loadType = nsIDocShellLoadInfo::loadReloadNormal; + } + return LoadEntry(mIndex, PR_TRUE, loadType); } NS_IMETHODIMP @@ -410,7 +426,7 @@ nsSHistory::GetSessionHistory(nsISHistory** aSessionHistory) NS_IMETHODIMP -nsSHistory::LoadURI(const PRUnichar* aURI) +nsSHistory::LoadURI(const PRUnichar* aURI, PRUint32 aLoadFlags) { return NS_OK; } @@ -418,7 +434,6 @@ nsSHistory::LoadURI(const PRUnichar* aURI) NS_IMETHODIMP nsSHistory::GotoIndex(PRInt32 aIndex) { - return LoadEntry(aIndex, PR_FALSE, nsIDocShellLoadInfo::loadHistory); } @@ -487,7 +502,7 @@ nsSHistory::LoadEntry(PRInt32 aIndex, PRBool aReloadFlag, long aLoadType) loadInfo->SetLoadType(aLoadType); loadInfo->SetSHEntry(nextEntry); // Time to initiate a document load - return docShell->LoadURI(nexturi, loadInfo); + return docShell->LoadURI(nexturi, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE); }