From 7e99aa819c2c1e38e674d7495602f2f604296c48 Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Wed, 14 Feb 2018 22:02:05 +1100 Subject: [PATCH] Bug 1435984 - patch 1 - Cache the font-variations.enabled pref in StylePrefs for ready access in descriptor parsing. r=jwatt --HG-- extra : source : 76e5042012c9c2f9c94953c62ea6f758f128e6f3 --- layout/style/StylePrefs.cpp | 3 +++ layout/style/StylePrefs.h | 1 + 2 files changed, 4 insertions(+) diff --git a/layout/style/StylePrefs.cpp b/layout/style/StylePrefs.cpp index 8752b9141753..9db048baf352 100644 --- a/layout/style/StylePrefs.cpp +++ b/layout/style/StylePrefs.cpp @@ -21,6 +21,7 @@ bool StylePrefs::sUnprefixedFullscreenApiEnabled; bool StylePrefs::sVisitedLinksEnabled; bool StylePrefs::sMozDocumentEnabledInContent; bool StylePrefs::sGridTemplateSubgridValueEnabled; +bool StylePrefs::sFontVariationsEnabled; bool StylePrefs::sEmulateMozBoxWithFlex; /* static */ void @@ -48,6 +49,8 @@ StylePrefs::Init() "layout.css.moz-document.content.enabled"); Preferences::AddBoolVarCache(&sGridTemplateSubgridValueEnabled, "layout.css.grid-template-subgrid-value.enabled"); + Preferences::AddBoolVarCache(&sFontVariationsEnabled, + "layout.css.font-variations.enabled"); // Only honor layout.css.emulate-moz-box-with-flex in prerelease builds. // (In release builds, sEmulateMozBoxWithFlex will be implicitly false.) diff --git a/layout/style/StylePrefs.h b/layout/style/StylePrefs.h index 3e4133e9de2c..6e9458a49768 100644 --- a/layout/style/StylePrefs.h +++ b/layout/style/StylePrefs.h @@ -24,6 +24,7 @@ struct StylePrefs static bool sVisitedLinksEnabled; static bool sMozDocumentEnabledInContent; static bool sGridTemplateSubgridValueEnabled; + static bool sFontVariationsEnabled; static bool sEmulateMozBoxWithFlex; static void Init();