From b955fe7eac12d9fd9c6ef07b414082fc96b17453 Mon Sep 17 00:00:00 2001 From: "tbogard%aol.net" Date: Tue, 21 Dec 1999 02:18:51 +0000 Subject: [PATCH] Fixed CanHandle to check against the validity of the parent being returned rather than the success of the function. Removed some code that was taken out a few days ago. Morse accidently put it back in when checking in his local version of nsWebShell.cpp. git-svn-id: svn://10.0.0.236/trunk@56264 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsWebShell.cpp | 7 +------ mozilla/webshell/src/nsWebShell.cpp | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 67e449aec41..a8a11a68467 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -1680,7 +1680,7 @@ NS_IMETHODIMP nsWebShell::CanHandleContent(const char * aContentType, // up to our parent content handler... nsCOMPtr parentListener; nsresult rv = GetParentURIContentListener(getter_AddRefs(parentListener)); - if (NS_SUCCEEDED(rv)) + if (parentListener) rv = parentListener->CanHandleContent(aContentType, aCommand, aWindowTarget, aDesiredContentType, aCanHandleContent); else @@ -3088,11 +3088,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 67e449aec41..a8a11a68467 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -1680,7 +1680,7 @@ NS_IMETHODIMP nsWebShell::CanHandleContent(const char * aContentType, // up to our parent content handler... nsCOMPtr parentListener; nsresult rv = GetParentURIContentListener(getter_AddRefs(parentListener)); - if (NS_SUCCEEDED(rv)) + if (parentListener) rv = parentListener->CanHandleContent(aContentType, aCommand, aWindowTarget, aDesiredContentType, aCanHandleContent); else @@ -3088,11 +3088,6 @@ nsWebShell::OnEndURLLoad(nsIDocumentLoader* loader, { mDocLoaderObserver->OnEndURLLoad(mDocLoader, channel, aStatus); } - if(eCharsetReloadRequested == mCharsetReloadState) - mCharsetReloadState = eCharsetReloadStopOrigional; - else - mCharsetReloadState = eCharsetReloadInit; - return NS_OK; }