Bug 1854857 - Don't apply the use_document_fonts=0 setting to chrome contexts; it is intended to affect content only. r=firefox-style-system-reviewers,emilio

Differential Revision: https://phabricator.services.mozilla.com/D192817
This commit is contained in:
Jonathan Kew 2023-11-06 10:07:50 +00:00
parent e069a5d4fb
commit 61646a7103

View File

@ -1098,11 +1098,16 @@ impl<'a, 'b: 'a> Cascade<'a, 'b> {
fn prioritize_user_fonts_if_needed(&mut self) {
use crate::gecko_bindings::bindings;
if static_prefs::pref!("browser.display.use_document_fonts") != 0 {
let builder = &mut self.context.builder;
// Check the use_document_fonts setting for content, but for chrome
// documents they're treated as always enabled.
if static_prefs::pref!("browser.display.use_document_fonts") != 0 ||
builder.device.chrome_rules_enabled_for_document()
{
return;
}
let builder = &mut self.context.builder;
let default_font_type = {
let font = builder.get_font();