style: Rename scroll-linked (animations) to scroll-driven (excluding WPT tests)

The spec is still using `Scroll-linked`, so we exclude the change of WPT tests.
I believe WPT will get updates once the spec doc is renamed.

Differential Revision: https://phabricator.services.mozilla.com/D165914
This commit is contained in:
Boris Chiou 2023-01-04 00:50:45 +00:00 committed by Martin Robinson
parent bc438d725f
commit 425a92143d
2 changed files with 10 additions and 11 deletions

View file

@ -326,7 +326,7 @@ ${helpers.predefined_type(
vector=True, vector=True,
need_index=True, need_index=True,
animation_value_type="none", animation_value_type="none",
gecko_pref="layout.css.scroll-linked-animations.enabled", gecko_pref="layout.css.scroll-driven-animations.enabled",
spec="https://drafts.csswg.org/css-animations-2/#propdef-animation-timeline", spec="https://drafts.csswg.org/css-animations-2/#propdef-animation-timeline",
rule_types_allowed=DEFAULT_RULES_EXCEPT_KEYFRAME, rule_types_allowed=DEFAULT_RULES_EXCEPT_KEYFRAME,
)} )}
@ -337,8 +337,8 @@ ${helpers.predefined_type(
"computed::ScrollTimelineName::none()", "computed::ScrollTimelineName::none()",
engines="gecko", engines="gecko",
animation_value_type="none", animation_value_type="none",
gecko_pref="layout.css.scroll-linked-animations.enabled", gecko_pref="layout.css.scroll-driven-animations.enabled",
spec="https://github.com/w3c/csswg-drafts/issues/6674", spec="https://drafts.csswg.org/scroll-animations-1/#scroll-timeline-name",
rule_types_allowed=DEFAULT_RULES_EXCEPT_KEYFRAME, rule_types_allowed=DEFAULT_RULES_EXCEPT_KEYFRAME,
)} )}
@ -348,7 +348,7 @@ ${helpers.predefined_type(
"computed::ScrollAxis::default()", "computed::ScrollAxis::default()",
engines="gecko", engines="gecko",
animation_value_type="none", animation_value_type="none",
gecko_pref="layout.css.scroll-linked-animations.enabled", gecko_pref="layout.css.scroll-driven-animations.enabled",
spec="https://github.com/w3c/csswg-drafts/issues/6674", spec="https://drafts.csswg.org/scroll-animations-1/#scroll-timeline-axis",
rule_types_allowed=DEFAULT_RULES_EXCEPT_KEYFRAME, rule_types_allowed=DEFAULT_RULES_EXCEPT_KEYFRAME,
)} )}

View file

@ -190,9 +190,9 @@ macro_rules! try_parse_one {
% endfor % endfor
} }
fn scroll_linked_animations_enabled() -> bool { fn scroll_driven_animations_enabled() -> bool {
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
return static_prefs::pref!("layout.css.scroll-linked-animations.enabled"); return static_prefs::pref!("layout.css.scroll-driven-animations.enabled");
#[cfg(feature = "servo")] #[cfg(feature = "servo")]
return false; return false;
} }
@ -221,7 +221,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 scroll_linked_animations_enabled() { if scroll_driven_animations_enabled() {
try_parse_one!(context, input, timeline, animation_timeline); try_parse_one!(context, input, timeline, animation_timeline);
} }
@ -320,9 +320,8 @@ macro_rules! try_parse_one {
engines="gecko" engines="gecko"
name="scroll-timeline" name="scroll-timeline"
sub_properties="scroll-timeline-name scroll-timeline-axis" sub_properties="scroll-timeline-name scroll-timeline-axis"
gecko_pref="layout.css.scroll-linked-animations.enabled", gecko_pref="layout.css.scroll-driven-animations.enabled",
// Also in https://drafts.csswg.org/scroll-animations-1/rewrite#scroll-timeline-shorthand spec="https://drafts.csswg.org/scroll-animations-1/#scroll-timeline-shorthand"
spec="https://github.com/w3c/csswg-drafts/issues/6674"
> >
pub fn parse_value<'i>( pub fn parse_value<'i>(
context: &ParserContext, context: &ParserContext,