Update animation-timeline property for Anonymous Scroll Progress Timelines
Categories
(Core :: CSS Transitions and Animations, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox101 | --- | fixed |
People
(Reporter: boris, Assigned: boris)
References
(Blocks 2 open bugs, )
Details
Attachments
(4 files)
Support Anonymous Scroll Progress Timelines. In other words, we need to add scroll() notation for animation-timeline:
animation-timeline: auto | none | scroll() | <scroll-timeline-name>
animation-timeline: auto | none | scroll(<axis>? <scroller>?);
<axis> = block | inline | vertical | horizontal
<scroller> = root | nearest | <container-name>
Note:
- However, Gecko doesn't support
container-name
now (Bug 1744224), so if the user specifies a value other than root and nearest, we fallback to use the document viewport, based on the spec. - We will do
<scroll-timeline-name>
in the follow-up bug (Bug 1754897).
Assignee | ||
Comment 1•3 years ago
•
|
||
Update this title, and based on the proposal, we can support Anonymous Scroll Progress Timelines first in this bug. And move Named Scroll Progress Timelines into a separate bug (i.e. Bug 1754897).
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
Assignee | ||
Comment 4•3 years ago
|
||
Assignee | ||
Comment 5•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 8•3 years ago
|
||
Backed out 4 changesets (Bug 1737918) for causing bustages in ScrollTimeline.cpp CLOSED TREE
Log: https://treeherder.mozilla.org/logviewer?job_id=375215677&repo=autoland
Backout: https://hg.mozilla.org/integration/autoland/rev/3e1eab67510956a3406bcec71c351a2abfdbb286
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 10•3 years ago
|
||
Comment 11•3 years ago
|
||
Comment 12•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/dca5286a4b3e
https://hg.mozilla.org/mozilla-central/rev/8e76f0afc0d3
https://hg.mozilla.org/mozilla-central/rev/56b8686e4bb4
https://hg.mozilla.org/mozilla-central/rev/668a98c2c759
Comment 14•3 years ago
|
||
Removing dev-doc-needed keyword as per the comment here https://bugzilla.mozilla.org/show_bug.cgi?id=1733260#c2 it'll be easier to test & document once dependencies are done
Comment 15•2 years ago
|
||
Docs work for this can be tracked in https://github.com/mdn/content/issues/15467
@boris, I've started work on the scroll() documentation as we discussed.
When the scroller is set as nearest
the spec says:
Specifies to use the nearest ancestor scroll container. (Default.)".
Does this mean
- the nearest ancestor that could be a scroll container (i.e. any div say), or
- the nearest ancestor that has scrollbars on any axis.
- the nearest ancestor that has scrollbars in the specified axis?
I THINK it probably means "2", and that if you have no axis on the selected ancestor then no timeline is created. Can you confirm?
Assignee | ||
Comment 16•2 years ago
•
|
||
(In reply to Hamish Willee from comment #15)
When the scroller is set as
nearest
the spec says:Specifies to use the nearest ancestor scroll container. (Default.)".
Does this mean
- the nearest ancestor that could be a scroll container (i.e. any div say), or
- the nearest ancestor that has scrollbars on any axis.
- the nearest ancestor that has scrollbars in the specified axis?
I THINK it probably means "2", and that if you have no axis on the selected ancestor then no timeline is created. Can you confirm?
Yes. I think it's 2. Basically, if there is no scrollbars on the axis you specified (i.e. its scroll range is zero), we still create the ScrollTimline object but this timeline is inactive (i.e. its timeline time is unresolved):
https://github.com/w3c/csswg-drafts/issues/7401
(Note: Gecko doesn't update the implementation per this resolved spec issue (which means we still treat zero scroll range as 100%), so perhaps you could check Chrome for this case as well).
Besides, Gecko's implementation may have bug because we don't handle overflow:auto
properly here.
Gecko doesn't implement the WebIDL for ScrollTimeline, but Chrome does, so perhaps you can check the ScrollTimeline object in Chrome.
Comment 17•2 years ago
|
||
Thanks very much @Boris. Hope you're enjoying your holiday.
FYI I added a note about the spec violation in https://github.com/mdn/browser-compat-data/pull/18064 referring to the CSSWG issue. Is FF aiming to fix this ? If so, is there a bug number I can track for that?
FWIW while this is all behind a preference it is not such a big deal - if bugs are fixed before that preference goes it is as if they never existed from the perspective of the compatibility data.
I'll look at what Chrome does when one of the main browsers goes live without a preference.
Assignee | ||
Comment 18•2 years ago
|
||
(In reply to Hamish Willee from comment #17)
Thanks very much @Boris. Hope you're enjoying your holiday.
FYI I added a note about the spec violation in https://github.com/mdn/browser-compat-data/pull/18064 referring to the CSSWG issue.
Thanks
Is FF aiming to fix this ? If so, is there a bug number I can track for that?
Yes. Our bug is: https://bugzilla.mozilla.org/show_bug.cgi?id=1780865
I'll look at what Chrome does when one of the main browsers goes live without a preference.
Thanks. Chrome also implements all the features of scroll-linked animations behind the experimental flag.
Also, here is the Chromium issue for the new syntax: https://bugs.chromium.org/p/chromium/issues/detail?id=1317765
Description
•