Skip to content
Permalink
Browse files

style: Add a preference for offset-path:ray().

  • Loading branch information
BorisChiou authored and emilio committed Nov 20, 2019
1 parent f8ceb5c commit 5582de5d7eb89d948d8175d9cda679ecb9f85e3e
Showing with 13 additions and 0 deletions.
  1. +13 −0 components/style/values/specified/motion.rs
@@ -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;

0 comments on commit 5582de5

Please sign in to comment.
You can’t perform that action at this time.