Open Bug 2075002 Opened 2 months ago Updated 2 months ago

Unexpected AnimationEvent.elapsedTime if the delay is negative infinite

Categories

(Core :: CSS Transitions and Animations, defect)

defect

Tracking

()

People

(Reporter: boris, Unassigned)

References

()

Details

Attachments

(1 file, 1 obsolete file)

Attached file testcase (obsolete) —

If the animation-delay is negative infinite, e.g. animation-delay: calc(-infinite * 1s), our ComputedTiming::mActiveTime may be an overflow value per this: result.mActiveTime = localTime - aTiming.Delay();.
No matter what value of localTime, TimeDuration doesn't handle inf properly so we may get a very small negative value of mActiveTime because it overflows.

Also, we use this mActiveTime as the elapsed time to queue the cancel event, and so the result of AnimationEvent.elapsedTime API looks incorrect (and different from other browsers).

Google Chrome returns 0 and Safari returns Infinity. All browser have different results. Gecko returns the very weird negative value because of the overflow. I think we should avoid the overflow at least, even if the spec doesn't define this edge case.

Attachment #9647649 - Attachment is obsolete: true
Attached file testcase —
See Also: → 2054343
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: