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

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