From 3d54b27a503847f31f2ba61fd61bbadec0217a57 Mon Sep 17 00:00:00 2001 From: Oriol Brufau Date: Sat, 27 May 2023 15:54:14 +0200 Subject: [PATCH] Further changes required by Servo --- components/style/properties/longhands/box.mako.rs | 4 +++- components/style/properties/shorthands/box.mako.rs | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/components/style/properties/longhands/box.mako.rs b/components/style/properties/longhands/box.mako.rs index bcb51524e12..62c3da725f5 100644 --- a/components/style/properties/longhands/box.mako.rs +++ b/components/style/properties/longhands/box.mako.rs @@ -324,7 +324,9 @@ ${helpers.predefined_type( "animation-timeline", "AnimationTimeline", "computed::AnimationTimeline::auto()", - engines="gecko", + engines="gecko servo-2013 servo-2020", + servo_2013_pref="layout.2013.unimplemented", + servo_2020_pref="layout.2020.unimplemented", initial_specified_value="specified::AnimationTimeline::auto()", vector=True, need_index=True, diff --git a/components/style/properties/shorthands/box.mako.rs b/components/style/properties/shorthands/box.mako.rs index b056b58c69c..5cd52902ec9 100644 --- a/components/style/properties/shorthands/box.mako.rs +++ b/components/style/properties/shorthands/box.mako.rs @@ -210,6 +210,13 @@ macro_rules! try_parse_one { % endfor } + fn scroll_linked_animations_enabled() -> bool { + #[cfg(feature = "gecko")] + return static_prefs::pref!("layout.css.scroll-linked-animations.enabled"); + #[cfg(feature = "servo")] + return false; + } + fn parse_one_animation<'i, 't>( context: &ParserContext, input: &mut Parser<'i, 't>, @@ -234,7 +241,7 @@ macro_rules! try_parse_one { try_parse_one!(context, input, fill_mode, animation_fill_mode); try_parse_one!(context, input, play_state, animation_play_state); try_parse_one!(context, input, name, animation_name); - if static_prefs::pref!("layout.css.scroll-linked-animations.enabled") { + if scroll_linked_animations_enabled() { try_parse_one!(context, input, timeline, animation_timeline); }