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.

This commit is contained in:
tbogard%aol.net 1999-12-21 02:18:51 +00:00
Родитель 14b191325e
Коммит 6fa5ae3daa
2 изменённых файлов: 2 добавлений и 12 удалений

Просмотреть файл

@ -1680,7 +1680,7 @@ NS_IMETHODIMP nsWebShell::CanHandleContent(const char * aContentType,
// up to our parent content handler...
nsCOMPtr<nsIURIContentListener> 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;
}

Просмотреть файл

@ -1680,7 +1680,7 @@ NS_IMETHODIMP nsWebShell::CanHandleContent(const char * aContentType,
// up to our parent content handler...
nsCOMPtr<nsIURIContentListener> 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;
}