Closed Bug 1297000 Opened 4 years ago Closed 3 years ago

Modify comparison of zero TimeDuration in animation.

Categories

(Core :: DOM: Animation, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: mantaroh, Assigned: yusuke20023)

Details

(Whiteboard: [good first bug])

Attachments

(1 file, 1 obsolete file)

Currently, We use the TimeDuration::ToMilliseconds() in animation's implementation. [1]
However we can specify zero to TimeDuration's constructor.[2][3]
So we should replace comparison of zero TimeDuraion in animation's implementation.
e.g:
 foo.ToMilliseconds() < 0.0   to  foo < TimeDuration(0)

[1] https://dxr.mozilla.org/mozilla-central/search?q=ToMilliseconds+path%3Adom%2Fanimation%2FAnimation.cpp&redirect=true
[2] https://dxr.mozilla.org/mozilla-central/rev/f97a056ae6235de7855fd8aaa04fb1c8d183bd06/mozglue/misc/TimeStamp.h#69
[3] https://dxr.mozilla.org/mozilla-central/source/dom/animation/Animation.cpp#386
Summary: Modify comparison of zero TimeDuration. → Modify comparison of zero TimeDuration in animation.
Assignee: nobody → yusuke20023
Attached patch bug1297000.patch (obsolete) — Splinter Review
Attachment #8785539 - Flags: review?(bbirtles)
Attached patch bug1297000.patchSplinter Review
Attachment #8785539 - Attachment is obsolete: true
Attachment #8785539 - Flags: review?(bbirtles)
Attachment #8785541 - Flags: review?(bbirtles)
Comment on attachment 8785541 [details] [diff] [review]
bug1297000.patch

Review of attachment 8785541 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Thanks!
Attachment #8785541 - Flags: review?(bbirtles) → review+
Pushed by bbirtles@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1e2503f29f53
Modify comparison of zero TimeDuration to use TimeDuration object rather than converting to milliseconds; r=birtles
https://hg.mozilla.org/mozilla-central/rev/1e2503f29f53
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.