From f0261a0632d7b3e1c3e8c0bb9ec9df3d881810ae Mon Sep 17 00:00:00 2001 From: Mark Pilgrim <43750833+pilgrim-brave@users.noreply.github.com> Date: Thu, 28 Apr 2022 15:01:52 -0400 Subject: [PATCH] Don't apply whitelist to if font family is generic (#13205) --- .../blink/renderer/platform/fonts/font_fallback_list.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chromium_src/third_party/blink/renderer/platform/fonts/font_fallback_list.cc b/chromium_src/third_party/blink/renderer/platform/fonts/font_fallback_list.cc index 73578d3ccb7d..114b849fd5fd 100644 --- a/chromium_src/third_party/blink/renderer/platform/fonts/font_fallback_list.cc +++ b/chromium_src/third_party/blink/renderer/platform/fonts/font_fallback_list.cc @@ -31,7 +31,8 @@ void RegisterAllowFontFamilyCallback(AllowFontFamilyCallback callback) { // does NOT find a matching font, because we want to allow web fonts // unconditionally. #define BRAVE_GET_FONT_DATA \ - if (brave::GetAllowFontFamilyCallback() && \ + if ((!curr_family->FamilyIsGeneric()) && \ + brave::GetAllowFontFamilyCallback() && \ !brave::GetAllowFontFamilyCallback()->Run( \ GetFontSelector()->GetExecutionContext(), \ curr_family->FamilyName())) \