Removed the unused mViewSource member. Fixed ::InternalLoad to call ::LoadURI instead of LoadURL since destroying and then re-creating the uri is pointless when it's passed in for us. Not to mention if the person calling this load had actually setup listeners on this uri then this information would be lost (which is actually causing bug 34167).

git-svn-id: svn://10.0.0.236/trunk@64911 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
tbogard%aol.net
2000-04-01 23:28:31 +00:00
parent 35108e828a
commit 1fc8b4694a
2 changed files with 6 additions and 24 deletions

View File

@@ -420,8 +420,6 @@ protected:
static PRUint32 mPluginInitCnt;
PRBool mProcessedEndDocumentLoad;
PRBool mViewSource;
MOZ_TIMER_DECLARE(mTotalTime)
#ifdef DETECT_WEBSHELL_LEAKS
@@ -556,7 +554,6 @@ nsWebShell::nsWebShell() : nsDocShell()
mDefaultCharacterSet = "";
mProcessedEndDocumentLoad = PR_FALSE;
mCharsetReloadState = eCharsetReloadInit;
mViewSource=PR_FALSE;
mHistoryService = nsnull;
mHistoryState = nsnull;
mFiredUnloadEvent = PR_FALSE;
@@ -980,7 +977,7 @@ nsWebShell::LoadURL(const PRUnichar *aURLSpec,
nsISupports * aHistoryState,
const PRUnichar* aReferrer)
{
const char *cmd = mViewSource ? "view-source" : "view" ;
const char *cmd = (mViewMode == viewSource) ? "view-source" : "view" ;
return LoadURL(aURLSpec, cmd, aPostDataStream,
aModifyHistory,aType, aLocalIP, aHistoryState,
@@ -1319,16 +1316,12 @@ NS_IMETHODIMP nsWebShell::InternalLoad(nsIURI* aURI, nsIURI* aReferrer,
break;
}
nsXPIDLCString url;
aURI->GetSpec(getter_Copies(url));
nsXPIDLCString referrer;
if(aReferrer)
aReferrer->GetSpec(getter_Copies(referrer));
return LoadURL(nsAutoString(url).GetUnicode(), nsnull, updateHistory,
0, 0, nsnull, nsAutoString(referrer).GetUnicode());
return LoadURI(aURI, "view", nsnull, updateHistory, nsIChannel::LOAD_NORMAL,
0, nsnull, nsAutoString(referrer).GetUnicode(), nsnull);
}
// nsIURIContentListener support
@@ -1564,8 +1557,6 @@ nsWebShell::LoadURL(const PRUnichar *aURLSpec,
optimizations here. -Gagan
*/
mViewSource = (0==PL_strcmp("view-source", aCommand));
nsAutoString urlStr(aURLSpec);
// first things first. try to create a uri out of the string.
nsCOMPtr<nsIURI> uri;