зеркало из https://github.com/mozilla/pjs.git
#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
This commit is contained in:
Родитель
1571fab982
Коммит
1db5aca976
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче