From b08701529f650a255ed7ba77b171d63bd28153b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 6 Jun 2023 13:03:08 +0200 Subject: [PATCH] style: Keep system fonts when prioritizing user fonts This was a subtle behavior change in bug 1739464. The early-return here: https://hg.mozilla.org/mozilla-central/rev/2fb74c67b0c5#l11.40 Meant we also bailed out from user font prioritization for system fonts. It's unclear whether that's really the best behavior but since the intention of the regressing patch was not to change behavior, preserving the old behavior seems better. Differential Revision: https://phabricator.services.mozilla.com/D131899 --- components/style/properties/cascade.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/style/properties/cascade.rs b/components/style/properties/cascade.rs index 0f3daec3039..6b8c4cf4d37 100644 --- a/components/style/properties/cascade.rs +++ b/components/style/properties/cascade.rs @@ -933,6 +933,10 @@ impl<'a, 'b: 'a> Cascade<'a, 'b> { let default_font_type = { let font = builder.get_font().gecko(); + if font.mFont.family.is_system_font { + return; + } + if !font.mFont.family.families.needs_user_font_prioritization() { return; }