Further changes required by Servo

This commit is contained in:
Oriol Brufau 2023-10-31 21:39:29 +01:00 committed by Martin Robinson
parent e55c03c8ff
commit a298c296e4

View file

@ -41,6 +41,13 @@ fn round_enabled() -> bool {
return false;
}
fn mod_rem_enabled() -> bool {
#[cfg(feature = "gecko")]
return static_prefs::pref!("layout.css.mod-rem.enabled");
#[cfg(feature = "servo")]
return false;
}
/// The name of the mathematical function that we're parsing.
#[derive(Clone, Copy, Debug, Parse)]
pub enum MathFunction {
@ -801,7 +808,7 @@ impl CalcNode {
} else if matches!(function, Round) {
round_enabled()
} else if matches!(function, Mod | Rem) {
static_prefs::pref!("layout.css.mod-rem.enabled")
mod_rem_enabled()
} else {
true
};