[webkit-changes] [WebKit/WebKit] c2b6c8: [scroll-animations] https://scroll-driven-animatio...
Antoine Quint
noreply at github.com
Fri Oct 18 14:19:04 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c2b6c884790d5fc4c346051fc38e9ead78713732
https://github.com/WebKit/WebKit/commit/c2b6c884790d5fc4c346051fc38e9ead78713732
Author: Antoine Quint <graouts at webkit.org>
Date: 2024-10-18 (Fri, 18 Oct 2024)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/animation-timeline-named-scroll-progress-timeline.tentative-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/view-timeline-animation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-dynamic-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-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-used-values-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-with-delay-and-range.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/change-animation-range-updates-play-state-expected.txt
M Source/WebCore/animation/AnimationTimelinesController.cpp
M Source/WebCore/animation/AnimationTimelinesController.h
M Source/WebCore/animation/CSSAnimation.cpp
M Source/WebCore/style/StyleTreeResolver.cpp
M Source/WebCore/style/Styleable.cpp
Log Message:
-----------
[scroll-animations] https://scroll-driven-animations.style/demos/image-reveal/css/ fails to create all expected view timelines
https://bugs.webkit.org/show_bug.cgi?id=281752
rdar://138185228
Reviewed by Tim Nguyen.
In https://scroll-driven-animations.style/demos/image-reveal/css/, the elements associated with a
view timeline are declared as follows:
```
.revealing-image {
/* Create View Timeline */
view-timeline-name: --revealing-image;
/* Attach animation, linked to the View Timeline */
animation: linear reveal both;
animation-timeline: --revealing-image;
}
```
In the initial patch to associate CSS Animations with style-originated view timelines (285354 at main)
we made the incorrect assumption that there could only ever be one `ViewTimeline` created for a given
`view-timeline-name` value. But in fact it's expected that there may be multiple `ViewTimeline` created
for a given `view-timeline-name` value, one per subject, ie. the element with the `view-timeline-name`
in its computed style.
So we modify the registration system and lookup system for view timelines on `AnimationTimelinesController`
to work with a `Vector<Ref<ViewTimeline>>` per name.
Another issue that surfaced as well was that we would register view timelines for a given element _after_
creating CSS Animations. This is the wrong order of operations since the generated CSS Animations may well
depend upon view timelines with that element as its subject. So we ensure to call `updateCSSScrollTimelines()`
and `updateCSSViewTimelines()` prior to calling `updateCSSAnimations()` in `Style::TreeResolver::createAnimatedElementUpdate()`.
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/animation-timeline-named-scroll-progress-timeline.tentative-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/view-timeline-animation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-dynamic-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-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-used-values-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-with-delay-and-range.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/change-animation-range-updates-play-state-expected.txt:
* Source/WebCore/animation/AnimationTimelinesController.cpp:
(WebCore::AnimationTimelinesController::registerNamedViewTimeline):
(WebCore::AnimationTimelinesController::unregisterNamedViewTimelineForSubject):
(WebCore::AnimationTimelinesController::viewTimelineForNameAndSubject const):
(WebCore::AnimationTimelinesController::unregisterNamedViewTimeline): Deleted.
(WebCore::AnimationTimelinesController::viewTimelineForName const): Deleted.
* Source/WebCore/animation/AnimationTimelinesController.h:
* Source/WebCore/animation/CSSAnimation.cpp:
(WebCore::CSSAnimation::syncPropertiesWithBackingAnimation):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
* Source/WebCore/style/Styleable.cpp:
(WebCore::Styleable::updateCSSViewTimelines const):
Canonical link: https://commits.webkit.org/285433@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