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
This commit is contained in:
Emilio Cobos Álvarez 2023-06-06 13:03:08 +02:00 committed by Oriol Brufau
parent 4904a97111
commit b08701529f

View file

@ -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;
}