From 34eb94c71e3292c2fc244254bde5c440e7bac2e8 Mon Sep 17 00:00:00 2001 From: Oriol Brufau Date: Fri, 3 Nov 2023 03:06:34 +0100 Subject: [PATCH] Further changes required by Servo --- components/style/values/specified/calc.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/style/values/specified/calc.rs b/components/style/values/specified/calc.rs index 04d9d7113dd..7fae98cc88d 100644 --- a/components/style/values/specified/calc.rs +++ b/components/style/values/specified/calc.rs @@ -48,6 +48,13 @@ fn mod_rem_enabled() -> bool { return false; } +fn exp_enabled() -> bool { + #[cfg(feature = "gecko")] + return static_prefs::pref!("layout.css.exp.enabled"); + #[cfg(feature = "servo")] + return false; +} + /// The name of the mathematical function that we're parsing. #[derive(Clone, Copy, Debug, Parse)] pub enum MathFunction { @@ -871,7 +878,7 @@ impl CalcNode { } else if matches!(function, Mod | Rem) { mod_rem_enabled() } else if matches!(function, Pow | Sqrt | Hypot | Log | Exp) { - static_prefs::pref!("layout.css.exp.enabled") + exp_enabled() } else { true };