[webkit-changes] [WebKit/WebKit] 00baf1: [scroll-animations] view timeline with its subject...
Antoine Quint
noreply at github.com
Thu Feb 20 01:09:54 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 00baf1bf9de2d1d7750b3719307ce97214fbd1ee
https://github.com/WebKit/WebKit/commit/00baf1bf9de2d1d7750b3719307ce97214fbd1ee
Author: Antoine Quint <graouts at webkit.org>
Date: 2025-02-20 (Thu, 20 Feb 2025)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-subject-in-shadow-root-with-timeline-scope-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-subject-in-shadow-root-with-timeline-scope.html
M Source/WebCore/animation/StyleOriginatedTimelinesController.cpp
Log Message:
-----------
[scroll-animations] view timeline with its subject inside a shadow root cannot be referenced out of the shadow root
https://bugs.webkit.org/show_bug.cgi?id=287950
Reviewed by Antti Koivisto.
The demo at https://codepen.io/t_afif/full/ZEgjNxm creates a view timeline with the subject being one
of the parts inside a <progress> element's shadow root. That view timeline is then referenced using
`animation-timeline` outside of that <progress> element's shadow root.
We need to make sure to traverse shadow root boundaries when considering elements using `animation-timeline`
and `timeline-scope`.
This was not covered in WPT so we add a new test which creates a shadow root with a view timeline subject
within, sets a `timeline-scope` on a parent of the element with that shadow root attached, and reference
that timeline using `animation-timeline` on another element within that parent.
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-subject-in-shadow-root-with-timeline-scope-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-subject-in-shadow-root-with-timeline-scope.html: Added.
* Source/WebCore/animation/StyleOriginatedTimelinesController.cpp:
(WebCore::StyleOriginatedTimelinesController::determineTimelineForElement):
(WebCore::StyleOriginatedTimelinesController::updateTimelineForTimelineScope):
(WebCore::StyleOriginatedTimelinesController::setTimelineForName):
(WebCore::updateTimelinesForTimelineScope):
Canonical link: https://commits.webkit.org/290695@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