#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:
shanjian%netscape.com 2002-06-03 21:09:22 +00:00
Родитель 1571fab982
Коммит 1db5aca976
1 изменённых файлов: 6 добавлений и 6 удалений

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

@ -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);
}
}
}
}