mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
#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:
parent
8332198ead
commit
6c2e95366a
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user