diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp index 5154ba81f8f7..474c219758a1 100644 --- a/dom/canvas/CanvasRenderingContext2D.cpp +++ b/dom/canvas/CanvasRenderingContext2D.cpp @@ -3696,7 +3696,7 @@ struct MOZ_STACK_CLASS CanvasBidiProcessor mOp(CanvasRenderingContext2D::TextDrawOperation::FILL), mTextRunFlags(), mDoMeasureBoundingBox(false) { - if (Preferences::GetBool(GFX_MISSING_FONTS_NOTIFY_PREF)) { + if (StaticPrefs::gfx_missing_fonts_notify()) { mMissingFonts = MakeUnique(); } } diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index b3170f5fbf23..9573792b98c9 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -304,7 +304,7 @@ nsPresContext::nsPresContext(dom::Document* aDocument, nsPresContextType aType) mTextPerf = MakeUnique(); } - if (Preferences::GetBool(GFX_MISSING_FONTS_NOTIFY_PREF)) { + if (StaticPrefs::gfx_missing_fonts_notify()) { mMissingFonts = MakeUnique(); } @@ -580,7 +580,7 @@ void nsPresContext::PreferenceChanged(const char* aPrefName) { MediaFeatureChangePropagation::JustThisDocument); } if (prefName.EqualsLiteral(GFX_MISSING_FONTS_NOTIFY_PREF)) { - if (Preferences::GetBool(GFX_MISSING_FONTS_NOTIFY_PREF)) { + if (StaticPrefs::gfx_missing_fonts_notify()) { if (!mMissingFonts) { mMissingFonts = MakeUnique(); // trigger reflow to detect missing fonts on the current page diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index 1fd54e0def21..41c343ba7e48 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -3696,22 +3696,22 @@ mirror: always - name: dom.textMetrics.actualBoundingBox.enabled - type: bool + type: RelaxedAtomicBool value: true mirror: always - name: dom.textMetrics.baselines.enabled - type: bool + type: RelaxedAtomicBool value: false mirror: always - name: dom.textMetrics.emHeight.enabled - type: bool + type: RelaxedAtomicBool value: false mirror: always - name: dom.textMetrics.fontBoundingBox.enabled - type: bool + type: RelaxedAtomicBool value: false mirror: always @@ -5412,6 +5412,13 @@ value: true mirror: once +# Do we fire a notification about missing fonts, so the front-end can decide +# whether to try and do something about it (e.g. download additional fonts)? +- name: gfx.missing_fonts.notify + type: RelaxedAtomicBool + value: false + mirror: always + #if !defined(MOZ_WIDGET_ANDROID) - name: gfx.egl.prefer-gles.enabled type: bool diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index fe6a68b6a46c..38d9b195910f 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -592,10 +592,6 @@ pref("gfx.downloadable_fonts.fallback_delay_short", 100); // the uncached load behavior across pages (useful for testing reflow problems) pref("gfx.downloadable_fonts.disable_cache", false); -// Do we fire a notification about missing fonts, so the front-end can decide -// whether to try and do something about it (e.g. download additional fonts)? -pref("gfx.missing_fonts.notify", false); - // whether to always search all font cmaps during system font fallback pref("gfx.font_rendering.fallback.always_use_cmaps", false);