зеркало из https://github.com/mozilla/pjs.git
#99666 page is displayed as blank in certain situation
r=harishd, sr=rpotts
This commit is contained in:
Родитель
316689bc6b
Коммит
a62e4f129a
|
@ -589,7 +589,8 @@ nsWebShell::ReloadDocument(const char* aCharset,
|
|||
}
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
//return failer if this request is not accepted due to mCharsetReloadState
|
||||
return NS_ERROR_WEBSHELL_REQUEST_REJECTED;
|
||||
}
|
||||
|
||||
|
||||
|
@ -598,9 +599,11 @@ nsWebShell::StopDocumentLoad(void)
|
|||
{
|
||||
if(eCharsetReloadRequested != mCharsetReloadState)
|
||||
{
|
||||
Stop(nsIWebNavigation::STOP_ALL);
|
||||
Stop(nsIWebNavigation::STOP_ALL);
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_OK;
|
||||
//return failer if this request is not accepted due to mCharsetReloadState
|
||||
return NS_ERROR_WEBSHELL_REQUEST_REJECTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -610,9 +613,11 @@ nsWebShell::SetRendering(PRBool aRender)
|
|||
{
|
||||
if (mContentViewer) {
|
||||
mContentViewer->SetEnableRendering(aRender);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
//return failer if this request is not accepted due to mCharsetReloadState
|
||||
return NS_ERROR_WEBSHELL_REQUEST_REJECTED;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#ifndef webshell____h
|
||||
#define webshell____h
|
||||
|
||||
#include "nsError.h"
|
||||
#include "nsIWebShellServices.h"
|
||||
#include "nsIWebShell.h"
|
||||
#include "nsILinkHandler.h"
|
||||
|
@ -37,6 +38,8 @@ typedef enum {
|
|||
eCharsetReloadStopOrigional
|
||||
} eCharsetReloadState;
|
||||
|
||||
#define NS_ERROR_WEBSHELL_REQUEST_REJECTED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL,1001)
|
||||
|
||||
class nsWebShell : public nsDocShell,
|
||||
public nsIWebShell,
|
||||
public nsIWebShellContainer,
|
||||
|
|
|
@ -102,5 +102,9 @@ NS_IMETHODIMP nsObserverBase::NotifyWebShell(
|
|||
}
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
//if our reload request is not accepted, we should tell parser to go on
|
||||
if (rv != NS_ERROR_HTMLPARSER_STOPPARSING)
|
||||
rv = NS_ERROR_HTMLPARSER_CONTINUE;
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче