[webkit-changes] [WebKit/WebKit] d81ea5: [scroll-animations] associate CSS Animations with ...
Antoine Quint
noreply at github.com
Thu Oct 17 08:18:37 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d81ea504ee6fe0be389fcf1b4ad67a9e8c3a77de
https://github.com/WebKit/WebKit/commit/d81ea504ee6fe0be389fcf1b4ad67a9e8c3a77de
Author: Antoine Quint <graouts at webkit.org>
Date: 2024-10-17 (Thu, 17 Oct 2024)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-animation-with-scroll-timeline-in-auto-subtree-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-animation-with-scroll-timeline-in-hidden-subtree-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/animation-events-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/animation-timeline-ignored.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/get-animations-inactive-timeline-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/merge-timeline-offset-keyframes-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-document-scroller-quirks-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-dynamic.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-in-container-query-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-inactive-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-multi-pass.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-name-shadow-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-nearest-dirty-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-nearest-with-absolute-positioned-element-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-paused-animations-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-range-animation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-responsiveness-from-endpoint-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-root-dirty-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/timeline-offset-keyframes-hidden-subject-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-animation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-animation-range-update.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-inset-animation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-keyframe-boundary-interpolation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-lookup-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-name-shadow-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-range-animation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-used-values-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-with-transform-on-subject-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/change-animation-range-updates-play-state-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/inline-subject-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/svg-graphics-element-001-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/svg-graphics-element-002-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/svg-graphics-element-003-expected.txt
M Source/WebCore/animation/AnimationTimelinesController.cpp
M Source/WebCore/animation/AnimationTimelinesController.h
M Source/WebCore/animation/CSSAnimation.cpp
M Source/WebCore/animation/ScrollTimeline.cpp
M Source/WebCore/animation/ScrollTimeline.h
M Source/WebCore/style/StyleTreeResolver.cpp
M Source/WebCore/style/Styleable.cpp
M Source/WebCore/style/Styleable.h
Log Message:
-----------
[scroll-animations] associate CSS Animations with scroll timelines
https://bugs.webkit.org/show_bug.cgi?id=281612
rdar://138058615
Reviewed by Antti Koivisto.
While we've already added support for parsing the `animation-timeline` property for named
scroll timelines and the `scroll()` function for anonymous scroll timelines, we haven't yet
associated CSS Animations with those timelines.
We kick this off under `Style::TreeResolver::createAnimatedElementUpdate()` by calling the
new `Styleable::updateCSSScrollDrivenTimelines()` method where we'll process both anonymous
scroll timelines and named scroll timelines.
For named scroll timelines, we keep a map on `AnimationTimelinesController` to be able to
register, unregister and get a named timeline. Then in `CSSAnimation::syncPropertiesWithBackingAnimation()`
we call `setTimeline()` to the provided anonymous or named scroll timeline.
Since this is the first time we're making use of `animation-timeline` or `scroll()` in a way
that is visible to Web content, other than querying style objects, this requires a fair bit
of rebaselining. While some tests appear as new `FAIL` results, these are almost sure to be
false positives due to not implementing style-originated timelines.
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-animation-with-scroll-timeline-in-auto-subtree-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-animation-with-scroll-timeline-in-hidden-subtree-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/animation-events-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/animation-timeline-ignored.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/get-animations-inactive-timeline-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/merge-timeline-offset-keyframes-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-document-scroller-quirks-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-dynamic.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-in-container-query-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-inactive-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-multi-pass.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-name-shadow-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-nearest-dirty-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-nearest-with-absolute-positioned-element-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-paused-animations-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-range-animation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-responsiveness-from-endpoint-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-root-dirty-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/timeline-offset-keyframes-hidden-subject-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-animation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-animation-range-update.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-inset-animation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-keyframe-boundary-interpolation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-lookup-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-name-shadow-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-range-animation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-used-values-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-with-transform-on-subject-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/change-animation-range-updates-play-state-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/inline-subject-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/svg-graphics-element-001-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/svg-graphics-element-002-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/svg-graphics-element-003-expected.txt:
* Source/WebCore/animation/AnimationTimelinesController.cpp:
(WebCore::AnimationTimelinesController::registerNamedScrollTimeline):
(WebCore::AnimationTimelinesController::unregisterNamedScrollTimeline):
(WebCore::AnimationTimelinesController::scrollTimelineForName const):
* Source/WebCore/animation/AnimationTimelinesController.h:
* Source/WebCore/animation/CSSAnimation.cpp:
(WebCore::CSSAnimation::syncPropertiesWithBackingAnimation):
* Source/WebCore/animation/ScrollTimeline.cpp:
(WebCore::ScrollTimeline::setSource):
* Source/WebCore/animation/ScrollTimeline.h:
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
* Source/WebCore/style/Styleable.cpp:
(WebCore::Styleable::updateCSSScrollDrivenTimelines const):
* Source/WebCore/style/Styleable.h:
Canonical link: https://commits.webkit.org/285341@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list