Further changes required by Servo

This commit is contained in:
Oriol Brufau 2023-10-29 18:29:39 +01:00 committed by Martin Robinson
parent 6a4a97ad7c
commit a4d2beecd3

View file

@ -34,6 +34,13 @@ fn nan_inf_enabled() -> bool {
return false;
}
fn round_enabled() -> bool {
#[cfg(feature = "gecko")]
return static_prefs::pref!("layout.css.round.enabled");
#[cfg(feature = "servo")]
return false;
}
/// The name of the mathematical function that we're parsing.
#[derive(Clone, Copy, Debug, Parse)]
pub enum MathFunction {
@ -772,7 +779,7 @@ impl CalcNode {
let enabled = if matches!(function, Sin | Cos | Tan | Asin | Acos | Atan | Atan2) {
trig_enabled()
} else if matches!(function, Round) {
static_prefs::pref!("layout.css.round.enabled")
round_enabled()
} else {
true
};