diff --git a/components/style/values/specified/calc.rs b/components/style/values/specified/calc.rs index 397f2ec98de..9d0943dbf55 100644 --- a/components/style/values/specified/calc.rs +++ b/components/style/values/specified/calc.rs @@ -21,11 +21,17 @@ use style_traits::values::specified::AllowedNumericType; use style_traits::{CssWriter, ParseError, SpecifiedValueInfo, StyleParseErrorKind, ToCss}; fn trig_enabled() -> bool { - static_prefs::pref!("layout.css.trig.enabled") + #[cfg(feature = "gecko")] + return static_prefs::pref!("layout.css.trig.enabled"); + #[cfg(feature = "servo")] + return false; } fn nan_inf_enabled() -> bool { - static_prefs::pref!("layout.css.nan-inf.enabled") + #[cfg(feature = "gecko")] + return static_prefs::pref!("layout.css.nan-inf.enabled"); + #[cfg(feature = "servo")] + return false; } /// The name of the mathematical function that we're parsing. @@ -303,13 +309,6 @@ impl generic::CalcNodeLeaf for Leaf { } } -fn trig_enabled() -> bool { - #[cfg(feature = "gecko")] - return static_prefs::pref!("layout.css.trig.enabled"); - #[cfg(feature = "servo")] - return false; -} - /// A calc node representation for specified values. pub type CalcNode = generic::GenericCalcNode;