Further changes required by Servo

This commit is contained in:
Oriol Brufau 2023-05-27 15:54:14 +02:00
parent c21a0dcc96
commit 3d54b27a50
2 changed files with 11 additions and 2 deletions

View file

@ -324,7 +324,9 @@ ${helpers.predefined_type(
"animation-timeline", "animation-timeline",
"AnimationTimeline", "AnimationTimeline",
"computed::AnimationTimeline::auto()", "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()", initial_specified_value="specified::AnimationTimeline::auto()",
vector=True, vector=True,
need_index=True, need_index=True,

View file

@ -210,6 +210,13 @@ macro_rules! try_parse_one {
% endfor % 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>( fn parse_one_animation<'i, 't>(
context: &ParserContext, context: &ParserContext,
input: &mut Parser<'i, 't>, 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, fill_mode, animation_fill_mode);
try_parse_one!(context, input, play_state, animation_play_state); try_parse_one!(context, input, play_state, animation_play_state);
try_parse_one!(context, input, name, animation_name); 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); try_parse_one!(context, input, timeline, animation_timeline);
} }