Rework KeyframesStep and generate Gecko Keyframes to include timeline range name
Categories
(Core :: CSS Transitions and Animations, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox152 | --- | fixed |
People
(Reporter: boris, Assigned: boris)
References
()
Details
(Whiteboard: [scrollanimation:mvp])
Attachments
(5 files)
In KeyframesAnimation::from_keyframes(), we convert the Keyframe into KeyframesStep, and sort it. We also add the missing 0% and 100% if needed.
Also, in Servo_StyleSet_GetKeyframesForName(), we iterate the KeyframesStep in the reverse order. We may rewrite everywhere to make sure we could handle range names well before we start to resolve and use the range names in Bug 1824875.
| Assignee | ||
Updated•4 months ago
|
| Assignee | ||
Updated•4 months ago
|
| Assignee | ||
Updated•4 months ago
|
Updated•4 months ago
|
| Assignee | ||
Comment 1•4 months ago
•
|
||
After checking the implementation of WebKit and Chromium, I think we need to do the following things:
- Extend
KeyframesStepto include range names. - Move the generation of implicit keyframes (i.e. 0% and 100%) later. Perhaps in
GetKeyframes()andBuildProperties(), because we need to know which timeline type the animation uses, and we have to resolve the computed offsets before filling the implicit keyframes.- However, this has impact when we group the keyframes, so need to tweak it as well.
- Sort the keyframes in the computed order for
GetKeyframe()and in the used order forBuildProperties(). It's probably fine to sort it earlier inKeyframesAnimation::from_keyframes()for keyframes with percentage offset. - Check some edge cases when using
getKeyframes()for the document timeline (e.g. if there are only keyframes with range names). - Resolve the keyframe computed offset in Bug 1824875.
| Assignee | ||
Updated•3 months ago
|
Updated•3 months ago
|
| Assignee | ||
Comment 4•3 months ago
|
||
The spec doesn't change this section for TimelineRangeOffset when
computing the missing keyframe offsets, so we still follow
[web-animations-1]: distribute the keyframes from double offsets only.
Also, the distribution code doesn't have impact on CSS Animations because
we always generate keyframes with an offset, but the computation of
computedOffset for TimelineRangeOffset will be used for both CSS
Animations and Web Animations, so we still have to implement this now.
| Assignee | ||
Comment 5•3 months ago
|
||
Updated•3 months ago
|
Updated•3 months ago
|
| Assignee | ||
Comment 6•3 months ago
|
||
Keyframe::mComputedOffset could be negative or any real number larger
than 1.0, so we use NaN to represent its unresolved value.
Updated•3 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Comment 8•3 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/c85e91002fd7
https://hg.mozilla.org/mozilla-central/rev/b8a1e79fee9d
https://hg.mozilla.org/mozilla-central/rev/316f574e4ab9
https://hg.mozilla.org/mozilla-central/rev/e033b4740763
https://hg.mozilla.org/mozilla-central/rev/e7055180be08
Updated•3 months ago
|
Description
•