Open Bug 1182393 Opened 5 years ago Updated 5 years ago

Animation.playbackRate should return 0 even if setting -0

Categories

(Core :: DOM: Animation, defect)

defect
Not set

Tracking

()

People

(Reporter: hiro, Assigned: hiro)

References

Details

Attachments

(1 file)

Blink prevents it to compare new value to previous value.

https://chromium.googlesource.com/chromium/blink/+/master/Source/core/animation/Animation.cpp#658

void Animation::setPlaybackRate(double playbackRate)
{
    if (playbackRate == m_playbackRate)
        return;
I am not sure dom/animation/tests/mozilla is appropriate for test of this issue.
Assignee: nobody → hiikezoe
Attachment #8632588 - Flags: review?(bbirtles)
Comment on attachment 8632588 [details] [diff] [review]
prevent_minus_zero_playbackRate.patch

As discussed on IRC, this doesn't seem to be necessary. On my testing of Chrome canary on Windows, it does not normalize -0 to 0 and there's nothing in the spec requiring this so we should allow the author to set -0. I can't think of anything that will break by allowing this since -0 == 0.

Cancelling review request for now.
Attachment #8632588 - Flags: review?(bbirtles)
You need to log in before you can comment on or make changes to this bug.