зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1367860 (part 4) - Update CSS fallback font when lang changes (stylo). r=manishearth
MozReview-Commit-ID: AeBHXc0mIVn
This commit is contained in:
Родитель
13b2e9b2ef
Коммит
9c729626a5
|
@ -2397,7 +2397,14 @@ Gecko_nsStyleFont_PrefillDefaultForGeneric(nsStyleFont* aFont,
|
|||
{
|
||||
const nsFont* defaultFont = ThreadSafeGetDefaultFontHelper(aPresContext, aFont->mLanguage,
|
||||
aGenericId);
|
||||
aFont->mFont.fontlist = defaultFont->fontlist;
|
||||
// In case of just the language changing, the parent could have had no generic,
|
||||
// which Gecko just does regular cascading with. Do the same.
|
||||
// This can only happen in the case where the language changed but the family did not
|
||||
if (aGenericId != kGenericFont_NONE) {
|
||||
aFont->mFont.fontlist = defaultFont->fontlist;
|
||||
} else {
|
||||
aFont->mFont.fontlist.SetDefaultFontType(defaultFont->fontlist.GetDefaultFontType());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче