Commit Graph

167 Commits

Author SHA1 Message Date
Jonathan Watt
90dbf963b4 Bug 1141710, part 7 - Store the generated 'animation' property string in a global constant and reuse that constant. r=dholbert 2015-03-04 02:49:43 +00:00
Jonathan Watt
26fbd277ef Bug 1141710, part 7 - Create helpers to get the startTime corresponding to various points through the active duration. r=dholbert 2015-03-04 02:49:43 +00:00
Jonathan Watt
8a4fc5a806 Bug 1141710, part 5 - Change from assert_true() to the new assert_unreached(). r=dholbert 2015-03-04 02:49:43 +00:00
Jonathan Watt
c7ff95b513 Bug 1141710, part 4 - Avoid race condition when taking timestamps by reusing the original timestamp. r=dholbert 2015-03-04 02:49:43 +00:00
Jonathan Watt
f4957eb992 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-04 02:49:43 +00:00
Jonathan Watt
8578d3f47c Bug 1141710, part 2 - Update comments to be non-Mozilla specific. r=dholbert 2015-03-04 02:49:43 +00:00
Jonathan Watt
b6c71a13c9 Bug 1141710, part 1 - Update to the new version of addDiv() in testcommon.js. r=dholbert 2015-03-04 02:49:43 +00:00
Jonathan Watt
030adf0d4d Bug 1141498, part 2 - Enable calls to DOM animation test's testcommon.js's addDiv() to set attributes. r=dholbert 2015-03-04 02:49:43 +00:00
Jonathan Watt
0c54c4dbad Bug 1141498, part 1 - Stop using Node.remove() in the DOM animation test's testcommon.js. r=dholbert 2015-03-04 02:49:43 +00:00
Wes Kocher
3bb46ad704 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
a202ebbf66 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
7c1b10da7c 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
2dec349827 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
6f978d04e9 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
9da18556ac 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
b2282f1eb0 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
913570bb7e 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
3800831c90 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
456e199cd2 Bug 1141710, part 2 - Update comments to be non-Mozilla specific. r=dholbert 2015-03-02 20:04:58 +00:00
Jonathan Watt
e1292b7426 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
5ee203a5e1 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
7ad8ce7b4e 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
30caea41e9 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
2a718ac66a 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
401c2a63c1 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
fa1e127bb0 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
50d187e03e 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
f8c2b82929 Bug 1073379, part 1 - Add an AnimationUtils::DoubleToTimeDuration helper. r=birtles 2015-02-09 10:25:51 +00:00
L. David Baron
5ff37bf6f6 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
6ee3666899 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
8413cc973c Back out Bug 1127201 (part 2) for various problems. 2015-02-06 15:04:32 -08:00
Nicholas Nethercote
3629781b69 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
aee42aa691 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
636fdf8aef 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
3c2a620fd3 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
d431855e41 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
ca4bc4770a 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
9aa9876849 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
764c2b45f4 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
197cde67e9 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
c6c61dd8ec 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
c58bc94deb 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
d24cdd2aad 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
846b4c3a6e 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
d6583c1dfb 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
c51f3a7a16 Bug 1117955 - Disable css-transitions/test_animation-pausing.html on Windows 2015-01-07 15:00:26 +09:00
Brian Birtles
69e6dd8415 Bug 1117955 - Disable css-animations/test_animation-pausing.html on Windows 2015-01-06 14:36:55 +09:00
Brian Birtles
720fca4e3f 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
186ce2e7c6 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
d947b42c20 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