From e7619714a6a335f0c927bf3ced8b3f09a5bd74c4 Mon Sep 17 00:00:00 2001 From: "ftang%netscape.com" Date: Wed, 15 Dec 1999 21:26:12 +0000 Subject: [PATCH] fix bug 21722. move charsetreload state clean up code from OnEndURLLoad to OnEndDocumentLoad. r=rpotts. git-svn-id: svn://10.0.0.236/trunk@56053 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsWebShell.cpp | 13 +++++++------ mozilla/webshell/src/nsWebShell.cpp | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 09a2d6f6e96..aafc56dd05a 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -3013,6 +3013,12 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, nsCOMPtr aURL; rv = channel->GetURI(getter_AddRefs(aURL)); if (NS_FAILED(rv)) return rv; + + // clean up reload state for meta charset + if(eCharsetReloadRequested == mCharsetReloadState) + mCharsetReloadState = eCharsetReloadStopOrigional; + else + mCharsetReloadState = eCharsetReloadInit; /* one of many safeguards that prevent death and destruction if someone is so very very rude as to bring this window down @@ -3212,7 +3218,7 @@ nsWebShell::OnEndURLLoad(nsIDocumentLoader* loader, nsresult aStatus) { #if 0 - const char* spec; + const char* spec; aURL->GetSpec(&spec); printf("nsWebShell::OnEndURLLoad:%p: loader=%p url=%s status=%d\n", this, loader, spec, aStatus); #endif @@ -3223,11 +3229,6 @@ nsWebShell::OnEndURLLoad(nsIDocumentLoader* loader, { mDocLoaderObserver->OnEndURLLoad(mDocLoader, channel, aStatus); } - if(eCharsetReloadRequested == mCharsetReloadState) - mCharsetReloadState = eCharsetReloadStopOrigional; - else - mCharsetReloadState = eCharsetReloadInit; - return NS_OK; } diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index 09a2d6f6e96..aafc56dd05a 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -3013,6 +3013,12 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, nsCOMPtr aURL; rv = channel->GetURI(getter_AddRefs(aURL)); if (NS_FAILED(rv)) return rv; + + // clean up reload state for meta charset + if(eCharsetReloadRequested == mCharsetReloadState) + mCharsetReloadState = eCharsetReloadStopOrigional; + else + mCharsetReloadState = eCharsetReloadInit; /* one of many safeguards that prevent death and destruction if someone is so very very rude as to bring this window down @@ -3212,7 +3218,7 @@ nsWebShell::OnEndURLLoad(nsIDocumentLoader* loader, nsresult aStatus) { #if 0 - const char* spec; + const char* spec; aURL->GetSpec(&spec); printf("nsWebShell::OnEndURLLoad:%p: loader=%p url=%s status=%d\n", this, loader, spec, aStatus); #endif @@ -3223,11 +3229,6 @@ nsWebShell::OnEndURLLoad(nsIDocumentLoader* loader, { mDocLoaderObserver->OnEndURLLoad(mDocLoader, channel, aStatus); } - if(eCharsetReloadRequested == mCharsetReloadState) - mCharsetReloadState = eCharsetReloadStopOrigional; - else - mCharsetReloadState = eCharsetReloadInit; - return NS_OK; }