mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 11:58:55 +00:00
Bug 1281965 - Sometimes we don't want to add when searching for a family. r=jfkthame
--HG-- extra : rebase_source : c1b0ecc2cc221395947326c440e01cbb6b0044fc
This commit is contained in:
parent
a4ddff0ca6
commit
7d3551d146
@ -748,7 +748,8 @@ gfxPlatformFontList::FindAndAddFamilies(const nsAString& aFamily,
|
||||
if (!familyEntry && !mOtherFamilyNamesInitialized && !IsASCII(aFamily)) {
|
||||
InitOtherFamilyNames(!(aFlags & FindFamiliesFlags::eForceOtherFamilyNamesLoading));
|
||||
familyEntry = mOtherFamilyNames.GetWeak(key);
|
||||
if (!familyEntry && !mOtherFamilyNamesInitialized) {
|
||||
if (!familyEntry && !mOtherFamilyNamesInitialized &&
|
||||
!(aFlags & FindFamiliesFlags::eNoAddToNamesMissedWhenSearching)) {
|
||||
// localized family names load timed out, add name to list of
|
||||
// names to check after localized names are loaded
|
||||
if (!mOtherNamesMissed) {
|
||||
@ -1577,7 +1578,8 @@ gfxPlatformFontList::CleanupLoader()
|
||||
if (mOtherNamesMissed) {
|
||||
for (auto it = mOtherNamesMissed->Iter(); !it.Done(); it.Next()) {
|
||||
if (FindFamily(it.Get()->GetKey(),
|
||||
FindFamiliesFlags::eForceOtherFamilyNamesLoading)) {
|
||||
(FindFamiliesFlags::eForceOtherFamilyNamesLoading |
|
||||
FindFamiliesFlags::eNoAddToNamesMissedWhenSearching))) {
|
||||
forceReflow = true;
|
||||
ForceGlobalReflow();
|
||||
break;
|
||||
|
@ -150,7 +150,10 @@ public:
|
||||
// family" names to add to the font list. This is used to avoid
|
||||
// a recursive search when using FindFamily to find a potential base
|
||||
// family name for a styled variant.
|
||||
eNoSearchForLegacyFamilyNames = 1 << 1
|
||||
eNoSearchForLegacyFamilyNames = 1 << 1,
|
||||
|
||||
// If set, FindAndAddFamilies will not add a missing entry to mOtherNamesMissed
|
||||
eNoAddToNamesMissedWhenSearching = 1 << 2
|
||||
};
|
||||
|
||||
// Find family(ies) matching aFamily and append to the aOutput array
|
||||
|
Loading…
x
Reference in New Issue
Block a user