Bug 620106 - Allow chardet (if enabled) reload the page during load. r=sicking, a=blocking2.0-final.

This commit is contained in:
Henri Sivonen
2011-02-11 12:33:32 +02:00
parent 865dd5f113
commit 200d06cfa8
11 changed files with 1174 additions and 37 deletions

View File

@@ -764,7 +764,8 @@ nsHtml5TreeOpExecutor::Start()
}
void
nsHtml5TreeOpExecutor::NeedsCharsetSwitchTo(const char* aEncoding)
nsHtml5TreeOpExecutor::NeedsCharsetSwitchTo(const char* aEncoding,
PRInt32 aSource)
{
EndDocUpdate();
@@ -780,7 +781,7 @@ nsHtml5TreeOpExecutor::NeedsCharsetSwitchTo(const char* aEncoding)
// ask the webshellservice to load the URL
if (NS_SUCCEEDED(wss->StopDocumentLoad())) {
wss->ReloadDocument(aEncoding, kCharsetFromMetaTag);
wss->ReloadDocument(aEncoding, aSource);
}
// if the charset switch was accepted, wss has called Terminate() on the
// parser by now