diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index 679dd6dcbe07..e159edba100c 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -269,11 +269,13 @@ static const char* gExactCallbackPrefs[] = { "nglayout.debug.paint_flashing", "nglayout.debug.paint_flashing_chrome", "intl.accept_languages", + "dom.meta-viewport.enabled", nullptr, }; static const char* gPrefixCallbackPrefs[] = { - "font.", "browser.display.", "bidi.", "gfx.font_rendering.", nullptr, + "font.", "browser.display.", "browser.viewport.", + "bidi.", "gfx.font_rendering.", nullptr, }; void nsPresContext::Destroy() { @@ -497,6 +499,15 @@ void nsPresContext::PreferenceChanged(const char* aPrefName) { } return; } + + if (StringBeginsWith(prefName, "browser.viewport."_ns) || + StringBeginsWith(prefName, "font.size.inflation."_ns) || + prefName.EqualsLiteral("dom.meta-viewport.enabled")) { + if (mPresShell) { + mPresShell->MaybeReflowForInflationScreenSizeChange(); + } + } + if (prefName.EqualsLiteral("layout.css.prefers-contrast.enabled") ||