зеркало из https://github.com/mozilla/pjs.git
#138002 nsParser should be accept charset notification coming from low priority source
check charset source before updating parser's charset. r=ftang, sr=jst
This commit is contained in:
Родитель
16d2f4951e
Коммит
0376e6205b
|
@ -63,7 +63,11 @@ NS_IMETHODIMP nsMyObserver::Notify(
|
|||
mWeakRefDocument->SetDocumentCharacterSet(newcharset);
|
||||
}
|
||||
if(mWeakRefParser) {
|
||||
mWeakRefParser->SetDocumentCharset(newcharset, kCharsetFromAutoDetection);
|
||||
nsAutoString existingCharset;
|
||||
PRInt32 existingSource;
|
||||
mWeakRefParser->GetDocumentCharset(existingCharset, existingSource);
|
||||
if (existingSource < kCharsetFromAutoDetection)
|
||||
mWeakRefParser->SetDocumentCharset(newcharset, kCharsetFromAutoDetection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче