Skip to content
Snippets Groups Projects
Verified Commit 63219c0c authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern:
Browse files

Bug 42377: Hidden fonts should obey the allow list.

Hidden font families were automatically added to the
`font.system.whitelist`, which is a behavior that conflicts with our
font picking.
parent eaa8c377
No related branches found
No related tags found
No related merge requests found
......@@ -401,12 +401,6 @@ void gfxPlatformFontList::ApplyWhitelist() {
AutoTArray<RefPtr<gfxFontFamily>, 128> accepted;
bool whitelistedFontFound = false;
for (const auto& entry : mFontFamilies) {
if (entry.GetData()->IsHidden()) {
// Hidden system fonts are exempt from whitelisting, but don't count
// towards determining whether we "kept" any (user-visible) fonts
accepted.AppendElement(entry.GetData());
continue;
}
nsAutoCString fontFamilyName(entry.GetKey());
ToLowerCase(fontFamilyName);
if (familyNamesWhitelist.Contains(fontFamilyName)) {
......@@ -442,8 +436,7 @@ void gfxPlatformFontList::ApplyWhitelist(
AutoTArray<fontlist::Family::InitData, 128> accepted;
bool keptNonHidden = false;
for (auto& f : aFamilies) {
if (f.mVisibility == FontVisibility::Hidden ||
familyNamesWhitelist.Contains(f.mKey)) {
if (familyNamesWhitelist.Contains(f.mKey)) {
accepted.AppendElement(f);
if (f.mVisibility != FontVisibility::Hidden) {
keptNonHidden = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment