Closed Bug 1074054 Opened 10 years ago Closed 10 years ago

Make getAnimationPlayers return players that are filling forwards

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: birtles, Assigned: birtles)

Details

Attachments

(2 files)

Web Animations now says the getAnimationPlayers also returns animations that are filling forwards:

  http://w3c.github.io/web-animations/#dom-animatable-getanimationplayers
This patch adds a utility method to return if an animation is "in effect" or not
as defined by Web Animations:

  http://w3c.github.io/web-animations/#in-effect

It also moves the utility method for querying if an animation is "current"
(IsCurrent) to the .cpp file since it is fairly long. (Bug 1046055 makes one of
the callers of IsCurrent inline-able which should offset any cost introduced by
this no longer being inline-able.)
Attachment #8497281 - Flags: review?(dbaron)
This patch makes Element::GetAnimationPlayers return not only current animations
but also animations that have finished but are filling forwards. This brings the
implementation into line with recent changes to the Web Animations spec and
allows querying all the animations that are currently affecting an element or
which are scheduled to do so in the future.
Attachment #8497282 - Flags: review?(dbaron)
Comment on attachment 8497281 [details] [diff] [review]
part 1 - Add Animation::IsInEffect

I don't understand the bits in the spec about what to do if there's a parent animation group.  (They don't make much sense to me.)  I presume we don't implement that concept yet?

r=dbaron if that's the case
Attachment #8497281 - Flags: review?(dbaron) → review+
Comment on attachment 8497282 [details] [diff] [review]
part 2 - Make Element::GetAnimationPlayers return in-effect animations too

I presume you checked that the test fails without the patch?

r=dbaron if so
Attachment #8497282 - Flags: review?(dbaron) → review+
(In reply to David Baron [:dbaron] (UTC-7) (needinfo? for questions) from comment #4)
> Comment on attachment 8497281 [details] [diff] [review]
> part 1 - Add Animation::IsInEffect
> 
> I don't understand the bits in the spec about what to do if there's a parent
> animation group.  (They don't make much sense to me.)  I presume we don't
> implement that concept yet?

Yes, that's correct. Animation groups are much further down the track and will possibly be split into a later version of the spec.

(In reply to David Baron [:dbaron] (UTC-7) (needinfo? for questions) from comment #5)
> Comment on attachment 8497282 [details] [diff] [review]
> part 2 - Make Element::GetAnimationPlayers return in-effect animations too
> 
> I presume you checked that the test fails without the patch?

Yes.
https://hg.mozilla.org/mozilla-central/rev/3a4ecfff302a
https://hg.mozilla.org/mozilla-central/rev/35e518128ca3
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Depends on: 1083079
No longer depends on: 1083079
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: