Use CSSNumberish for Animation.currentTime
Categories
(Core :: DOM: Animation, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox153 | --- | fixed |
People
(Reporter: boris, Assigned: jwatt)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [scrollanimation:mvp])
Attachments
(1 file)
This is similar with Bug 2017448. However, we would like to update Animation.currentTime here:
[Exposed=Window]
partial interface Animation {
...
attribute CSSNumberish? currentTime;
...
};
Also, when we are setting the currentTime, we have to apply the algorithm of validating a CSSNumberish time.
Besides, we have to update AnimationPlaybackEvent.currentTime and AnimationPlaybackEventInit.currentTime (spec, webidl).
| Reporter | ||
Updated•3 months ago
|
| Reporter | ||
Updated•3 months ago
|
Updated•3 months ago
|
| Assignee | ||
Updated•28 days ago
|
Updated•28 days ago
|
| Assignee | ||
Comment 1•28 days ago
|
||
I'm looking at bug 2017448 first.
| Assignee | ||
Updated•15 days ago
|
| Assignee | ||
Comment 2•14 days ago
|
||
The behavior is gated on NIGHTLY_BUILD + layout.css.typed-om.enabled so
release builds continue to return a plain double.
For the setter:
- Progress timeline: CSSUnitValue must be convertible to
percent;
plain double is rejected. - Monotonic timeline: CSSUnitValue must be convertible to number,
ms, or s.
The ConvertTimeToCSSNumberish and ConvertCSSNumberishToTime helpers on
Animation will allow the logic to be reused in bug 2017448 for the
related Animation.startTime.
Also threads the CSSNumberish currentTime through AnimationPlaybackEvent
(and its init dictionary) by snapshotting an isPercent flag at
queue time and reconstructing the CSSUnitValue at dispatch time in
AnimationEventDispatcher.
https://hg.mozilla.org/mozilla-central/rev/a1139aa0d7ba
https://hg.mozilla.org/mozilla-central/rev/e50916bf7d87
Description
•