diff --git a/components/style/values/specified/motion.rs b/components/style/values/specified/motion.rs index 57cdfac4806..32f4cf677e4 100644 --- a/components/style/values/specified/motion.rs +++ b/components/style/values/specified/motion.rs @@ -16,12 +16,21 @@ use style_traits::{ParseError, StyleParseErrorKind}; /// The specified value of `offset-path`. pub type OffsetPath = GenericOffsetPath; +#[cfg(feature = "gecko")] +fn is_ray_enabled() -> bool { + static_prefs::pref!("layout.css.motion-path-ray.enabled") +} +#[cfg(feature = "servo")] +fn is_ray_enabled() -> bool { + false +} + impl Parse for RayFunction { fn parse<'i, 't>( context: &ParserContext, input: &mut Parser<'i, 't>, ) -> Result> { - if !static_prefs::pref!("layout.css.motion-path-ray.enabled") { + if !is_ray_enabled() { return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError)); }