#140234 Japanese auto-detection marks ISO-8859-15 page as Windows-1252
Don't update chatset for document if existing one is of higher priority. r=yokoyama, sr=jst git-svn-id: svn://10.0.0.236/trunk@122584 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -58,16 +58,16 @@ NS_IMETHODIMP nsMyObserver::Notify(
|
||||
rv = mWebShellSvc->StopDocumentLoad();
|
||||
rv = mWebShellSvc->ReloadDocument(aCharset, kCharsetFromAutoDetection);
|
||||
} else {
|
||||
nsAutoString existingCharset;
|
||||
PRInt32 existingSource;
|
||||
nsAutoString newcharset; newcharset.AssignWithConversion(aCharset);
|
||||
if(mWeakRefDocument) {
|
||||
mWeakRefDocument->SetDocumentCharacterSet(newcharset);
|
||||
}
|
||||
if(mWeakRefParser) {
|
||||
nsAutoString existingCharset;
|
||||
PRInt32 existingSource;
|
||||
mWeakRefParser->GetDocumentCharset(existingCharset, existingSource);
|
||||
if (existingSource < kCharsetFromAutoDetection)
|
||||
if (existingSource < kCharsetFromAutoDetection) {
|
||||
mWeakRefParser->SetDocumentCharset(newcharset, kCharsetFromAutoDetection);
|
||||
if(mWeakRefDocument)
|
||||
mWeakRefDocument->SetDocumentCharacterSet(newcharset);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user