Further changes required by Servo

This commit is contained in:
Oriol Brufau 2023-09-23 19:16:00 +02:00 committed by Martin Robinson
parent cc09c2ffb1
commit 76192031d3

View file

@ -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<Leaf>;