bug 727815 - flush shaped-word caches when font-shaping preferences are modified. r=roc

This commit is contained in:
Jonathan Kew 2012-02-16 21:26:50 +00:00
Родитель 4d972aba14
Коммит 02710cdd5a
1 изменённых файлов: 10 добавлений и 2 удалений

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

@ -1358,11 +1358,19 @@ gfxPlatform::FontsPrefsChanged(const char *aPref)
#ifdef MOZ_GRAPHITE
} else if (!strcmp(GFX_PREF_GRAPHITE_SHAPING, aPref)) {
mGraphiteShapingEnabled = UNINITIALIZED_VALUE;
gfxFontCache::GetCache()->AgeAllGenerations();
gfxFontCache *fontCache = gfxFontCache::GetCache();
if (fontCache) {
fontCache->AgeAllGenerations();
fontCache->FlushShapedWordCaches();
}
#endif
} else if (!strcmp(GFX_PREF_HARFBUZZ_SCRIPTS, aPref)) {
mUseHarfBuzzScripts = UNINITIALIZED_VALUE;
gfxFontCache::GetCache()->AgeAllGenerations();
gfxFontCache *fontCache = gfxFontCache::GetCache();
if (fontCache) {
fontCache->AgeAllGenerations();
fontCache->FlushShapedWordCaches();
}
} else if (!strcmp(BIDI_NUMERAL_PREF, aPref)) {
mBidiNumeralOption = UNINITIALIZED_VALUE;
}