Commit Graph

115 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
Brian Birtles
6b062fb872 Bug 1109390 part 5 - Adjust tests to better handle asynchronous pausing; r=jwatt
A number of animation tests assume that pausing happens instantaneously. This
patch adjust many of those tests so that they will continue to work when
pausing happens asynchronously. In many cases this is possible because we
know the ready promise on AnimationPlayer (soon to be Animation) objects will
be resolved so we can wait on it and it will resolve immediately now, but when
asynchronous pausing is introduced the test the promise won't resolve until
after the pause operation is complete.

There are some tests that can't be so easily adjusted and we will have to fix
these at the same time as we turn on async pausing. However, taking care of
this set of tests now should reduce the size of subsequent patches in this
series.
2015-03-27 15:56:44 +09:00
Mason Chang
ae4567cd01 Bug 1145327 Part 2: Add test to ensure requestAnimationFrame callback timestamps always go forward in time. r=birtles,dholbert 2015-03-24 14:28:34 -07:00
Brian Birtles
988481e564 Bug 1109390 part 2 - Remove some unneeded startTime tests; r=jwatt
Now that we have separate tests for checking the initial state of startTime we
can remove these checks from tests for setting the startTime.

Also, while we're at it, we needn't check the playState and animationPlayState
since these should be covered by other tests.
2015-03-24 09:21:08 +09:00
Brian Birtles
f00da8e1e6 Bug 1109390 part 1 - Add tests for getting the startTime; r=jwatt 2015-03-24 09:21:07 +09:00
Cameron McCormack
a28a264c22 Bug 1145912 - Make single_transition_reversed and multiple_transitions more robust. r=birtles 2015-03-23 13:07:25 +11:00
Brian Birtles
807e40e6b9 Bug 1113425 part 4 - Enable test_deferred_start.html on all platforms; r=mattwoodrow 2015-03-17 18:38:12 +09:00
Brian Birtles
e3f0c2f97e Bug 1113425 part 3 - Make test_deferred_start.html wait an extra frame; r=mattwoodrow
This is needed to avoid intermittent failures on Mulet and B2G ICS Emulator.
2015-03-17 18:38:12 +09:00
Brian Birtles
80be8bcd01 Bug 1113425 part 1 - Fix some bad CSS comment syntax in animation tests; r=mattwoodrow 2015-03-17 18:38:12 +09:00
Cameron McCormack
df118d4a47 Bug 1143314 - Don't use very short transition/animation durations in test_animation_observers.html. r=birtles 2015-03-17 17:13:20 +11:00
L. David Baron
a8fa9e2011 Bug 1143314 - Temporary disable two tests that are frequently failing intermittently, added about 12 hours ago in bug 1123523, on a CLOSED TREE. 2015-03-14 10:20:27 -07:00
Cameron McCormack
c8f4387af1 Bug 1123523 - Part 10: Tests. r=birtles 2015-03-14 16:34:40 +11:00
Jonathan Griffin
d1c61bc9b6 Bug 1116187 - Disable failing mochitest-chrome tests for B2G, r=gbrown 2015-02-06 16:30:37 -08:00
Jonathan Watt
0e1b8d416c Bug 1072037, part 2 - Tests for the effect of setting CSS animation's AnimationPlayer.currentTime. r=birtles
--HG--
rename : dom/animation/test/css-animations/test_animation-player-starttime.html => dom/animation/test/css-animations/test_animation-player-currenttime.html
2015-03-09 16:50:39 +00:00
Jonathan Watt
d5681f75bf Bug 1070744 - Backout c482c88b0393 and c5d5202c3d72 for being attributed to this bug instead of bug 1072037. r=me, and faking r=smaug since backout 2015-03-11 15:28:07 +00:00
Jonathan Watt
5bffcdb7ca Bug 1070744, part 2 - Tests for the effect of setting CSS animation's AnimationPlayer.currentTime. r=birtles
--HG--
rename : dom/animation/test/css-animations/test_animation-player-starttime.html => dom/animation/test/css-animations/test_animation-player-currenttime.html
2015-03-09 16:50:39 +00:00
Jonathan Watt
6fce4aa41e Bug 1073379, part 7 - Tests for the effect of setting a CSS transition's AnimationPlayer.startTime. r=birtles
--HG--
rename : dom/animation/test/css-animations/test_animation-player-starttime.html => dom/animation/test/css-transitions/test_animation-player-starttime.html
2015-03-06 15:23:17 +00:00
Jonathan Watt
21f90d17db Bug 1141710, part 14 - Get rid of the checks at 90% through the active duration. r=birtles 2015-03-05 13:07:20 +00:00
Jonathan Watt
cf99e48829 Bug 1141710, part 13 - Wrap all lines at the 80 column mark. r=birtles 2015-03-05 13:07:19 +00:00
Jonathan Watt
74ff18bb06 Bug 1141710, part 12 - Check that the hold time is updated when the startTime is set to null. r=birtles 2015-03-11 07:19:44 +00:00
Jonathan Watt
4e2bbb40b0 Bug 1141710, part 11 - Assert that seeking over the before and active phases worked. r=birtles 2015-03-05 13:07:19 +00:00
Jonathan Watt
8b770d6a97 Bug 1141710, part 10 - Update some assertion text and comments. r=birtles 2015-03-05 13:07:19 +00:00
Jonathan Watt
408721a5f1 Bug 1141710, part 9 - Get the timeline from the player instead of from the document. r=dholbert
--HG--
extra : rebase_source : 1d737817af45cdc5a55a9793dea248e70bc66cb3
2015-03-04 02:49:44 +00:00
Jonathan Watt
4ecf9b15a0 Bug 1141710, part 8 - Create helpers to get the startTime corresponding to various points through the active duration. r=dholbert
--HG--
extra : rebase_source : 77ce022fad96c8f9de09ba88e53473674b3b5d11
2015-03-04 02:49:43 +00:00
Jonathan Watt
0b2deb137c Bug 1141710, part 7 - Store the generated 'animation' property string in a global constant and reuse that constant. r=dholbert
--HG--
extra : rebase_source : 539673cc79c80f67043bd94e933fe54f24a25be1
2015-03-04 02:49:43 +00:00
Jonathan Watt
d4dc6c2561 Bug 1141710, part 7 - Create helpers to get the startTime corresponding to various points through the active duration. r=dholbert
--HG--
extra : rebase_source : 29ba71854e2f77cbb088dc5e3545c95ca242c6d7
2015-03-04 02:49:43 +00:00
Jonathan Watt
4f75f74035 Bug 1141710, part 5 - Change from assert_true() to the new assert_unreached(). r=dholbert
--HG--
extra : rebase_source : 5b12f7d32ff7f67af4cdc7fe1198153ab2775c8e
2015-03-04 02:49:43 +00:00
Jonathan Watt
e1211720f1 Bug 1141710, part 4 - Avoid race condition when taking timestamps by reusing the original timestamp. r=dholbert
--HG--
extra : rebase_source : a3eab56b57d605af01e5dc450b30a8aa7c77a417
2015-03-04 02:49:43 +00:00