From 76192031d3381c04e37ab0d1e413846621c9bcfe Mon Sep 17 00:00:00 2001 From: Oriol Brufau Date: Sat, 23 Sep 2023 19:16:00 +0200 Subject: [PATCH] Further changes required by Servo --- components/style/values/specified/calc.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) 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;