Closed
Bug 1207951
Opened 9 years ago
Closed 9 years ago
When Animation::ComposeStyle updates the compose time, it should not call UpdateTiming
Categories
(Core :: DOM: Animation, defect)
Core
DOM: Animation
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: birtles, Assigned: birtles)
References
Details
Attachments
(1 file, 1 obsolete file)
2.28 KB,
patch
|
heycam
:
review+
|
Details | Diff | Splinter Review |
This call seems astray: https://dxr.mozilla.org/mozilla-central/rev/abe43c30d78d7546ed7c622c5cf62d265709cdfd/dom/animation/Animation.cpp#647 It was added way back here: https://hg.mozilla.org/mozilla-central/rev/6df80592242c in bug 1109390. I can't understand, however, why we call UpdateSourceContent (now UpdateEffect) when we update the time, but UpdateTiming afterwards. Furthermore, it seems like we call UpdateTiming *before* restoring the hold time. Basically, this code makes no sense and I can't find any explanation in the bug of why it is doing this way. I think we should replace the call to UpdateTiming with one to UpdateEffect and move it outside the scoped block (i.e. after the dtor for the AutoRestore object has run).
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → bbirtles
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f69ebe1cb3c1
Assignee | ||
Comment 3•9 years ago
|
||
We should also get rid of the redundant call to PlayState()
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8665833 -
Flags: review?(cam)
Assignee | ||
Updated•9 years ago
|
Attachment #8665301 -
Attachment is obsolete: true
Comment 5•9 years ago
|
||
Comment on attachment 8665833 [details] [diff] [review] Fix buggy logic in ComposeStyle Review of attachment 8665833 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/animation/Animation.cpp @@ -620,5 @@ > { > AutoRestore<Nullable<TimeDuration>> restoreHoldTime(mHoldTime); > - bool updatedHoldTime = false; > - > - AnimationPlayState playState = PlayState(); Can we turn on -Wshadow for dom/animation/? @@ +649,2 @@ > > + mFinishedAtLastComposeStyle = (playState == AnimationPlayState::Finished); Is there anything in the temporarily-change-hold-time block that could cause the play state to change, such that it would make sense to assert just before this line that playState == PlayState()?
Attachment #8665833 -
Flags: review?(cam) → review+
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Cameron McCormack (:heycam) (away Oct 2) from comment #5) > ::: dom/animation/Animation.cpp > @@ -620,5 @@ > > { > > AutoRestore<Nullable<TimeDuration>> restoreHoldTime(mHoldTime); > > - bool updatedHoldTime = false; > > - > > - AnimationPlayState playState = PlayState(); > > Can we turn on -Wshadow for dom/animation/? I filed bug 1207951 for this. > @@ +649,2 @@ > > > > + mFinishedAtLastComposeStyle = (playState == AnimationPlayState::Finished); > > Is there anything in the temporarily-change-hold-time block that could cause > the play state to change, such that it would make sense to assert just > before this line that playState == PlayState()? I've added that assertion now.
Assignee | ||
Comment 7•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7ca1f983de00
Comment 9•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/005e98e2c5c9
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•