Commit Graph

158 Commits

Author SHA1 Message Date
Wes Kocher
fa3b470408 Backed out 2 changesets (bug 1141498) for mochitest-1 bustage
Backed out changeset aab01fe57d48 (bug 1141498)
Backed out changeset d366dc0fb693 (bug 1141498)
2015-03-10 18:39:03 -07:00
Wes Kocher
9825e5f35a Backed out 9 changesets (bug 1141710)
Backed out changeset 0e360d3f690b (bug 1141710)
Backed out changeset c67f9c7dfd4e (bug 1141710)
Backed out changeset 9496b1468d9c (bug 1141710)
Backed out changeset e1330135150d (bug 1141710)
Backed out changeset 0bf9f153d5bc (bug 1141710)
Backed out changeset ac29161a0f98 (bug 1141710)
Backed out changeset ee29275a1748 (bug 1141710)
Backed out changeset 255c9236bb37 (bug 1141710)
Backed out changeset fcd5ac448c46 (bug 1141710)
2015-03-10 18:38:28 -07:00
Jonathan Watt
dbdd24d84d Bug 1141710, part 9 - Get the timeline from the player instead of from the document. r=dholbert 2015-03-03 17:40:29 +00:00
Jonathan Watt
71b90da2f9 Bug 1141710, part 8 - Create helpers to get the startTime corresponding to various points through the active duration. r=dholbert 2015-03-03 17:40:28 +00:00
Jonathan Watt
674943757e Bug 1141710, part 7 - Store the generated 'animation' property string in a global constant and reuse that constant. r=dholbert 2015-03-03 17:40:26 +00:00
Jonathan Watt
2b69014af7 Bug 1141710, part 7 - Create helpers to get the startTime corresponding to various points through the active duration. r=dholbert 2015-03-03 17:40:25 +00:00
Jonathan Watt
6a59e248b9 Bug 1141710, part 5 - Change from assert_true() to the new assert_unreached(). r=dholbert 2015-03-02 20:05:03 +00:00
Jonathan Watt
9af7cb35a7 Bug 1141710, part 4 - Avoid race condition when taking timestamps by reusing the original timestamp. r=dholbert 2015-03-02 20:05:01 +00:00
Jonathan Watt
cc332ee976 Bug 1141710, part 3 - Stop using ECMAScript 6 features in test_animation-player-starttime.html, since other browsers don't support them. r=dholbert 2015-03-02 20:05:00 +00:00
Jonathan Watt
0d47b214d0 Bug 1141710, part 2 - Update comments to be non-Mozilla specific. r=dholbert 2015-03-02 20:04:58 +00:00
Jonathan Watt
c8c247664b Bug 1141710, part 1 - Update to the new version of addDiv() in testcommon.js. r=dholbert 2015-03-02 20:04:57 +00:00
Jonathan Watt
f8082bd161 Bug 1141498, part 2 - Enable calls to DOM animation test's testcommon.js's addDiv() to set attributes. r=dholbert 2015-02-27 10:23:55 +00:00
Jonathan Watt
dd4fe529bd Bug 1141498, part 1 - Stop using Node.remove() in the DOM animation test's testcommon.js. r=dholbert 2015-02-27 10:23:49 +00:00
L. David Baron
ba8f91bca8 Bug 1140134 - Don't skip the rest of the properties in an animation after hitting one that we shouldn't apply. r=dholbert
Both sets of new tests pass with the patch, but without the patch the
"top is animating" test fails.
2015-03-06 13:35:45 -08:00
Jonathan Watt
983df62b3a Bug 1073379, part 6b - Re-enable the player.playState check in checkStateAtActiveIntervalEndTime, but disable the first checkStateAtActiveIntervalEndTime call in the 'Skipping backwards through animation' tests. r=orange 2015-02-25 11:08:52 +00:00
Jonathan Watt
07954fa4d6 Bug 1073379, part 6 - Tests for the effect of setting CSS animation's AnimationPlayer.startTime. r=dholbert 2015-02-20 15:14:11 +00:00
Jonathan Watt
602ecbe7be Bug 1073379, part 3 - Make AnimationPlayer::SetStartTime() notify its animation manager (via its player collection) of changes so that computed style is updated correctly. r=dholbert 2015-02-12 17:56:57 +00:00
Jonathan Watt
44832e736c Bug 1073379, part 2 - Implement web-animations proceedure to 'update the player start time' and make AnimationPlayer.startTime writeable. r=birtles, r=smaug 2015-02-09 10:26:27 +00:00
Jonathan Watt
69ac7e7f6d Bug 1073379, part 1 - Add an AnimationUtils::DoubleToTimeDuration helper. r=birtles 2015-02-09 10:25:51 +00:00
L. David Baron
824c76c900 Bug 960465 patch 14 - Retain finished transitions until the next style change or until removed from transition-property. r=birtles
Note that this increases memory use for completed transitions since we
don't throw away the data when the transitions complete.  That said,
this matches what we do for CSS Animations, and it's needed (once we
switch to the new rules for starting transitions) to maintain the
invariant that unrelated style changes don't trigger transitions.

The storage issues could be optimized in the future if it turns out to
be a problem, but I think that's unlikely, given that we'll never store
more than one for any element+property combination.
2015-02-17 11:15:04 +13:00
Nicholas Nethercote
242708cf72 Bug 1127201 (attempt 2, part 1) - Replace most NS_ABORT_IF_FALSE calls with MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 488e401ff87e31a2074c4108c4df0572d9536667
2015-02-09 14:34:50 -08:00
Andrew McCreight
d3826daa16 Back out Bug 1127201 (part 2) for various problems. 2015-02-06 15:04:32 -08:00
Nicholas Nethercote
d34f0301b8 Bug 1127201 (part 2) - Convert all NS_ABORT_IF_FALSE calls to MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 99182e70335d2b5ff95f8c528ae992d37294be3a
2015-02-04 20:05:36 -08:00
Brian Birtles
8162708cc1 Bug 1123196 part 1 - While player is waiting to start, return its pending start time; r=jwatt
After starting layer animations we set the same start time on content
animations but we don't apply it until the next tick (see bug 1112480 for
background). However, in some circumstances, we can end up creating layer
animations again within the same refresh driver tick. In this case, we should
initialize the animations with the same start time as we previously used.

This patch exposes the pending start time set on content animations so that,
if set, we can use it when building layer animations.
2015-02-03 14:08:37 +09:00
Jonathan Watt
393081114a Bug 1105098 - Make AnimationTimeline always return the same parent object (even after document.open()) and replace the document's timeline if the document is reset. r=smaug,birtles 2015-01-26 17:08:51 +00:00
Mason Chang
6c10033ff7 Bug 1119981. Disable test_deferred_start.html on b2g for race condition in test. r=bbirtles 2015-01-16 09:33:49 -08:00
Brian Birtles
483f9be18f Bug 1112480 part 10 - Mark css-animations/test_animation-pausing.html and css-transitions/test_animation-pausing.html as no longer failing; r=jwatt
With this updated approach to starting pending animations, these tests should no
longer fail on Mac 10.8 or Windows.
2015-01-09 07:57:59 +09:00
Brian Birtles
816dbf54ef Bug 1112480 part 9 - Remove call to PostUpdate from AnimationPlayer::ResumeAt; r=jwatt
Since pending animations are no longer started outside of a style update, we no
longer need to call PostUpdate from ResumeAt.
2015-01-09 07:57:58 +09:00
Brian Birtles
a31477d9b4 Bug 1112480 part 8 - Remove AnimationTimeline::FastForward; r=jwatt
Now that we don't actually start pending animations until the following refresh
driver tick we no longer need to be able to fast-forward the AnimationTimeline
between ticks.
2015-01-09 07:57:58 +09:00
Brian Birtles
7a9094aa6e Bug 1112480 part 7 - Add checking for orphaned players; r=jwatt
When a player is made pending, we rely on it being added to a pending player
tracker that will eventually start the player. However, there are a few
situations where this might not happen. For example, we can't find a pending
player tracker (e.g. there's no source content or the source content isn't
attached to a document), or the pending player tracker disappeared.

In these cases we still want to ensure that such a player does actually get
started. This patch attempts to detect such situations and start players
accordingly.

There are, unfortunately, currently no tests for this. I have been unsuccessful
in recreating any of the situations these tests are supposed to cover.
2015-01-09 07:57:58 +09:00
Brian Birtles
ac47cd0a02 Bug 1112480 part 6 - Make PendingPlayerTracker call StartOnNextTick; r=jwatt
This patch switches on the new, "actually start the player in the next refresh
driver tick" behavior. It updates PendingPlayerTracker, adding
a StartPendingPlayersOnNextTick method which calls the appropriate method on
AnimationPlayer. The existing StartPendingPlayers is renamed to
StartPendingPlayersNow and is used for testing only.

Furthermore, since we now expect AnimationPlayer::StartOnNextTick to be
functional, AnimationPlayer::DoPlay is updated to use it when there is no
document available. This should make playing an animation player always
asynchronous, that is, always transition to the pending state temporarily
(unless we are already playing).
2015-01-09 07:57:58 +09:00
Brian Birtles
9eb65d26c7 Bug 1112480 part 5 - Add AnimationTimeline::IsUnderTestControl; r=jwatt
Earlier in this patch series we added AnimationPlayer::StartOnNextTick which
takes a ready time parameter expressed in timeline time. In order to call this
method when painting finishes we need to convert the TimeStamp recorded when
painting finished to a timeline time. However, when the timeline is driven by
a refresh driver under test control we can no longer meaningfully do this
conversion since there is no correspondence between the notion of time used to
record the time when painting finished (wallclock time) and the notion of time
used by the timeline (which has been arbitrarily adjusted by test code).

We need a way to detect this situation so that we know not to call
ToTimelineTime in that case.

Alternatively, we could make ToTimelineTime automatically return a null value
when its refresh driver is under test control. However, in this situation
ToTimelineTime can still actually be used to convert a TimeStamp to a timeline
time as long as the TimeStamp is from the same refresh driver. Indeed,
GetCurrentTime does exactly that. So if we were to go down that route we would
have to provide a way for GetCurrentTime to work around that restriction.

For now, this patch puts the onus on the caller of ToTimelineTime to check if
the timeline is under test control first (unless they are passing a TimeStamp
from the same refresh driver, in which case there is no need to check).
2015-01-09 07:57:58 +09:00
Brian Birtles
f13b2102bb Bug 1112480 part 4 - Use mPendingReadyTime in AnimationPlayer::Tick; r=jwatt
This patch makes AnimationPlayer act on requests to StartOnNextTick by checking
for mPendingReadyTime on each tick.

We also check that the ready time is not in the future since currently it might
be possible that we get multiple calls to AnimationPlayer::Tick within a single
refresh driver tick.

Note that this patch shouldn't actually produce any observable change yet,
however, since we don't call StartOnNextTick anywhere.
2015-01-09 07:57:58 +09:00
Brian Birtles
8fbf68a16a Bug 1112480 part 3 - Add AnimationPlayer::StartOnNextTick; r=jwatt
Adds a method that schedules an animation player to begin on the next tick using
the supplied time as the start time.

We don't call this yet, however, but simply add the method and the
mPendingReadyTime member it sets.
2015-01-09 07:57:58 +09:00
Brian Birtles
cc7ea10335 Bug 1112480 part 2 - Factor out ResumeAt; r=jwatt
In addition to AnimationPlayer::StartNow, this patch series also makes
AnimationPlayer::Tick start animations.

Since these methods will share a lot of code we first factor out a common
ResumeAt method to encapsulate the common code.
2015-01-09 07:57:58 +09:00
Brian Birtles
c6ebd438ae Bug 1112480 part 1 - Adjust tests to accommodate changed animation start behavior; r=jwatt
In this patch series we adjust the behavior of animation starting so that the
animation does not actually start until the following refresh driver tick. This
requires some tweaks to tests to ensure they continue to pass.
2015-01-09 07:57:58 +09:00
Brian Birtles
63f5d21f88 Bug 1117955 - Disable css-transitions/test_animation-pausing.html on Windows 2015-01-07 15:00:26 +09:00
Brian Birtles
579783f725 Bug 1117955 - Disable css-animations/test_animation-pausing.html on Windows 2015-01-06 14:36:55 +09:00
Brian Birtles
fd8aff9c0e Bug 1113413 - Make refresh driver go back immediately when restored from test control; r=vlad 2015-01-06 10:56:02 +09:00
Brian Birtles
62ee098b80 Bug 927349 part 30 - Cancel transitions when we have a change to a non-animatable style; r=heycam 2015-01-06 10:55:59 +09:00
Brian Birtles
ddaaa69a98 Bug 927349 part 29 - Temporarily disable failing tests {browser_555547.js on Windows opt, test_animation-pausing.html on 10.8, test_deferred_start.html on mulet}; r=me (as discussed with jwatt) 2014-12-24 15:42:37 +09:00
Brian Birtles
291701ad1b Bug 927349 part 26 - Add a test for compositor animations with a delay; r=nical
This patch adds a test that we correctly incorporate the delay when setting
a layer animation's initialCurrentTime.

The notion of 'current time' on layer animations differs from that on main
thread animations in that it does not incorporate the animation delay.
Instead, we wait until an animation's delay has complete before putting it
on the layer and then it we add without delay.

For animations that are still waiting to start we need to factor this delay into
the initialCurrentTime stored on the layer animation so that when we update
the animation's start time it represents the time *after* the delay has
finished. Previously we failed to do this but no tests failed since all existing
tests for delay rely on DOMWindowUtils.advanceTimeAndRefresh which avoids this
particular code path (since we don't add pending animations to layers while
the refresh driver is under test control).

This patch adds a test for animation delay that does not rely on
DOMWindowUtils.advanceTimeAndRefresh which has been confirmed to fail if we
don't incorporate the delay in our calculation of initialCurrentTime.
2014-12-25 16:28:25 +09:00
Brian Birtles
54a9341689 Bug 927349 part 25 - Test cancelling of players; r=heycam 2014-12-25 16:28:24 +09:00
Brian Birtles
06faed4dae Bug 927349 part 24 - Add a test that empty animations still start; r=heycam 2014-12-25 16:28:24 +09:00
Brian Birtles
01a5445ce7 Bug 927349 part 23 - Wait on player.ready on test_running_on_compositor.html; r=jwatt 2014-12-25 16:28:24 +09:00
Brian Birtles
c4aa216c4c Bug 927349 part 22 - Make AnimationPlayer wait for animations to be rendered before starting; r=jwatt
This patch (finally!) introduces the delayed start behavior. It updates
AnimationPlayer::DoPlay to put animations in the PendingPlayerTracker from
where they are triggered.

This patch also updates nsTransitionManager to set the animation's source
before calling Play as otherwise the AnimationPlayer won't be able to access
the pending player tracker (which it locates by navigating AnimationPlayer ->
Animation (source content) -> target element -> composed doc -> pending player
tracker). In future, when we support setting the AnimationPlayer.source property
we will make this more robust so that the order in which these steps are
performed doesn't matter.

This patch also updates a couple of tests to reflect the fact that
AnimationPlayer will now return the pending state.
2014-12-25 16:28:24 +09:00
Brian Birtles
e5b88e8ef0 Back out parts 22-29 from bug 927349 for causing intermittent test failure in css-animations/test_animation-pausing.html on 10.8 2014-12-26 11:54:43 +09:00
Brian Birtles
8f3f4c1376 Bug 927349 part 29 - Disable failing browser_555547.js on Windows opt - pushed again without backing out parts 22-29 at the same time; r=me
In https://hg.mozilla.org/integration/mozilla-inbound/rev/3ab2ff9b9f94
I accidentally pushed part 29 along with a backout for parts 22-29. This patch
reverts that change.

If this changset causes problems, the following changesets should be backed out:

https://hg.mozilla.org/integration/mozilla-inbound/rev/477f46897b0b
https://hg.mozilla.org/integration/mozilla-inbound/rev/6c345954bce5
https://hg.mozilla.org/integration/mozilla-inbound/rev/642e400b22a9
https://hg.mozilla.org/integration/mozilla-inbound/rev/9bdf7c2279fa
https://hg.mozilla.org/integration/mozilla-inbound/rev/79cac8c71159
https://hg.mozilla.org/integration/mozilla-inbound/rev/cfe757e478d5
https://hg.mozilla.org/integration/mozilla-inbound/rev/eaf834051cbd
2014-12-26 08:49:20 +09:00
Brian Birtles
414a5c831f Bug 927349 part 29 - Disable failing browser_555547.js on Windows opt; r=me (as discussed with jwatt) 2014-12-25 16:31:55 +09:00
Brian Birtles
aa18819813 Bug 927349 part 26 - Add a test for compositor animations with a delay; r=nical
This patch adds a test that we correctly incorporate the delay when setting
a layer animation's initialCurrentTime.

The notion of 'current time' on layer animations differs from that on main
thread animations in that it does not incorporate the animation delay.
Instead, we wait until an animation's delay has complete before putting it
on the layer and then it we add without delay.

For animations that are still waiting to start we need to factor this delay into
the initialCurrentTime stored on the layer animation so that when we update
the animation's start time it represents the time *after* the delay has
finished. Previously we failed to do this but no tests failed since all existing
tests for delay rely on DOMWindowUtils.advanceTimeAndRefresh which avoids this
particular code path (since we don't add pending animations to layers while
the refresh driver is under test control).

This patch adds a test for animation delay that does not rely on
DOMWindowUtils.advanceTimeAndRefresh which has been confirmed to fail if we
don't incorporate the delay in our calculation of initialCurrentTime.
2014-12-25 16:28:25 +09:00