Bug 1557291 - Check the hyphenate-capitalized pref after resolving aliases/fuzzy matches. r=mats

Differential Revision: https://phabricator.services.mozilla.com/D33936

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jonathan Kew 2019-06-10 11:51:28 +00:00
Родитель 260e07c0c7
Коммит 3b316f9847
1 изменённых файлов: 3 добавлений и 4 удалений

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

@ -80,9 +80,6 @@ already_AddRefed<nsHyphenator> nsHyphenationManager::GetHyphenator(
if (hyph) {
return hyph.forget();
}
nsAutoCString hyphCapPref("intl.hyphenate-capitalized.");
hyphCapPref.Append(nsAtomCString(aLocale));
bool hyphenateCapitalized = Preferences::GetBool(hyphCapPref.get());
nsCOMPtr<nsIURI> uri = mPatternFiles.Get(aLocale);
if (!uri) {
RefPtr<nsAtom> alias = mHyphAliases.Get(aLocale);
@ -114,7 +111,9 @@ already_AddRefed<nsHyphenator> nsHyphenationManager::GetHyphenator(
}
}
}
hyph = new nsHyphenator(uri, hyphenateCapitalized);
nsAutoCString hyphCapPref("intl.hyphenate-capitalized.");
hyphCapPref.Append(nsAtomCString(aLocale));
hyph = new nsHyphenator(uri, Preferences::GetBool(hyphCapPref.get()));
if (hyph->IsValid()) {
mHyphenators.Put(aLocale, hyph);
return hyph.forget();