Closed
Bug 1166164
Opened 10 years ago
Closed 10 years ago
Update the finishing behavior of Animation objects
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: birtles, Assigned: birtles)
References
Details
Attachments
(8 files, 1 obsolete file)
39 bytes,
text/x-review-board-request
|
jwatt
:
review+
smaug
:
review+
|
Details |
39 bytes,
text/x-review-board-request
|
jwatt
:
review+
smaug
:
review+
|
Details |
39 bytes,
text/x-review-board-request
|
jwatt
:
review+
smaug
:
review+
|
Details |
39 bytes,
text/x-review-board-request
|
jwatt
:
review+
smaug
:
review+
|
Details |
39 bytes,
text/x-review-board-request
|
jwatt
:
review+
smaug
:
review+
|
Details |
39 bytes,
text/x-review-board-request
|
jwatt
:
review+
smaug
:
review+
|
Details |
39 bytes,
text/x-review-board-request
|
jwatt
:
review+
smaug
:
review+
|
Details |
39 bytes,
text/x-review-board-request
|
jwatt
:
review+
smaug
:
review+
|
Details |
We recently resolved[1] to fix a number of inconsistencies in the way finishing behavior works for Animation objects.
In attempting to implement these changes I've discovered some other existing issues with the spec and our implementation.
[1] https://lists.w3.org/Archives/Public/public-fx/2015AprJun/0038.html
Assignee | ||
Comment 1•10 years ago
|
||
/r/8999 - Bug 1166164 part 1 - Make setting the current time complete a pending pause, not abort it
/r/9001 - Bug 1166164 part 2 - Make UpdateFinishedState take a non-defaulted enum
/r/9003 - Bug 1166164 part 3 - Resolve start time on finish()
/r/9005 - Bug 1166164 part 4 - Make finished promise not resolve when paused
/r/9007 - Bug 1166164 part 5 - Make play() throw when it should seek to the end of an infinite effect
/r/9009 - Bug 1166164 part 6 - Make pausing from idle set the current time
/r/9011 - Bug 1166164 part 7 - Call pause directly when creating an initially-paused animation
/r/9013 - Bug 1166164 part 8 - Drop a few references to players
Pull down these commits:
hg pull -r fadb9581d971d6693e59187f5474a4d6b36651a3 https://reviewboard-hg.mozilla.org/gecko/
Attachment #8607373 -
Flags: review?(jwatt)
Attachment #8607373 -
Flags: review?(bugs)
Comment 2•10 years ago
|
||
Could you explain why play() and pause() need [Throws]?
That is not in the spec, nor in that email to the mailing list.
Comment 3•10 years ago
|
||
https://reviewboard.mozilla.org/r/9001/#review7673
::: dom/animation/Animation.h:303
(Diff revision 1)
> + enum class SeekBehavior {
> + NoSeek,
> + DidSeek
To better match the spec text I'd suggest calling the enum "SeekFlag" and the values "Seek" and "NoSeek".
::: dom/animation/Animation.cpp:92
(Diff revision 1)
> - UpdateTiming();
> + UpdateTiming(SeekBehavior::NoSeek);
It would be useful to have a comment here explaining why this is not a seek, since initially one might think it effectively is.
Comment 4•10 years ago
|
||
https://reviewboard.mozilla.org/r/9005/#review7703
::: dom/animation/Animation.cpp
(Diff revision 1)
> -Animation::IsFinished() const
Yay!
Comment 5•10 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #2)
> Could you explain why play() and pause() need [Throws]?
> That is not in the spec, nor in that email to the mailing list.
Looks like part of the spec is out of date. The exception is mentioned in the prose that describes the algorithm for play() and pause() though. See the mention of InvalidStateError in these sections:
http://w3c.github.io/web-animations/#play-an-animation
http://w3c.github.io/web-animations/#pause-an-animation
Comment 6•10 years ago
|
||
Comment 7•10 years ago
|
||
Comment 8•10 years ago
|
||
Comment 9•10 years ago
|
||
Comment 10•10 years ago
|
||
Comment 11•10 years ago
|
||
Comment on attachment 8607373 [details]
MozReview Request: bz://1166164/birtles
r+ for the webidl (I assume that is what the request was about.)
Attachment #8607373 -
Flags: review?(bugs) → review+
Comment 12•10 years ago
|
||
https://reviewboard.mozilla.org/r/9009/#review7715
Ship It!
::: layout/style/nsAnimationManager.cpp:104
(Diff revision 1)
> + NS_WARNING("Unexpected exception pausing animation");
Can you expand on this message by tacking on " - silently failing" or something?
Comment 13•10 years ago
|
||
Comment 14•10 years ago
|
||
Updated•10 years ago
|
Attachment #8607373 -
Flags: review?(jwatt) → review+
Comment 15•10 years ago
|
||
Comment on attachment 8607373 [details]
MozReview Request: bz://1166164/birtles
https://reviewboard.mozilla.org/r/8997/#review7721
Ship It!
Assignee | ||
Comment 16•10 years ago
|
||
(In reply to Jonathan Watt [:jwatt] from comment #5)
> (In reply to Olli Pettay [:smaug] from comment #2)
> > Could you explain why play() and pause() need [Throws]?
> > That is not in the spec, nor in that email to the mailing list.
>
> Looks like part of the spec is out of date. The exception is mentioned in
> the prose that describes the algorithm for play() and pause() though. See
> the mention of InvalidStateError in these sections:
>
> http://w3c.github.io/web-animations/#play-an-animation
> http://w3c.github.io/web-animations/#pause-an-animation
Which part of the spec is out of date? It's mentioned in those two sections Jonathan pointed too. Where else does it need to be mentioned?
As far as I can tell, WebIDL doesn't have [Throws] extended attributes anymore, that's specific to our bindings.
Assignee | ||
Comment 17•10 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #11)
> Comment on attachment 8607373 [details]
> MozReview Request: bz://1166164/birtles
>
> r+ for the webidl (I assume that is what the request was about.)
Yes, sorry, I haven't worked out how to indicate that in reviewboard yet.
Comment 18•10 years ago
|
||
(In reply to Brian Birtles (:birtles) from comment #17)
>
> Yes, sorry, I haven't worked out how to indicate that in reviewboard yet.
me neither. I end up downloading the diffs and looking at them in an editor because that is how I like
to see the patches. (I don't like the diff-view) :)
Comment 19•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ae4b781ca3ca
https://hg.mozilla.org/integration/mozilla-inbound/rev/7788741c4c1b
https://hg.mozilla.org/integration/mozilla-inbound/rev/862ed7c76925
https://hg.mozilla.org/integration/mozilla-inbound/rev/68ac3fa4a647
https://hg.mozilla.org/integration/mozilla-inbound/rev/468f0935e2d3
https://hg.mozilla.org/integration/mozilla-inbound/rev/70c5890d9577
https://hg.mozilla.org/integration/mozilla-inbound/rev/98d7ad6eacbc
https://hg.mozilla.org/integration/mozilla-inbound/rev/cf2257257525
Assignee | ||
Comment 20•10 years ago
|
||
(In reply to Jonathan Watt [:jwatt] from comment #3)
> https://reviewboard.mozilla.org/r/9001/#review7673
>
> ::: dom/animation/Animation.h:303
> (Diff revision 1)
> > + enum class SeekBehavior {
> > + NoSeek,
> > + DidSeek
>
> To better match the spec text I'd suggest calling the enum "SeekFlag" and
> the values "Seek" and "NoSeek".
I renamed the enum to SeekFlag as suggested but I left the values as NoSeek and DidSeek since the spec refers to the "did seek" flag and it's only set when a seek happened in the past. I'm happy to push a follow-up patch to change this if you still think it's odd.
> ::: dom/animation/Animation.cpp:92
> (Diff revision 1)
> > - UpdateTiming();
> > + UpdateTiming(SeekBehavior::NoSeek);
>
> It would be useful to have a comment here explaining why this is not a seek,
> since initially one might think it effectively is.
Sorry, I overlooked this comment. (Reviewboard makes it really hard to find the bit of code a comment is associated with but I believe this is referring to SetStartTime.) I'm not sure exactly what's surprising here; I guess setting the start time feels like seeking?
Comment 21•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/ae4b781ca3ca
https://hg.mozilla.org/mozilla-central/rev/7788741c4c1b
https://hg.mozilla.org/mozilla-central/rev/862ed7c76925
https://hg.mozilla.org/mozilla-central/rev/68ac3fa4a647
https://hg.mozilla.org/mozilla-central/rev/468f0935e2d3
https://hg.mozilla.org/mozilla-central/rev/70c5890d9577
https://hg.mozilla.org/mozilla-central/rev/98d7ad6eacbc
https://hg.mozilla.org/mozilla-central/rev/cf2257257525
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Comment 22•10 years ago
|
||
(In reply to Brian Birtles (:birtles) from comment #20)
> I renamed the enum to SeekFlag as suggested but I left the values as NoSeek
> and DidSeek since the spec refers to the "did seek" flag and it's only set
> when a seek happened in the past. I'm happy to push a follow-up patch to
> change this if you still think it's odd.
That's fine. On a bit more reflection it's the "NoSeek" I have a bit of an issue with since it sounds imperative rather than informative about something that has already happened. Not a big deal though, and I don't have a suggestion other than DidNotSeek or something. Up to you whether you agree enough to write a follow-up.
> Sorry, I overlooked this comment. (Reviewboard makes it really hard to find
> the bit of code a comment is associated with but I believe this is referring
> to SetStartTime.) I'm not sure exactly what's surprising here; I guess
> setting the start time feels like seeking?
Yeah, Reviewboard is a bit annoying in that regard.
Assignee | ||
Comment 23•9 years ago
|
||
Attachment #8607373 -
Attachment is obsolete: true
Attachment #8620322 -
Flags: review+
Attachment #8620323 -
Flags: review+
Attachment #8620324 -
Flags: review+
Attachment #8620325 -
Flags: review+
Attachment #8620326 -
Flags: review+
Attachment #8620327 -
Flags: review+
Attachment #8620328 -
Flags: review+
Attachment #8620329 -
Flags: review+
Assignee | ||
Comment 24•9 years ago
|
||
Assignee | ||
Comment 25•9 years ago
|
||
Assignee | ||
Comment 26•9 years ago
|
||
Assignee | ||
Comment 27•9 years ago
|
||
Assignee | ||
Comment 28•9 years ago
|
||
Assignee | ||
Comment 29•9 years ago
|
||
Assignee | ||
Comment 30•9 years ago
|
||
Assignee | ||
Comment 31•9 years ago
|
||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•