Update the default behavior of named timeline scoping and lookup
Categories
(Core :: CSS Transitions and Animations, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox155 | --- | fixed |
People
(Reporter: boris, Assigned: dshin)
References
()
Details
(Keywords: dev-doc-complete, Whiteboard: [scrollanimation:mvp], [wptsync upstream])
Attachments
(4 external files)
The default behavior of named timeline scoping and lookup just got updated to be global (PR w3c/csswg-draft#13624):
Timeline names are global by default: An element referring to a named scroll progress timeline or view progress timeline can find a target timeline defined on itself, defined on an element before itself in tree order, or defined on an element after itself in tree order.
The target timeline for a given element element referencing a timeline name name is:
- If element defines a timeline matching name,
- That timeline.
- Otherwise, if name is scoped by element, or if element is the document element,
- The last defined timeline matching name among element’s flat tree descendants in flat tree order, or, if no such timeline exists, an inactive timeline.
- Otherwise,
- The target timeline for element’s flat tree parent referencing name.
| Reporter | ||
Comment 1•8 months ago
•
|
||
So in order to make sure all timelines are discoverable for a specific element (i.e. the animation target), we have to make sure those named timelines are generated already, even for the subtree.
Our current SequentialTasks doesn't allow us to do this because we update timelines and animations in the same task, in the tree order. So all the timelines in the subtree are not generated yet when we create the animations of a specific element.
A possible resolution is to preprocess the SequentialTask list, e.g. split it into 2 buckets. The first bucket is for updating named ScrollTimelines and ViewTimelines, and the 2nd bucket is for updating others, e.g. timeline-scope and animations.
Or, could we update the named timelines during traversal? This may be tricky as well.
| Reporter | ||
Comment 2•7 months ago
•
|
||
(In reply to Boris Chiou [:boris] from comment #1)
A possible resolution is to preprocess the SequentialTask list, e.g. split it into 2 buckets. The first bucket is for updating named ScrollTimelines and ViewTimelines, and the 2nd bucket is for updating others, e.g. timeline-scope and animations.
So about this way, we have a question last week: should we keep the old computed data for named timeline update for the first bucket? After rethinking about this, we may not need to keep the old computed data for the SequentialTask of update named timelines, because:
- It is not transitionable. (No need to create CSS transitions, so we don't need to generate the keyframe.)
- We can create the new named timelines first, and just go through the unused timelines and try to update their associated animations before we destroy those unused timelines. Just like what we do for CSS animations (related to Bug 1774060).
Comment 3•7 months ago
|
||
Requires further discussion prior to estimating.
| Assignee | ||
Comment 4•6 months ago
|
||
InterOp Change proposal filed for this change. Impact may be smaller than I thought.
Updated•4 months ago
|
| Assignee | ||
Updated•4 months ago
|
| Assignee | ||
Comment 5•3 months ago
|
||
As per:
https://github.com/w3c/csswg-drafts/issues/9256#issuecomment-4556112966
It's technically different from the existing concept of inactive timeline.
| Assignee | ||
Comment 6•3 months ago
|
||
This lines up better with other browsers, and the resolution in
https://github.com/w3c/csswg-drafts/issues/9256.
Should be noted that we (Nor other browsers) seem to resolve
the ready promise, which should be a follow-up.
| Assignee | ||
Comment 7•3 months ago
|
||
Remove a test from
animation-timeline-named-scroll-progress-timeline.tentative.html
that asserts sibling timeline(s) not being visible by default,
which isn't the case anymore.
Adjust timeline-scope* tests to reflect the new behaviour.
| Assignee | ||
Comment 8•3 months ago
|
||
Given https://github.com/w3c/csswg-drafts/issues/9256, hopefully an
uncontroversial change. Previously, because timeline-scope made timelines
more available, it made sense that we handle unscoped and scoped timeline
references differently. Now that timelines are more visible and
timeline-scope in fact restricts visibility, it seems inconsistent to
continue to treat them differently.
The following tests used unresolved timelines without any timeline-scope,
and expected the animation to produce an effect, which should not be the
case anymore:
- animation-timeline-named-scroll-progress-timeline.tentative.html
- animation-timeline-none.html
- scroll-timeline-dynamic.tentative.html
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/61776 for changes under testing/web-platform/tests
Comment 11•3 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/39319a25c0e4
https://hg.mozilla.org/mozilla-central/rev/6833e04c208a
https://hg.mozilla.org/mozilla-central/rev/4f6160672884
https://hg.mozilla.org/mozilla-central/rev/bacfb3d1a257
Updated•3 months ago
|
Upstream PR was closed without merging
| Assignee | ||
Comment 13•3 months ago
|
||
(Was accidentally closed, reopened)
Updated•3 months ago
|
Upstream PR merged by moz-wptsync-bot
Comment 16•2 months ago
|
||
If I am right, timeline-scope: all; is not supported here.
- Chrome has removed this in 138
- Safari supports this in 26
- in firefox nightly 157 devtools
allis not an option
| Assignee | ||
Comment 17•2 months ago
|
||
It actually does work, but yeah, DevTools does not report that, because we missed that keyword on the backend. Bug 2068613 filed
Description
•