Skip to content

Commit

Permalink
style: Add a preference for offset-path:ray().
Browse files Browse the repository at this point in the history
  • Loading branch information
BorisChiou authored and emilio committed Nov 30, 2019
1 parent f8ceb5c commit 5582de5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions components/style/values/specified/motion.rs
Expand Up @@ -16,11 +16,24 @@ use style_traits::{ParseError, StyleParseErrorKind};
/// The specified value of `offset-path`.
pub type OffsetPath = GenericOffsetPath<Angle>;

#[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<Angle> {
fn parse<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>> {
if !is_ray_enabled() {
return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
}

let mut angle = None;
let mut size = None;
let mut contain = false;
Expand Down

0 comments on commit 5582de5

Please sign in to comment.