Граф коммитов

464 Коммитов

Автор SHA1 Сообщение Дата
Brian Birtles 4561c8eda3 Bug 1181392 part 2 - Remove use of IsFinishedTransition from Animation::ComposeStyle; r=dbaron
Animation::ComposeStyle uses IsFinishedTransition to skip doing work for
transitions that have run their course. We can, however, generalize this to
cover all animations that are not currently contributing to the animated
style--that is animations that are not "in effect".

We need to add this check *after* we update aNeedsRefreshes since an animation
that is not "in effect" because it has a delay and no backwards fill (in this
case it will have a play state of "running") still needs refreshes.
2015-08-07 12:29:35 +09:00
Brian Birtles 78f8287b7d Bug 1181392 part 1 - Remove use of IsFinishedTransition from Animation::CanThrottle; r=dbaron
Previously we used IsFinishedTransition so that if the only animations present
are finished transitions we could throttle the tick. In fact, this probably
shouldn't even be necessary since we shouldn't be calling CanThrottle if
AnimationCollection::mNeedsRefreshes is false. However, so long as we're
performing this test it turns out we can generalize this further and throttle
ticks for all finished animations that are not newly finished, regardless of
whether they are running on the compositor or not (although this method won't
be called unless the animation property could be run on the compositor anyway).

This method is somewhat confusing. For one, it is not strictly limited to
animations that are running on the compositor. It appears to only return true
when the animation is running on the compositor but the mIsRunningOnCompositor
flag doesn't get cleared when the animation finishes (bug 1151694). As a result
this method also deals with animations that are now running on the main thread.
This patch makes us deal with such animations more consistently.

This patch also reworks this method so that it's hopefully a little easier to
follow and a little more consistent since I spent several hours trying to
understand the different combinations of inputs this method could take and what
question it was trying to answer.
2015-08-07 12:29:35 +09:00
Brian Birtles 774abfc8fe Bug 1180125 part 2 - Move AnimationCommon classes out of CSS namespace; r=dbaron
The long-term plan is to drop the mozilla::css namespace altogether. Before we
go to much further with refactoring code in AnimationCommon, we should drop
usage of the mozilla::css namespace. Specifically, this patch moves the
CommonAnimationManager and AnimValuesStyleRule classes to the mozilla namespace.
2015-07-29 10:57:39 +09:00
Brian Birtles 0d79f0c537 Bug 1180125 part 1 - Queue and dispatch CSS animation events as a separate step; r=dbaron
This patch prepares the way for script-generated events by making
event dispatch a separate process that happens after sampling animations.
This will allow us to sample animations from their associated timeline
(removing the need for a further manager to tracker script-generated
animations).

Furthermore, once we sample animations from timelines the order in which they
are sampled is likely to be more or less random so by making event dispatch at
separate step, we have an opportunity to sort the events and dispatch in
a consistent and sensible order. It also ensures that event callbacks will
not be run until all animations (including transitions) have been updated
ensuring they see a consistent view of timing properties.

This patch only affects event handling for CSS animations. Transitions will
be dealt with in a subsequent patch.
2015-07-29 10:57:39 +09:00
Hiroyuki Ikezoe 5119cec74f Bug 1178664 - Part 4 -Implement Animation.oncancel event. r=bbirtles, r=smaug
--HG--
extra : rebase_source : 2885fc984f652ecd086b9ec4f9b57190375c965c
2015-07-30 23:26:00 +02:00
Hiroyuki Ikezoe 189c64b196 Bug 1178664 - Part 3 - Implement Animation.onfinish event. r=bbirtles, r=smaug
--HG--
extra : rebase_source : d78f3a6d58f26a46dfdd726f30590bc8a4e9137d
2015-07-30 23:25:00 +02:00
Hiroyuki Ikezoe d2e5ec96d8 Bug 1178664 - Part 1 - Make Animation interface EventTarget inheritance. r=smaug
--HG--
extra : rebase_source : e182dc4757a19ec4e55e4e3d9d7a893a190929cf
2015-07-30 23:23:00 +02:00
Hiroyuki Ikezoe 77aabfc80f Bug 1178665 - Part 3: Make finish notifications asynchronously in most cases. r=bbirtles, r=smaug 2015-07-29 23:21:00 +02:00
Hiroyuki Ikezoe 95ecbd9979 Bug 1178665 - Part 2 - Adapt to latest Animation.finish procedure changes. r=bbirtles
ee99cc4db5
2015-07-14 21:45:00 +02:00
Carsten "Tomcat" Book 61664e5c9a Backed out changeset 79bcd4f744c0 (bug 1180125) 2015-07-29 17:32:24 +02:00
Carsten "Tomcat" Book c86b8ab1b4 Backed out changeset a4fb4e4b1c8b (bug 1180125) 2015-07-29 17:32:19 +02:00
Brian Birtles 9b391b0177 Bug 1180125 part 2 - Move AnimationCommon classes out of CSS namespace; r=dbaron
The long-term plan is to drop the mozilla::css namespace altogether. Before we
go to much further with refactoring code in AnimationCommon, we should drop
usage of the mozilla::css namespace. Specifically, this patch moves the
CommonAnimationManager and AnimValuesStyleRule classes to the mozilla namespace.
2015-07-29 10:57:39 +09:00
Brian Birtles 880fd89013 Bug 1180125 part 1 - Queue and dispatch CSS animation events as a separate step; r=dbaron
This patch prepares the way for script-generated events by making
event dispatch a separate process that happens after sampling animations.
This will allow us to sample animations from their associated timeline
(removing the need for a further manager to tracker script-generated
animations).

Furthermore, once we sample animations from timelines the order in which they
are sampled is likely to be more or less random so by making event dispatch at
separate step, we have an opportunity to sort the events and dispatch in
a consistent and sensible order. It also ensures that event callbacks will
not be run until all animations (including transitions) have been updated
ensuring they see a consistent view of timing properties.

This patch only affects event handling for CSS animations. Transitions will
be dealt with in a subsequent patch.
2015-07-29 10:57:39 +09:00
Hiroyuki Ikezoe 3c7a785930 Bug 1186684 - Remove unused ErrorResult in Animation::SetPlaybackRate/SilentlySetPlaybackRate. r=bbirtles 2015-07-23 02:55:00 -04:00
Brian Birtles bc2fc9b22c Bug 1182981 part 2 - Use nsTHashtable::Iterator in AnimationTimeline; r=njn
--HG--
extra : commitid : AiFiSUN1lz0
2015-07-21 10:47:23 +09:00
Brian Birtles 21f9c85801 Bug 1182981 part 1 - Use nsTHashtable::Iterator in PendingAnimationTracker; r=njn
--HG--
extra : commitid : 5gJ232PxuKn
2015-07-21 10:47:13 +09:00
Brian Birtles b9bba5ced7 Bug 1168759 - Disable test_deferred_start.html on B2G debug emulator; r=ryanvm
--HG--
extra : commitid : KEeVnf78RFT
2015-07-21 10:47:02 +09:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Hiroyuki Ikezoe 2dbe94e81f Bug 1182931 - Expose assert_unreached in subwindows. r=bbirtles 2015-07-12 17:04:00 +02:00
Ehsan Akhgari 210879a004 Bug 1113086 follow-up: Add a forward declaration to fix build bustage 2015-07-10 20:49:32 -04:00
Carsten "Tomcat" Book 72634f3fbc Backed out changeset 91846db1056c (bug 1113086) 2015-07-11 14:13:36 +02:00
Ehsan Akhgari 3a8e01586f Bug 1113086 follow-up: Add a forward declaration to fix build bustage 2015-07-10 21:09:08 -04:00
Hiroyuki Ikezoe d097a2d673 Bug 1150808 - Implement Animation.reverse(). r=smaug r=birtles
--HG--
extra : rebase_source : 593ef5ed090d016260f6ca07008ff036effe7fd6
2015-07-09 22:54:00 +02:00
Hiroyuki Ikezoe 56a826cd0a Bug 1181905 - Animation::IsPlaying should check playbackRate != 0 to stop playing on compositor animation. r=bbirtles 2015-07-09 20:54:00 +02:00
Brian Birtles 94eb7765f0 Bug 1150810 part 16 - Add tests for AnimationTimeline.getAnimations(); r=jwatt
--HG--
extra : commitid : 1yoDYMuUdQr
extra : rebase_source : 8afb92e3c65b819951249f491c026fe24b761315
2015-06-15 11:05:43 +09:00
Brian Birtles 918f55389f Bug 1150810 part 15 - Add a comment about need to store more than just relevant animations; r=jwatt
We'll likely address this as part of bug 1151731 when we sample animations from
their timeline.

--HG--
extra : commitid : 9g00bBtDIue
extra : rebase_source : 12d9de2524eb3133bef5a5bcf4c84d4759ccbbca
2015-06-15 11:05:43 +09:00
Brian Birtles 0c7ff86e21 Bug 1150810 part 14 - Don't return animations targetting pseudo-elements; r=jwatt
--HG--
extra : commitid : 6C1duOkCm8p
extra : rebase_source : f9de21040b31b3e782cf32c34f372dce673cbc7f
2015-06-15 11:05:43 +09:00
Brian Birtles 94b9aa43ad Bug 1150810 part 13 - Sort the result of AnimationTimeline::GetAnimations; r=jwatt
--HG--
extra : commitid : GIotO0kmYd4
extra : rebase_source : 8e3455474b1738f83d9213ae71de5378ce11d571
2015-06-15 11:05:43 +09:00
Brian Birtles 9c37212704 Bug 1150810 part 12 - Flush styles in AnimationTimeline::GetAnimations(); r=jwatt
--HG--
extra : commitid : D6bak0hxV05
extra : rebase_source : 7fb7f1fe9d00b46a4bbc32881886f9e23b2cf3d0
2015-06-15 11:05:43 +09:00
Brian Birtles 0983c8cc10 Bug 1150810 part 11 - Add some assertions to AnimationTimeline::GetAnimations; r=jwatt
--HG--
extra : commitid : 6HV2S292DtE
extra : rebase_source : 02cf7f8b0fddb3a859e1d854caf6611c1485e5d9
2015-06-15 11:05:43 +09:00
Brian Birtles 6434e79a4b Bug 1150810 part 10 - Add AnimationTimeline::GetAnimations; r=jwatt; r=smaug
This patch also removes the (commented-out) play() method from the
AnimationTimeline.webidl since it has been removed from the spec.

--HG--
extra : commitid : 20j8RFhPyP9
extra : rebase_source : 9eb5376f3ad9f4a4a0a214bdbe5593f682316d5b
2015-06-15 11:05:43 +09:00
Brian Birtles e725d9bdb4 Bug 1150810 part 9 - Add relevant animations to timeline; r=jwatt
We only store relevant animations on the timeline. Relevant animations are
any animations that are running or yet to run ("current animations") or
which have finished but are still applying a fill mode ("in effect animations").

AnimationTimeline.getAnimations() only ever returns relevant animations so
this is the minimum set we need to keep track of. Keeping track of any more
than this would prevent us from garbage-collecting any no longer relevant
animations since we keep a strong reference to this animations.

The reason we keep a strong reference is that if an animation is attached to
a timeline, even if there are no references to it from script or markup it
needs to be kept alive in order to dispatch events or resolve promises. An
irrelevant animation however is not going to do either of these things without
outside intervention so we don't need to keep it alive.

--HG--
extra : commitid : WLEUccOqAk
extra : rebase_source : 5c3c987d6c95ca7072c6178349dc113d2f1e5053
2015-06-15 11:05:43 +09:00
Brian Birtles 6bb747268e Bug 1150810 part 8 - Add AnimationTimeline::AddAnimations/RemoveAnimations; r=jwatt
--HG--
extra : commitid : 2zvcGrXcqJR
extra : rebase_source : 791f417a3688cbdd9bd4c9cd24c46551b0d775f5
2015-04-28 16:41:09 +09:00
Brian Birtles 5550db670f Bug 1150810 part 7 - Add Animation::SetTimeline; r=jwatt
--HG--
extra : commitid : 3QENfb2DzCC
extra : rebase_source : 4928061558e689ae40d0976b9dd13e480279c2d1
2015-04-28 17:21:58 +09:00
Brian Birtles 37506d5652 Bug 1150810 part 6 - Rename Timeline() to GetTimeline(); r=smaug
This is in anticipation of adding Animation::SetTimeline(). Once we set the
timeline out of band, there's a chance that getting it could return null so
this patch makes the WebIDL and method name reflect that.

--HG--
extra : commitid : FSiwvrGRV1v
extra : rebase_source : 4c4004f58bbfd340642277b0a0b547a7de692dac
2015-04-28 16:25:07 +09:00
Brian Birtles 4159c4a595 Bug 1150810 part 5 - Handle Timeline() returning null; r=jwatt
--HG--
extra : commitid : K6pABHL7QRC
extra : rebase_source : ba96781d897d28db1d2db83f73ce8c31b89638cd
2015-04-28 12:49:12 +09:00
Brian Birtles 6d3dd1a595 Bug 1150810 part 4 - Store global on Animation; r=smaug, jwatt
The connection between an Animation and an AnimationTimeline is optional. That
is, it is possible to have an Animation without an AnimationTimeline. Until now
we have often just assumed the timeline will be set but eventually we need to
support the possibility of the timeline being null. Indeed, later in this patch
series we will set the timeline out-of-band (i.e. not in the constructor) using
SetTimeline which opens up the possibility that timeline will be null for
a period of time.

This patch paves the way for having an optional timeline by storing the global
used for, e.g. creating promises, on the Animation object itself.

--HG--
extra : commitid : Ew9Zp4t36lV
extra : rebase_source : 16c9de9525a3562ff10e41fdf1602384a4e366e3
2015-04-28 15:48:35 +09:00
Brian Birtles 05e324909f Bug 1150810 part 3 - Make IsPossiblyOrphanedPendingAnimation return true when there is no rendered doc; r=jwatt
This appears to be an existing bug.

--HG--
extra : commitid : J01Q6OEDc4a
extra : rebase_source : 7909db0844890e151a0e440a030cf95a6d00a1f9
2015-04-28 15:47:45 +09:00
Brian Birtles cd770f1b4b Bug 1150810 part 2 - Replace references to DocumentTimeline with AnimationTimeline; r=jwatt
This is needed not only for supporting other kinds of timelines, but also for
when we come to implement SetTimeline(AnimationTimeline* aTimeline).

--HG--
extra : commitid : B836jCSbgNL
extra : rebase_source : 2592e66b2a9009f85ec0189ebecf5dba3c9bf8e0
2015-04-28 11:29:13 +09:00
Brian Birtles 1926b13212 Bug 1150810 part 1 - Move DocumentTimeline methods up to AnimationTimeline; r=jwatt
This is not strictly necessary yet but we will want to implement methods
like GetAnimations() on the base class, AnimationTimeline, so we may as well do
that now rather than adding that code to DocumentTimeline and moving it later.

--HG--
extra : commitid : 7GU6Dr9lnPO
extra : rebase_source : d5e788874c72c422b57efbdb81404c79df6d505b
2015-04-28 11:17:10 +09:00
Brian Birtles 6fbabd8dad Bug 1171817 part 14 - Add AnimationPtrComparator class; r=dbaron
Having created composite ordering methods for the different kinds of animations
this patch adds a Comparator class so that they can be used to sort an
array of such animations.

This patch uses this Comparator object to sort the results returned by
Element.getAnimations. For this case, the order in which we create animations
and transitions happens to almost perfectly correspond with the composite
ordering defined so that no sorting is necessary.

One exception is that some -moz-* transitions may be created after transitions
that they should sort before when sorting by transition property. In this
case the sorting added in this patch should ensure they are returned in the
correct sequence.

Unfortunately, we can't easily test this since the test files we have are
intended to be cross-browser (where -moz-* properties won't be supported).

Once we implement AnimationTimeline.getAnimations (bug 1150810) we'll have
a better opportunity to test this sorting. For now, the added tests in this
patch just serve as a regression test that the sorting hasn't upset the
already correct order (and an interop test in future once we move them to
web-platform-tests).

--HG--
extra : commitid : KkfoSE69B0F
extra : rebase_source : ee4e47f44281504eb4d35e0f6cc3392ee0cffb94
2015-06-09 11:13:54 +09:00
Brian Birtles 4ac9e57a4f Bug 1171817 part 9 - Add override of HasLowerCompositeOrderThan for CSS animations; r=dbaron
This patch also extends the tests for Element.getAnimations(). It doesn't
actually exercise the code added (it's not actually called yet since it doesn't
need to be for Element.getAnimations) but simply provides a useful regression
and interop test.

--HG--
extra : commitid : KWpAsc2Aj54
extra : rebase_source : abe26dc3d79a50239c62dd156dc0a0aa29c11d52
2015-06-09 11:13:54 +09:00
Brian Birtles 855752164f Bug 1171817 part 8 - Override sequence numbers for CSS animations; r=dbaron
This patch re-uses Animation::mSequenceNum to store the index of CSS animations
within their corresponding animation-name property. When the animation is
removed from an animation-name property it reverts to using the default
animation composite order.

This patch also updates Animation::DoCancel to call UpdateTiming instead of
UpdateEffect. This is because UpdateTiming is responsible for updating the
sequence number (when custom composite order is not in effect). When we remove
an animation from animation-name it will be cancelled and at that point we
expect its sequence number to be cleared which will only happen if
UpdateTiming gets called.

--HG--
extra : commitid : 2KrTezItH3q
extra : rebase_source : 50de87465deef85558ca50de5e6286f7b5603051
2015-06-09 11:13:54 +09:00
Brian Birtles 9836323890 Bug 1171817 part 7 - Add Animation::IsUsingCustomCompositeOrder; r=dbaron
Add a virtual method we can use to determine when an animation is having its
sequence number set by some other mechanism than the general logic
defined for animations.

This allows CSS animations and transitions to re-use the sequence number for
their own purposes. Typically what will happen is something like this:

1. A CSSAnimation is created corresponding to an item in the animation-name
   property.

   At this point CSSAnimation::IsUsingCustomCompositeOrder() will return true
   and nsAnimationManager will set the sequence number based on the position of
   the animation in animation-name.

2. If at a later point the animation is removed from the animation-name but kept
   alive by script, CSSAnimation::CancelFromStyle will be called which will
   clear the custom sequence number (i.e. set it to kUnsequenced) and also
   update the CSSAnimation's state such as
   CSSAnimation::IsUsingCustomCompositeOrder() returns false.

3. Then, then the CSSAnimation next transitions out of the idle state it will
   have its sequence number set just like any other Animation and be ordered
   like any other Animation (since we can no longer use animation-name to
   determine its composite order).

This behavior is added in subsequent patches in this series (and likewise for
CSS transitions too).

--HG--
extra : commitid : B8nPFXzQMfF
extra : rebase_source : 42439fb1dd32a789e270dc0c51af2c660f4593eb
2015-06-09 11:13:54 +09:00
Brian Birtles ddc1552c4a Bug 1171817 part 6 - Add Animation::HasLowerCompositeOrderThan; r=dbaron
This patch introduces a method that will be used for sorting animations based on
their composite order. The method is based on the API for Comparator objects (as
used by nsTArray and co.) which have a LessThan method. (For the
Comparator::Equals method we can used pointer equality since no two independent
objects should have equal composite order.)

--HG--
extra : commitid : 88oD4UFx5to
extra : rebase_source : 1b30272451c189161a08efac3da48d72e10d8e52
2015-06-09 11:13:53 +09:00
Brian Birtles f4bdb4f46c Bug 1171817 part 5 - Add a sequence number member to Animations; r=dbaron
Web Animations defines Animations as having a globally unique sequence number
for the purpose of prioritization:

  http://w3c.github.io/web-animations/#animation-sequence-number

As of the writing of this patch, the spec says the sequence number is updated
when the Animation is created. This is problematic and I have proposed that
actually this should be updated from each transition from idle:

  https://lists.w3.org/Archives/Public/public-fx/2015AprJun/0054.html

This doesn't seem to have met any opposition so I will update the spec to
reflect this soon.

This patch implements the behavior of updating the sequence number on each
transition from idle.

To make sure we perform this on each change to timing this patch removes
a couple of instances of early returns to ensure that UpdateTiming is called.

The current maximum sequence number is simply a class static and we make no
attempt to deal with wraparound. This is because we only update this number when
an animation transitions from idle which only happens when an animation is
created or script calls cancel() followed by play() on the animation. Supposing
that across all content this happenned an unlikely 1 billion times a second we
still wouldn't exhaust the range of the unsigned 64-bit int for about 585 years.

We'd like to make kUnsequenced be zero and make the static represent the
current maximum. This would probably be easier to understand and recognize in
a debugger. However, later in this patch series we will make CSS animations and
CSS transitions override this sequencing behavior. If we define kUnsequenced
to be zero and they accidentally assign zero as an actual sequence number then
they'll run into trouble. To avoid that we set kUnsequenced to UINT64_MAX.

--HG--
extra : commitid : DMw8uKjg4Hz
extra : rebase_source : 9e98b3346f0297efce3ecfa0b2dd8a9c13075dca
2015-06-09 11:13:53 +09:00
Brian Birtles 2378ae7083 Bug 1171817 part 4 - Add const version of AsCSSAnimation/AsCSSTransition methods; r=dbaron
These will be needed for sorting animations and transitions in a const-correct
fashion.

--HG--
extra : commitid : BhuFfkAvse7
extra : rebase_source : a97039f06b9f257ccb9b6aa206653d6b5d5d43d4
2015-06-09 11:13:53 +09:00
Brian Birtles 916a2b1a0e Bug 1171817 part 2 - Add CSSAnimation::GetOwningElement; r=dbaron
In order to sort CSS animation objects correctly, we need to know which
element's animation-name property they appear in, if any. Normally that's
simply the target element of the animation's keyframe effect but it can differ
in the following cases:

1) When script modifies a CSSAnimation's effect to target a different element
   (or simply removes the effect altogether). In this case we use the
   *owning* element to determine the priority of the animation, not the target
   element.

   This scenario does not yet occur (bug 1049975).

2) When script creates a CSSAnimation object using the CSSAnimation constructor.
   In this case, the owning element should be empty (null) and we should
   determine the priority of the animation in the same way as any other
   Animation object.

   Again, this is not yet supported (or even specced) but will be eventually.

3) When script holds a reference to a CSSAnimation object but then updates the
   animation-name property such that the animation object is cancelled. In this
   case the owning element should be cleared (null) so we know to not to try and
   sort this with regard to any animation-name property.

   This is possible using code such as the following:

     elem.style.animation = 'a 5s';
     var a = elem.getAnimations()[0];
     elem.style.animation = 'b 5s';
     a.play(); // Bring a back to life
     document.timeline.getAnimations();
     // ^ At this point we need to know how to sort 'a' and 'b' which depends
     // on recognizing that a is no longer part of an animation-name list.

Until we implement bug 1049975, we could support sorting animations without
adding the reference to the owning element by setting a flag on the CSSAnimation
object but (having tried this) it turns out to be cleaner to just introduce this
reference now, particularly since we know we will need it later.

Note that we will also need this information in future to dispatch events to the
correct element in circumstances such as (1) once we separate updating timing
information (including events) from applying animation values.

--HG--
extra : commitid : 8o9bf6l7kj7
extra : rebase_source : 391a4e8769cc96584ebd625d4b1d0e873373fd41
2015-06-09 11:13:53 +09:00
Brian Birtles e1ae8c1a56 Bug 1171817 part 1 - Cancel animations when destroying the property holding them; r=dbaron
Prior to this patch we cancel animations in AnimationCollection::Destroy but
this is not called automatically when the property holding the collection is
destroyed via its destructor. When an element is unbound from the tree we
destroy its animation properties but don't call AnimationCollection::Destroy.
This means, that in such circumstances:

* We won't create animation mutation records for the removed animations
* Once we start registering animations with a timeline they won't have a
  chance to remove themselves from the timeline (meaning
  document.timeline.getAnimations()) will keep returning them
* Once we go to implement the animationcancel and transitioncancel events we
  won't fire them in this case (assuming we implement the queueing/dispatch of
  those events as part of the cancel code)

This patch addresses this by moving the call to cancel each animations to the
property destructor for the animation properties.

We do this first so we can land this change separately to ease bisecting any
regressions it might trigger.

--HG--
extra : commitid : KzukSO91RMH
extra : rebase_source : 54ed2aeb69d8bceca424c70c7f33d4bf92d54546
2015-06-09 11:13:53 +09:00
Brian Birtles 3c2d6db2da Bug 1179111 part 5 - Remove Name() methods; r=jwatt
--HG--
extra : source : 22cafa2fd162a3cbe9af7fd13a92fd82cd3a2315
2015-07-01 15:19:04 +09:00
Brian Birtles f6547354f0 Bug 1179111 part 2 - Implement CSSTransition.transitionProperty; r=smaug, r=jwatt
--HG--
rename : dom/animation/test/css-transitions/file_effect-name.html => dom/animation/test/css-transitions/file_csstransition-transitionproperty.html
rename : dom/animation/test/css-transitions/test_effect-name.html => dom/animation/test/css-transitions/test_csstransition-transitionproperty.html
extra : source : 4eb184faf92c77013d5f8ce8968cff837910b6cf
2015-07-01 12:27:48 +09:00
Brian Birtles 6d8dd99dd0 Bug 1179111 part 1 - Implement CSSAnimation.animationName; r=smaug, r=jwatt
--HG--
rename : dom/animation/test/css-animations/file_effect-name.html => dom/animation/test/css-animations/file_cssanimation-animationname.html
rename : dom/animation/test/css-animations/test_effect-name.html => dom/animation/test/css-animations/test_cssanimation-animationname.html
extra : source : 144276fd40a14a560991baa2f5e7c45ce0e25042
2015-07-01 12:15:42 +09:00
Brian Birtles dd122c2a3d Bug 1178186 part 2 - Add tests for CSSAnimation and CSSTransition interfaces; r=jwatt
--HG--
extra : source : 1027311cd1bb6889104339dd87116036beb3421f
2015-06-30 10:00:56 +09:00
Brian Birtles cc59f02cc9 Bug 1178186 part 1 - Add CSSAnimation and CSSTransition interfaces; r=smaug
--HG--
extra : source : 1e1ccffd51b824fb6b229def4ddb7cb1d8889bb6
2015-06-30 10:00:39 +09:00
Carsten "Tomcat" Book 0a19d00b4f Backed out changeset 1e1ccffd51b8 (bug 1178186) for suspicion of causing bc2 test failures on OSX browser_bug427559.js 2015-07-07 14:22:33 +02:00
Carsten "Tomcat" Book d89c01824a Backed out changeset 1027311cd1bb (bug 1178186) 2015-07-07 14:21:49 +02:00
Carsten "Tomcat" Book e059e2e009 Backed out changeset 144276fd40a1 (bug 1179111)
--HG--
rename : dom/animation/test/css-animations/file_cssanimation-animationname.html => dom/animation/test/css-animations/file_effect-name.html
rename : dom/animation/test/css-animations/test_cssanimation-animationname.html => dom/animation/test/css-animations/test_effect-name.html
2015-07-07 14:21:46 +02:00
Carsten "Tomcat" Book e24e15fa2a Backed out changeset 4eb184faf92c (bug 1179111)
--HG--
rename : dom/animation/test/css-transitions/file_csstransition-transitionproperty.html => dom/animation/test/css-transitions/file_effect-name.html
rename : dom/animation/test/css-transitions/test_csstransition-transitionproperty.html => dom/animation/test/css-transitions/test_effect-name.html
2015-07-07 14:21:42 +02:00
Carsten "Tomcat" Book 297c2b6a58 Backed out changeset 22cafa2fd162 (bug 1179111) 2015-07-07 14:21:33 +02:00
Jonathan Watt 71682687a8 Bug 1127380 - Tests for Animation.playbackRate. r=bbirtles
--HG--
extra : rebase_source : 8a5ea3ebadf92b202450c5090bc83dfb70c80b4c
2015-07-06 22:11:00 +02:00
Brian Birtles cd06229252 Bug 1179111 part 5 - Remove Name() methods; r=jwatt
--HG--
extra : commitid : JT0oaGODGja
extra : rebase_source : e0ff11f1f482599e5e2b7b0eac6cfbb71fd0e34b
2015-07-01 15:19:04 +09:00
Brian Birtles 9785afa349 Bug 1179111 part 2 - Implement CSSTransition.transitionProperty; r=smaug, r=jwatt
--HG--
rename : dom/animation/test/css-transitions/file_effect-name.html => dom/animation/test/css-transitions/file_csstransition-transitionproperty.html
rename : dom/animation/test/css-transitions/test_effect-name.html => dom/animation/test/css-transitions/test_csstransition-transitionproperty.html
extra : commitid : KNo4iwHLjhE
extra : rebase_source : 822b3be05ae47e34812d2df5e5ece11aa87d66a8
2015-07-01 12:27:48 +09:00
Brian Birtles 32835b13f5 Bug 1179111 part 1 - Implement CSSAnimation.animationName; r=smaug, r=jwatt
--HG--
rename : dom/animation/test/css-animations/file_effect-name.html => dom/animation/test/css-animations/file_cssanimation-animationname.html
rename : dom/animation/test/css-animations/test_effect-name.html => dom/animation/test/css-animations/test_cssanimation-animationname.html
extra : commitid : 76TxEcxKHRn
extra : rebase_source : d9a582b36112a18854cd291915329a6325754056
2015-07-01 12:15:42 +09:00
Brian Birtles 0aa6deec0b Bug 1178186 part 2 - Add tests for CSSAnimation and CSSTransition interfaces; r=jwatt
--HG--
extra : commitid : HPBvU8HtFyk
extra : rebase_source : 438b23a4009675d000aaa9ff74334ad5d341831a
2015-06-30 10:00:56 +09:00
Brian Birtles e298fe6b44 Bug 1178186 part 1 - Add CSSAnimation and CSSTransition interfaces; r=smaug
--HG--
extra : commitid : K0U17zTMtAz
extra : rebase_source : e3b2dc3c503144763efe41ef71b9dc3793b3172f
2015-06-30 10:00:39 +09:00
Carsten "Tomcat" Book 15f7f98688 Backed out changeset 04420ed3c036 (bug 1127380) for test failures in test_animation-playbackrate.html
--HG--
extra : rebase_source : 45857c89e13300e619084dfac4dd16d73e9984e9
2015-07-06 15:40:14 +02:00
Jonathan Watt c2b0b02204 Bug 1127380 - Tests for Animation.playbackRate. r=hiro
--HG--
extra : rebase_source : d7f039a8a7166fabe9da87beb35b07cfb0fc7d4c
2015-07-06 00:22:00 +02:00
Brian Birtles 4a42d8ea1f Bug 1166164 part 8 - Drop a few references to players; r=jwatt
--HG--
extra : rebase_source : 70886cf54de0f76080d49f82c57f5795a6a87e28
extra : histedit_source : 6fcf7c7f44929bf5bd1c163c5cf83a1112d573dc
2015-05-19 15:37:39 +09:00
Brian Birtles e293c228f5 Bug 1166164 part 6 - Make pausing from idle set the current time; r=jwatt, r=smaug
As proposed:

  https://lists.w3.org/Archives/Public/public-fx/2015AprJun/0013.html (item g)

And agreed upon here:

  https://lists.w3.org/Archives/Public/public-fx/2015AprJun/0031.html

--HG--
extra : rebase_source : baca2fa6b9ba94afb1bb3e072e33729774a34f19
extra : histedit_source : 8348f3e8029017dbe380e30dbfc2f66b201beaf0
2015-05-19 14:55:26 +09:00
Brian Birtles f73f30be29 Bug 1166164 part 5 - Make play() throw when it should seek to the end of an infinite effect; r=jwatt, r=smaug
--HG--
extra : rebase_source : dade110e0d071727ed5bfdb694415ae7980f4467
extra : histedit_source : 1d87ee7db7fd0ec9670fff546e4654fa07bf4f31
2015-05-19 14:00:48 +09:00
Brian Birtles 6198ebeea8 Bug 1166164 part 4 - Make finished promise not resolve when paused; r=jwatt
As resolved, https://lists.w3.org/Archives/Public/public-fx/2015AprJun/0038.html
item 2.

--HG--
extra : rebase_source : 9f321446c9cd9ac4dcdefa4ca441ac8f3e76fc8f
2015-05-19 08:51:13 +09:00
Brian Birtles 152d424f77 Bug 1166164 part 3 - Resolve start time on finish(); r=jwatt
We have already resolved to make calling Finish() clear the pause state (see
https://lists.w3.org/Archives/Public/public-fx/2015AprJun/0038.html, item 2).
Doing that involves resolving the start time when the animation is paused.

Furthermore, as a separate change, we resolved to make the finished promise not
resolve when the animation is paused. That suggests making UpdateFinishedState()
only resolve the finished promise when PlayState() == Finished rather than using
IsFinished() which returns true even if the animation is paused.

However, if we compare PlayState() == Finished in UpdateFinishedState() then we
will *not* resolve the finished promise when the animation is play-pending since
PlayState() == Pending in that case (pause-pending is ok since the call to
SetCurrentTime will cause a transition to the Paused state). Furthermore, the
existing call to cancel the pending play task will effectively leave this
animation forever pending. Hence, in this patch we unconditionally fill in the
start time.

--HG--
extra : rebase_source : 499ad0530eac0ee62c8ed2df41360c45abc34816
2015-05-19 10:08:46 +09:00
Brian Birtles f28d7941d9 Bug 1166164 part 2 - Make UpdateFinishedState take a non-defaulted enum; r=jwatt
This is much easier to read at call sites and prevents accidentally using the
default value when another value might be more suitable.

--HG--
extra : rebase_source : b1c05d8bf7b97744e53f2ecc676561f3a4a80888
2015-05-11 17:17:06 +09:00
Brian Birtles cd4f9730c1 Bug 1166164 part 1 - Make setting the current time complete a pending pause, not abort it; r=jwatt
The point of making pausing async is to allow time to sync up the current time
with the compositor. Setting the current time manually should simply force it to
the specified time and complete the pause action, not abort it. (We do a similar
thing for a pending play. For a pending play we're waiting to establish
a suitable start time. Manually setting the start time in that case simply
forces the start time to the specified time and completes the play operation.)

--HG--
extra : rebase_source : 614ed9ef01204e4137783c0d48e975eb8febbe2a
2015-05-18 11:41:19 +09:00
Brian Birtles 87aaa8fc5f Bug 1164330 - Rename time fraction to (iteration) progress; r=jwatt
--HG--
extra : rebase_source : ca36d4d5dab2d08d42c7daa1e6778cda1408f465
2015-05-13 13:57:35 +09:00
Brian Birtles 3947001236 Bug 1161320 - Fix conflict between finishing and aborting a pause; r=jwatt
Animation::ResumeAt contains an assertion that, when we exit the play-pending
state, checks we either have a resolved start time or a resolved hold time.

That's normally true but if we are aborting a pause on animation that is
finished we can end up with a resolved start time (since we don't clear the
start time when we're aborting a pause) and a resolved hold time (either
because the regular finishing behavior set one, or, because play() applied
auto-rewinding behavior and set it).

In that case we should actually respect the hold time and update the start time
when resuming the animation. However, ResumeAt won't update the start time if it
is already set.

This patch fixes that by clearing the start time in DoPlay in the case where we
are aborting a pause and have a hold time.

--HG--
extra : rebase_source : 83f980d6cbc34375274f30f6527992b4fec7f639
2015-05-08 16:17:13 +09:00
Andrew McCreight 023db96fd8 Bug 1152551, part 3 - Fix more mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Andrew McCreight 9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Boris Zbarsky ca0723ea4a Bug 1159743. Stop forcing the dom.animations-api.core.enabled preference on in the test harness. r=birtles
--HG--
rename : dom/animation/test/css-animations/test_animation-cancel.html => dom/animation/test/css-animations/file_animation-cancel.html
rename : dom/animation/test/css-animations/test_animation-currenttime.html => dom/animation/test/css-animations/file_animation-currenttime.html
rename : dom/animation/test/css-animations/test_animation-finish.html => dom/animation/test/css-animations/file_animation-finish.html
rename : dom/animation/test/css-animations/test_animation-finished.html => dom/animation/test/css-animations/file_animation-finished.html
rename : dom/animation/test/css-animations/test_animation-pausing.html => dom/animation/test/css-animations/file_animation-pausing.html
rename : dom/animation/test/css-animations/test_animation-playstate.html => dom/animation/test/css-animations/file_animation-playstate.html
rename : dom/animation/test/css-animations/test_animation-ready.html => dom/animation/test/css-animations/file_animation-ready.html
rename : dom/animation/test/css-animations/test_animation-starttime.html => dom/animation/test/css-animations/file_animation-starttime.html
rename : dom/animation/test/css-animations/test_animations-dynamic-changes.html => dom/animation/test/css-animations/file_animations-dynamic-changes.html
rename : dom/animation/test/css-animations/test_effect-name.html => dom/animation/test/css-animations/file_effect-name.html
rename : dom/animation/test/css-animations/test_effect-target.html => dom/animation/test/css-animations/file_effect-target.html
rename : dom/animation/test/css-animations/test_element-get-animations.html => dom/animation/test/css-animations/file_element-get-animations.html
rename : dom/animation/test/css-transitions/test_animation-cancel.html => dom/animation/test/css-transitions/file_animation-cancel.html
rename : dom/animation/test/css-transitions/test_animation-currenttime.html => dom/animation/test/css-transitions/file_animation-currenttime.html
rename : dom/animation/test/css-transitions/test_animation-finished.html => dom/animation/test/css-transitions/file_animation-finished.html
rename : dom/animation/test/css-transitions/test_animation-pausing.html => dom/animation/test/css-transitions/file_animation-pausing.html
rename : dom/animation/test/css-transitions/test_animation-ready.html => dom/animation/test/css-transitions/file_animation-ready.html
rename : dom/animation/test/css-transitions/test_animation-starttime.html => dom/animation/test/css-transitions/file_animation-starttime.html
rename : dom/animation/test/css-transitions/test_effect-name.html => dom/animation/test/css-transitions/file_effect-name.html
rename : dom/animation/test/css-transitions/test_effect-target.html => dom/animation/test/css-transitions/file_effect-target.html
rename : dom/animation/test/css-transitions/test_element-get-animations.html => dom/animation/test/css-transitions/file_element-get-animations.html
rename : dom/animation/test/document-timeline/test_document-timeline.html => dom/animation/test/document-timeline/file_document-timeline.html
rename : dom/animation/test/mozilla/test_deferred_start.html => dom/animation/test/mozilla/file_deferred_start.html
rename : layout/style/test/test_animations_pausing.html => layout/style/test/file_animations_pausing.html
2015-04-30 14:25:03 -04:00
Wes Kocher fa3603804d Backed out changeset 4d85a02e9c28 (bug 1159743) under suspicion of breaking animation tests CLOSED TREE 2015-04-30 15:25:58 -07:00
Boris Zbarsky 5844aafa2d Bug 1159743. Stop forcing the dom.animations-api.core.enabled preference on in the test harness. r=birtles
--HG--
rename : dom/animation/test/css-animations/test_animation-cancel.html => dom/animation/test/css-animations/file_animation-cancel.html
rename : dom/animation/test/css-animations/test_animation-currenttime.html => dom/animation/test/css-animations/file_animation-currenttime.html
rename : dom/animation/test/css-animations/test_animation-finish.html => dom/animation/test/css-animations/file_animation-finish.html
rename : dom/animation/test/css-animations/test_animation-finished.html => dom/animation/test/css-animations/file_animation-finished.html
rename : dom/animation/test/css-animations/test_animation-pausing.html => dom/animation/test/css-animations/file_animation-pausing.html
rename : dom/animation/test/css-animations/test_animation-playstate.html => dom/animation/test/css-animations/file_animation-playstate.html
rename : dom/animation/test/css-animations/test_animation-ready.html => dom/animation/test/css-animations/file_animation-ready.html
rename : dom/animation/test/css-animations/test_animation-starttime.html => dom/animation/test/css-animations/file_animation-starttime.html
rename : dom/animation/test/css-animations/test_animations-dynamic-changes.html => dom/animation/test/css-animations/file_animations-dynamic-changes.html
rename : dom/animation/test/css-animations/test_effect-name.html => dom/animation/test/css-animations/file_effect-name.html
rename : dom/animation/test/css-animations/test_effect-target.html => dom/animation/test/css-animations/file_effect-target.html
rename : dom/animation/test/css-animations/test_element-get-animations.html => dom/animation/test/css-animations/file_element-get-animations.html
rename : dom/animation/test/css-transitions/test_animation-cancel.html => dom/animation/test/css-transitions/file_animation-cancel.html
rename : dom/animation/test/css-transitions/test_animation-currenttime.html => dom/animation/test/css-transitions/file_animation-currenttime.html
rename : dom/animation/test/css-transitions/test_animation-finished.html => dom/animation/test/css-transitions/file_animation-finished.html
rename : dom/animation/test/css-transitions/test_animation-pausing.html => dom/animation/test/css-transitions/file_animation-pausing.html
rename : dom/animation/test/css-transitions/test_animation-ready.html => dom/animation/test/css-transitions/file_animation-ready.html
rename : dom/animation/test/css-transitions/test_animation-starttime.html => dom/animation/test/css-transitions/file_animation-starttime.html
rename : dom/animation/test/css-transitions/test_effect-name.html => dom/animation/test/css-transitions/file_effect-name.html
rename : dom/animation/test/css-transitions/test_effect-target.html => dom/animation/test/css-transitions/file_effect-target.html
rename : dom/animation/test/css-transitions/test_element-get-animations.html => dom/animation/test/css-transitions/file_element-get-animations.html
rename : dom/animation/test/document-timeline/test_document-timeline.html => dom/animation/test/document-timeline/file_document-timeline.html
rename : dom/animation/test/mozilla/test_deferred_start.html => dom/animation/test/mozilla/file_deferred_start.html
rename : layout/style/test/test_animations_pausing.html => layout/style/test/file_animations_pausing.html
2015-04-30 14:25:03 -04:00
Brian Birtles a606228cd8 Bug 1159082 - Rename *Readonly animation interfaces to *ReadOnly. r=smaug 2015-04-30 09:06:43 -04:00
Carsten "Tomcat" Book b05d97c166 Backed out changeset 1b5fc672f0d4 (bug 1159082) for B2G ICS Emulator opt R6 test failures on a CLOSED TREE
--HG--
rename : dom/animation/AnimationEffectReadOnly.cpp => dom/animation/AnimationEffectReadonly.cpp
rename : dom/animation/AnimationEffectReadOnly.h => dom/animation/AnimationEffectReadonly.h
rename : dom/webidl/AnimationEffectReadOnly.webidl => dom/webidl/AnimationEffectReadonly.webidl
2015-04-30 13:15:04 +02:00
Brian Birtles 4fb166f6b2 Bug 1159082 - Rename *Readonly animation interfaces to *ReadOnly; r=smaug
--HG--
rename : dom/animation/AnimationEffectReadonly.cpp => dom/animation/AnimationEffectReadOnly.cpp
rename : dom/animation/AnimationEffectReadonly.h => dom/animation/AnimationEffectReadOnly.h
rename : dom/webidl/AnimationEffectReadonly.webidl => dom/webidl/AnimationEffectReadOnly.webidl
extra : rebase_source : 5fb31684bf494a57e208d0cfbbc76f65b502fc0e
2015-04-28 10:16:45 +09:00
Brian Birtles 063783952d Bug 1157989 part 4 - Make method comment style consistent; r=jwatt 2015-04-27 10:05:47 +09:00
Brian Birtles 8625e1337a Bug 1157989 part 3 - Make LimitBehavior enum a scoped enum; r=jwatt 2015-04-27 10:05:47 +09:00
Brian Birtles fb3e1108d4 Bug 1157989 part 2 - Make Silently* methods protected; r=jwatt
These methods aren't part of the public API.
2015-04-27 10:05:46 +09:00
Brian Birtles 9104378d5d Bug 1157989 part 1 - Line up methods in dom/animation/Animation with the API; r=jwatt 2015-04-27 10:05:46 +09:00
Brian Birtles 219be8ace6 Bug 1157111 - Remove comment from SilentlySetCurrentTime; r=jwatt
The commented-out step has now been removed from the spec:

  34c2bc9272
2015-04-27 08:53:19 +09:00
Brian Birtles e2c7d46cdc Bug 1150807 part 5 - Tests for Animation.cancel(); r=jwatt 2015-04-27 08:53:19 +09:00
Brian Birtles 012ebba32c Bug 1150807 part 3 - Call PostUpdate from Cancel; r=jwatt
This patch makes Cancel() call PostUpdate which clobbers certain state in style
so that animated style is correctly flushed when an animation is cancelled.

The main difficulty with this is that we *don't* want to call this when we're
cancelling an animation as a result of a style update or else we'll trigger
needless work. The pattern elsewhere has been to define a *FromStyle() method
for this case (e.g. CSSAnimation::PlayFromStyle, PauseFromStyle). This isn't
ideal because there's always the danger we will forget to call the appropriate
*FromStyle method. It is, however, consistent. Hopefully in bug 1151731 we'll
find a better way of expressing this.
2015-04-27 08:53:19 +09:00
Brian Birtles b34276b816 Bug 1150807 part 2 - Expose Animation::Cancel in WebIDL; r=smaug 2015-04-27 08:53:18 +09:00
Brian Birtles a4696386d6 Bug 1150807 part 1 - Fix SilentlySetCurrentTime to not set the start time when it is unresolved; r=jwatt
The reasoning for this change is described here:

  https://lists.w3.org/Archives/Public/public-fx/2015AprJun/0027.html

Furthermore, subsequent tests introduced in this bug for the animation playState
depend on this change.
2015-04-27 08:53:18 +09:00
Jonathan Watt 9b67d4237d Bug 1157074 - Fix Web Animations' Web Platform tests to make them use step_func when they should. r=birtles 2015-04-20 14:22:29 +01:00
Jonathan Watt 71628632b1 Bug 1157053 - Test restarting of finished transitions. r=birtles 2015-04-17 13:45:20 +01:00
Jonathan Watt b50aebf2a7 Bug 1150064, part 2 - Add Web Platform tests for the Animation.finish() method. r=birtles 2015-04-16 17:16:01 +01:00
Jonathan Watt 7646a6a26c Bug 1150064, part 1 - Implement the Animation.finish() method. r=birtles, r=smaug 2015-04-16 17:15:20 +01:00
Jonathan Watt 31e4e5bba1 Bug 1157086 - Fix order of test listing in dom/animation/test/mochitest.ini. r=birtles 2015-04-15 11:17:57 +01:00
Jonathan Watt 70590b52f4 Bug 1150054, part 2 - Convert the Web Animations tests to use the new EventWatcher constructor from upstream. r=Ms2ger
--HG--
extra : rebase_source : 2ba088b32444753ebf1e34b7ccd9c6b22b13b780
2015-04-14 20:54:10 +01:00
Brian Birtles 974f89ccdd Bug 1154615 part 9 - Rename test files; r=jwatt
--HG--
rename : dom/animation/test/css-animations/test_animation-player-currenttime.html => dom/animation/test/css-animations/test_animation-currenttime.html
rename : dom/animation/test/css-animations/test_animation-player-finished.html => dom/animation/test/css-animations/test_animation-finished.html
rename : dom/animation/test/css-animations/test_animation-player-playstate.html => dom/animation/test/css-animations/test_animation-playstate.html
rename : dom/animation/test/css-animations/test_animation-player-ready.html => dom/animation/test/css-animations/test_animation-ready.html
rename : dom/animation/test/css-animations/test_animation-player-starttime.html => dom/animation/test/css-animations/test_animation-starttime.html
rename : dom/animation/test/css-animations/test_element-get-animation-players.html => dom/animation/test/css-animations/test_element-get-animations.html
rename : dom/animation/test/css-transitions/test_animation-player-currenttime.html => dom/animation/test/css-transitions/test_animation-currenttime.html
rename : dom/animation/test/css-transitions/test_animation-player-ready.html => dom/animation/test/css-transitions/test_animation-ready.html
rename : dom/animation/test/css-transitions/test_animation-player-starttime.html => dom/animation/test/css-transitions/test_animation-starttime.html
rename : dom/animation/test/css-transitions/test_element-get-animation-players.html => dom/animation/test/css-transitions/test_element-get-animations.html
2015-04-21 10:22:10 +09:00
Brian Birtles 2cfdd7ac06 Bug 1154615 part 7 - Rename CSSAnimationPlayer and CSSTransitionPlayer; r=jwatt 2015-04-21 10:22:10 +09:00
Brian Birtles 13834006d7 Bug 1154615 part 6 - Rename references to players within layout/; r=jwatt
We will rename CSSAnimationPlayer/CSSTransitionPlayer in a separate patch
2015-04-21 10:22:10 +09:00
Brian Birtles 8f5fbac8a9 Bug 1154615 part 5 - Rename AnimationPlayerCollection to AnimationCollection; r=jwatt 2015-04-21 10:22:10 +09:00
Brian Birtles bd4c87f07a Bug 1154615 part 4 - Rename references to players in dom/animation; r=jwatt
This patch does not, however,  update references to
AnimationPlayerCollection/CSSTransitionPlayer etc. which we will fix when we get
to layout/style.
2015-04-21 10:22:09 +09:00
Brian Birtles a691fc0c34 Bug 1154615 part 3 - Rename internal members of PendingAnimationTracker; r=jwatt 2015-04-21 10:22:09 +09:00
Brian Birtles 4f7bf25c27 Bug 1154615 part 2 - Rename PendingPlayerTracker to PendingAnimationTracker; r=jwatt
This patch also updates the method names on PendingAnimationTracker but leaves
a number of local variables which will be fixed in a subsequent patch.

--HG--
rename : dom/animation/PendingPlayerTracker.cpp => dom/animation/PendingAnimationTracker.cpp
rename : dom/animation/PendingPlayerTracker.h => dom/animation/PendingAnimationTracker.h
2015-04-21 10:22:09 +09:00
Brian Birtles 5c7929fd2a Bug 1154615 part 1 - Rename AnimationPlayer to Animation in WebIDL; r=smaug
This patch is a fairly minimal rename of the AnimationPlayer interface. It
leaves a bunch of local variables and helper classes still using the word
"player". These will be addressed in subsequent patches that don't require DOM
peer review.

--HG--
rename : dom/animation/AnimationPlayer.cpp => dom/animation/Animation.cpp
rename : dom/animation/AnimationPlayer.h => dom/animation/Animation.h
rename : dom/webidl/AnimationPlayer.webidl => dom/webidl/Animation.webidl
2015-04-21 10:22:09 +09:00
Jonathan Watt 10b49eebc0 Bug 1149990 - Support replaying of finished CSS transitions by supporting setting of currentTime/startTime. r=birtles 2015-04-06 23:48:55 +01:00
L. David Baron e53c8996ad Bug 1150351 - Reënable test_deferred_start.html on Linux, since the bug for which we disabled it has disappeared. 2015-04-17 09:13:13 -07:00
L. David Baron f6f9831d21 Bug 980770 - Enable off-main-thread animations on Linux (and other X11 based platforms), for nightly/aurora. r=birtles 2015-04-16 18:13:15 -07:00
Brian Birtles 7d31acbd42 Bug 1153734 part 5 - Add AnimationEffectReadonly as a superinterface of KeyframeEffectReadonly; r=smaug
This patch also replaces some tabs with spaces in KeyframeEffect.h because I was
in the area.
2015-04-15 08:48:21 +09:00
Brian Birtles 6120d1a6c4 Bug 1153734 part 4 - Rename other uses of 'source' and 'source content'; r=jwatt
This patch also tightens up a one or two references to 'target effect' replacing
them with just 'effect'. This is because 'target effect' is longer and easily
confused with 'target element'. 'effect' should be sufficient. 'target element'
is a term from the Web Animations specification and in that context, simply
referring to the 'effect' would sound a little odd.
2015-04-15 08:48:21 +09:00
Brian Birtles 2d26fd38cb Bug 1153734 part 3 - Rename AnimationPlayer.source to AnimationPlayer.effect; r=smaug
There are still some other references to "source" in AnimationPlayer such as
HasInPlayerSource and UpdateSourceContent. These are renamed in a subsequent
patch (that doesn't require DOM peer review).
2015-04-15 08:48:21 +09:00
Brian Birtles 63e2382338 Bug 1153734 part 2 - Rename Animation to KeyframeEffectReadonly; r=smaug
We define KeyframeEffectReadonly in KeyframeEffect.cpp since Web Animations also
defines KeyframeEffect and when we come to implement that I expect we'll define
it in the same class, maybe even using the same object.

This patch also adds a few missing includes in places where
KeyframeEffectReadonly is used so that we're not just cargo-culting it in.

--HG--
rename : dom/animation/Animation.cpp => dom/animation/KeyframeEffect.cpp
rename : dom/animation/Animation.h => dom/animation/KeyframeEffect.h
rename : dom/animation/test/css-animations/test_animation-name.html => dom/animation/test/css-animations/test_effect-name.html
rename : dom/animation/test/css-animations/test_animation-target.html => dom/animation/test/css-animations/test_effect-target.html
rename : dom/animation/test/css-transitions/test_animation-name.html => dom/animation/test/css-transitions/test_effect-name.html
rename : dom/animation/test/css-transitions/test_animation-target.html => dom/animation/test/css-transitions/test_effect-target.html
rename : dom/webidl/Animation.webidl => dom/webidl/KeyframeEffect.webidl
2015-04-15 08:48:21 +09:00
Brian Birtles d5b5205359 Bug 1153734 part 1 - Remove AnimationEffect; r=smaug
Most of this is fairly obvious. However, the addition of 'override' to
ElementPropertyTransition::Name() is not strictly necessary. It was simply added
because while making these changes I accidentally dropped the 'virtual' keyword
from the method in the superclass and the compiler didn't complain. Adding this
will hopefully make it harder to create the same bug in the future.

--HG--
rename : dom/animation/test/css-animations/test_animation-effect-name.html => dom/animation/test/css-animations/test_animation-name.html
rename : dom/animation/test/css-transitions/test_animation-effect-name.html => dom/animation/test/css-transitions/test_animation-name.html
2015-04-15 08:48:20 +09:00
Brian Birtles 121b831ff7 Bug 1122414 part 2 - Return the transitionProperty from Animation.name for CSS transitions; r=jwatt
This is a bit awkward. We lazily set mName to the transition property and then
return it. The reasons for this approach are:

* We don't really want to eagerly fill in mName for all transitions since in
  99% of cases we'll never use it and this will lead to wasted allocations.

* The signature of Name() returns a const nsString reference. This is because
  Name() is used when building CSS Animations (to compare different copies of
  the same animation when updating). For that case we don't really want to
  generate unnecessary copies of nsString objects so we return a reference.
  However, that means for transitions as well we need to return a reference so
  we can't just generate a temporary string on-demand.

  As a result we also have to const-cast ourselves so we can update the mName
  member. We could make mName mutable but seeing as it's only set once, the
  const_cast seems more appropriate.
2015-04-14 09:13:27 +09:00
Brian Birtles 9838a4dd51 Bug 1134381 - Don't pause an AnimationPlayer if it is already paused; r=jwatt 2015-04-14 09:07:41 +09:00
Brian Birtles 6b5fcefb36 Bug 1152171 part 2 - Rename AnimationTimeline to DocumentTimeline; r=smaug
And then re-add AnimationTimeline as an abstract super-interface of
DocumentTimeline.

--HG--
rename : dom/animation/AnimationTimeline.cpp => dom/animation/DocumentTimeline.cpp
rename : dom/animation/AnimationTimeline.h => dom/animation/DocumentTimeline.h
rename : dom/animation/test/animation-timeline/test_animation-timeline.html => dom/animation/test/document-timeline/test_document-timeline.html
rename : dom/animation/test/animation-timeline/test_request_animation_frame.html => dom/animation/test/document-timeline/test_request_animation_frame.html
2015-04-10 10:34:22 +09:00
Brian Birtles 41ae9d94b3 Bug 1152171 part 1 - Remove AnimationTimeline IDL tests from dom/animation/tests; r=Ms2ger
The tests in dom/animation/tests/ use an old version of idlharness.js that
doesn't support inherited interfaces. As discussed in bug 1152619 we're not
looking at updating these old tests (under dom/imptests) at the moment which
means we won't be able to update the IDL tests in dom/animation/tests/ to
continue passing once we introduce DocumentTimeline as a subinterface of
AnimationTimeline.

As a result, this patch simply the removes the IDL tests for this interface from
dom/animation/tests. However, we have a test for this interface in
web-platform-tests where I've set up a pull request to apply the required
renaming so we should eventually get test coverage for this renaming.

  https://github.com/w3c/web-platform-tests/pull/1748

In the long run, all the tests in dom/animation/tests should end up in
web-platform-tests. The main reason they aren't there yet is that most of them
test the mapping between the Web Animations API and CSS and there's currently no
spec defining that so there's no place to put them in the web-platform-tests
repository.

There are a few tests for animation timeline which could be landed in
web-platform-tests (and then removed from dom/animation/tests) but we need to
discuss with Google if this is the desired behavior or not first. For the time
being I have a branch setup for that and I'm leaving the tests in
dom/animation/tests so we continue to test what *we* think the behavior should
be in the meantime. That branch is here:

  https://github.com/birtles/web-platform-tests/compare/rename-animation-timeline...birtles:add-hidden-iframe-tests
2015-04-10 10:25:51 +09:00
Markus Stange ab28a4f0c8 Bug 1151346 - Make ActiveLayerTracker::IsOffsetOrMarginStyleAnimated respect CSS animations. r=roc
--HG--
extra : rebase_source : a3594dcb2d8733b6f545c6cf713178ea0d953889
2015-04-05 22:53:51 -04:00
L. David Baron 0e99a69e5c Back out changesets 6ea87def95b9 and 288ad0365a5e (bug 980770, enable OMT animations) for frequently-intermittent Mac talos glterrain crashes, on a CLOSED TREE. 2015-04-01 22:35:47 -07:00
L. David Baron 930b93fdd5 Bug 980770 followup - Disable test_deferred_start on Linux mochitest-e10s (probably because bug 1149391 also landed today). 2015-04-01 22:02:15 -07:00
Cameron McCormack 573008d81b Bug 1145912 - Wait for animations to start before continuing in subtests that assume they are running. r=birtles 2015-04-02 14:56:14 +11:00
Brian Birtles f09556d158 Bug 1149906 - Consider play-pending animations to be playing as well r=dbaron 2015-04-01 17:22:02 +09:00
L. David Baron 953d3f8dfc Bug 1150288 - Restore old behavior of mIsPreviousStateFinished into a new variable, since we need it in CanThrottle. r=birtles
(I don't understand the motivation for the changes to how it was set,
but this just switches to having two variables for the two uses.)

This fixes the test failures in test_animations_omta.html with OMT
animations enabled.
2015-04-01 20:30:17 -07:00
Jonathan Watt 3b2af93056 Bug 1149832 - Replace the Web Animations test helper waitForTwoAnimationFrames() with a helper that takes a frame count. r=birtles
--HG--
extra : rebase_source : 53fc4046b34b6cd961b26d0f1c20ede63f5d9d19
2015-03-31 23:27:19 +01:00
Jonathan Watt e5a139e3a8 Bug 1147491, part 1 - Fix playbackRate crash due to integer rounding causing divide-by-zero. r=dholbert 2015-03-30 16:27:05 +01:00
Jonathan Watt 51f8723d56 Bug 1072037, part 3 - Tests for the effect of setting CSS transition's AnimationPlayer.currentTime. r=birtles 2015-03-25 10:21:28 +00:00
Brian Birtles 9e4a6fc06a Bug 1109390 part 28 - Add tests for the AnimationPlayer.startTime when pausing asynchronously; r=jwatt 2015-04-01 12:23:25 +09:00
Brian Birtles 955a3c9adb Bug 1109390 part 27 - Add further test to test_animations-pausing.html for cancelling a pause by setting the current time; r=jwatt 2015-04-01 12:23:25 +09:00
Brian Birtles 51d5cba7a7 Bug 1109390 part 26 - Add further tests for ready promise when pausing; r=jwatt 2015-04-01 12:23:25 +09:00
Brian Birtles 41859f41f2 Bug 1109390 part 25 - Make pausing asynchronous
This patch (finally) puts pausing animations in the pending player map so that
they are resolved asynchronously.

Since this changes the pausing behavior this patch updates a number of tests so
that they continue to pass.
2015-04-01 12:23:25 +09:00
Brian Birtles 7fb9e8ef27 Bug 1109390 part 24 - Use wallclock time when refreshing the style of animations that need to be synchronized with the compositor; r=jwatt 2015-04-01 12:23:25 +09:00
Brian Birtles 1060d42f7b Bug 1109390 part 23 - Add aborted pause behavior; r=jwatt
When a pending pause operation is interrupted by a play operation we should
preserve the original start time of the animation so that it appears to continue
moving uninterrupted. At the same time, however, for consistency with other
calls to play(), the operation should complete asynchronously.
2015-04-01 12:23:25 +09:00
Brian Birtles b5c52f836b Bug 1109390 part 22 - Add AnimationPlayer::PauseAt to complete a pending pause; r=jwatt
This patch adds the method that is called when an asynchronous pause operation
has completed. It is not used yet, however, since we don't yet put
AnimationPlayer objects in the pause-pending map.
2015-04-01 12:23:24 +09:00
Jonathan Watt a51e9dd772 Bug 1145246, part 7 - Add more CSS animation tests to check currentTime clamping. r=birtles 2015-03-23 13:23:19 +00:00
Jonathan Watt 61b57f8fc6 Bug 1145246, part 6 - Remove disabled code from AnimationPlayer::ComposeStyle. r=birtles 2015-03-23 13:23:10 +00:00
Cameron McCormack 3dbfa201e2 Bug 1145912 - Add some logging to help determine why this test intermittently fails; no review. 2015-04-01 10:08:35 +11:00
L. David Baron 1fe6a61ae9 Bug 847287 patch 12 - Check mWinsInCascade for all callers of GetAnimationOfProperty/HasAnimationOfProperty. r=birtles
This patch (after stepping through the call graph) affects the following
places:
 * CommonAnimationManager::GetAnimationsForCompositor, which is used
   only by nsDisplayListBuilder::AddAnimationsAndTransitionsToLayer,
   which already checks the individual animations (so really no change)
 * AnimationPlayerCollection::CanThrottleAnimation
 * ActiveLayerTracker::IsStyleAnimated
 * nsLayoutUtils::HasAnimationsForCompositor
 * nsLayoutUtils::HasAnimations (which is used only to check whether we
   can make the 0-opacity optimization)
I believe it makes sense to change all of these locations (although in
the long term we want to throttle (or similar) more animations).

Without this patch, I believe we're forcing the creation of an opacity
layer because we think we have animations to send to it.
2015-03-31 15:05:55 -07:00
L. David Baron a7bdf3d859 Bug 847287 patch 6 - Set mWinsInCascade for CSS Animations. r=birtles
This is the main patch for the bug; it makes us use the mechanism added
in bug 1125455 to avoid sending animations that aren't currently
applying to the compositor.

Patch 7 is needed to make this code rerun in all the cases where we need
to rerun it, though.
2015-03-31 15:05:54 -07:00
Tom Tromey 62331928fc Bug 1149194 - Don't use uninitialized value in ComputedTimingFunction::operator==. r=bbirtles 2015-03-30 09:44:00 -04:00
Jonathan Watt 2b22106122 Bug 1145246, part 3 - Update layout code for the rename of Animatable.getAnimationPlayers() to Animatable.getAnimations(). r=birtles 2015-03-20 18:20:49 +00:00
Jonathan Watt 708ecfa2bf Bug 1145246, part 2 - Update Web Animations code and tests for the rename of Animatable.getAnimationPlayers() to Animatable.getAnimations(). r=birtles 2015-03-20 18:20:37 +00:00
Jonathan Watt aaa7442c3d Bug 1074630, part 2 - CSS animations tests for Web Animations finishing behavior. r=birtles 2015-03-18 13:21:28 +00:00
Jonathan Watt d9bad51ee9 Bug 1074630, part 1 - Implement Web Animations finishing behavior. r=birtles, r=smaug 2015-03-18 13:22:11 +00:00
Brian Birtles 6fd700984b Bug 1109390 part 18 - Rename AnimationPlayer::IsRunning to IsPlaying and reuse IsInPlay definition; r=jwatt
This patch renames the confusing IsRunning method since IsRunning() is *not*
the same as (PlayState() == AnimationPlayState::Running). It also removes
the old definition to make better re-use of PlayState() and IsInPlay().
2015-03-27 18:01:00 +09:00
Brian Birtles 43d8f02ab6 Bug 1109390 part 17 - Add Animation::IsInPlay(); r=jwatt
This patch adds a method for testing if an animation is "in play" which is
a term defined in the Web Animations spec. This is in preparation for removing
some slightly redundant code in IsRunning and aligning better with the spec.
2015-03-27 17:54:39 +09:00
Brian Birtles a7e4fac5e7 Bug 1109390 part 16 - Update IsCurrent to take a player parameter; r=jwatt
In preparation for introducing IsInPlay (where "in play" is a term in the Web
Animations spec), this patch aligns the existing IsCurrent with the definition
in the spec that says an animation effect is only current if it is attached
to an animation (player in our current naming) that is not finished. In order
to ensure that we need to pass the animation/player into the method.

This actually changes the behavior of IsCurrent since now we will return false
for animations that are finished. As far as I can tell, all the call sites that
are requesting current animations should only be concerned with animations that
are actually running. If not, they need to be adjusted to look for animations
that are either current or in effect.
2015-03-27 17:44:38 +09:00
Brian Birtles f404970a0d Bug 1109390 part 15 - Update AnimationPlayer::SetCurrentTime to cancel any pending pause tasks; r=jwatt 2015-03-27 15:56:45 +09:00
Brian Birtles b6167dda0d Bug 1109390 part 14 - Update AnimationPlayer::DoPlay to re-use the ready promise appropriately; r=jwatt 2015-03-27 15:56:45 +09:00