Further changes required by Servo

This commit is contained in:
Oriol Brufau 2023-11-03 03:06:34 +01:00 committed by Martin Robinson
parent 21d1bdeb9b
commit 34eb94c71e

View file

@ -48,6 +48,13 @@ fn mod_rem_enabled() -> bool {
return false; 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. /// The name of the mathematical function that we're parsing.
#[derive(Clone, Copy, Debug, Parse)] #[derive(Clone, Copy, Debug, Parse)]
pub enum MathFunction { pub enum MathFunction {
@ -871,7 +878,7 @@ impl CalcNode {
} else if matches!(function, Mod | Rem) { } else if matches!(function, Mod | Rem) {
mod_rem_enabled() mod_rem_enabled()
} else if matches!(function, Pow | Sqrt | Hypot | Log | Exp) { } else if matches!(function, Pow | Sqrt | Hypot | Log | Exp) {
static_prefs::pref!("layout.css.exp.enabled") exp_enabled()
} else { } else {
true true
}; };