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

229 Коммитов

Автор SHA1 Сообщение Дата
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
Brian Birtles 46a68f9a61 Bug 1109390 part 13 - Cancel pending pauses as well as pending plays; r=jwatt
This patch simply updates the method that cancels pending plays to also cancel
pending pauses. As it stands, for some of places where this is called it might
not be appropriate to cancel pending pauses but we will adjust each of these
call sites one-by-one in subsequent patches in this series.
2015-03-27 15:56:45 +09:00
Brian Birtles c66558469d Bug 1109390 part 12 - Update IsPaused to handle pause-pending players as well; r=jwatt
IsPaused is used in nsAnimationManager to detect if a newly created animation
should be paused. It is also used inside AnimationPlayer::IsRunning which is
used to determine what animations to send to the compositor (we don't send
paused animations to the compositor). In all these cases we want to treat paused
animations and pause-pending animations alike.

This patch updates IsPaused to include also pause-pending animations. At the
same time it renames IsPaused to IsPausedOrPausing to reflect the change in
behavior.

This patch also adjusts a few nearby one-line functions to put the opening brace
on a new line since apparently this is what the coding style says to do.
2015-03-27 15:56:45 +09:00
Brian Birtles c8f4410743 Bug 1109390 part 11 - Make IsPossiblyOrphanedPendingPlayer deal with pause-pending players too; r=jwatt 2015-03-27 15:56:45 +09:00
Brian Birtles 7192454753 Bug 1109390 part 10 - Add an enum to AnimationPlayer to represent if we are pause-pending or play-pending; r=jwatt 2015-03-27 15:56:45 +09:00
Brian Birtles 7ca856e0a1 Bug 1109390 part 9 - Call Trigger* on pause-pending players; r=jwatt
This won't actually do anything yet because:
(a) We don't yet add pause-pending players to the PendingPlayerTracker
(b) We never mark pausing players as pending so
    AnimationPlayer::TriggerOnNextTick will just ignore them.
2015-03-27 15:56:45 +09:00
Brian Birtles f666a95c80 Bug 1109390 part 8 - Rename Start* methods in AnimationPlayer to Trigger*; r=jwatt 2015-03-27 15:56:45 +09:00
Brian Birtles f7d9eb1f72 Bug 1109390 part 7 - Rename PendingPlayerTracker's Start* methods to Trigger*; r=jwatt
These methods will soon be used to start animations that are waiting to start
and also to finish pausing animations that are waiting to pause. As a result
we rename them to TriggerXXX since that's a bit more generic.

There are still references to StartXXX within PendingPlayerTracker. These will
be updated in a subsequent patch once we have the appropriate methods available
on AnimationPlayer to call.
2015-03-27 15:56:45 +09:00
Brian Birtles bf038e890e Bug 1109390 part 6 - Generalize PendingPlayerTracker to support pausing as well; r=jwatt
This patch extends the PendingPlayerTracker which is currently used to record
which animations are waiting to play, such that it can also handle animations
which are waiting to complete a pause operation.

It doesn't yet do anything with the pause-pending animations, that will come
in another patch.
2015-03-27 15:56:45 +09: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 511c419852 Bug 1109390 part 3 - Clear the start time when playing a player; r=jwatt
This brings us into line with the algorithm in:

  https://w3c.github.io/web-animations/#play-an-animation

which makes the other patches in this series easier to compare with
the specification.
2015-03-24 09:21:08 +09: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
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Jonathan Watt f7d5a879ea Bug 1127380, part 1 - Initial implementation of AnimationPlayer.playbackRate. r=birtles, r=smaug
--HG--
extra : rebase_source : 5b2dbefbcd986d7529d8567b7f068ac30ad6416e
2015-03-13 20:10:45 +00:00
L. David Baron 40bd226b51 Bug 1125455 patch 5 - Add Animation::GetAnimationOfProperty. r=birtles
This is needed for patch 6.
2015-03-19 21:10:00 -07:00
L. David Baron c64617d10d Bug 1125455 patch 4 - For main-thread application of transitions, don't apply transitions when animations are also running. r=birtles
I've verified locally that this patch (not others in this series) fixes
the test failures that match the test changes in this patch.
2015-03-19 21:10:00 -07:00
L. David Baron 43ffda7be5 Bug 1125455 patch 1 - Add boolean for whether an animation of a property wins in the CSS cascade. r=birtles 2015-03-19 21:10:00 -07:00
Boris Zbarsky dc24477d79 Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00
Carsten "Tomcat" Book 47fe95d629 Backed out 7 changesets (bug 1125455) for test failures in m1 test_animation-player-ready.html on a CLOSED TREE
Backed out changeset 8a316064caff (bug 1125455)
Backed out changeset ad326dbcbd03 (bug 1125455)
Backed out changeset 83dab9578e23 (bug 1125455)
Backed out changeset 5bd86c20cd02 (bug 1125455)
Backed out changeset 751177025dcb (bug 1125455)
Backed out changeset f60c5b4adf84 (bug 1125455)
Backed out changeset 326ef9a86c85 (bug 1125455)
2015-03-18 16:32:54 +01:00
L. David Baron 82ad97d447 Bug 1125455 patch 5 - Add Animation::GetAnimationOfProperty. r=birtles
This is needed for patch 6.
2015-03-18 07:35:30 -07:00
L. David Baron 8f015c4370 Bug 1125455 patch 4 - For main-thread application of transitions, don't apply transitions when animations are also running. r=birtles
I've verified locally that this patch (not others in this series) fixes
the test failures that match the test changes in this patch.
2015-03-18 07:35:30 -07:00
L. David Baron 065aeaa603 Bug 1125455 patch 1 - Add boolean for whether an animation of a property wins in the CSS cascade. r=birtles 2015-03-18 07:35:29 -07: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
Cameron McCormack 9d635d78ad Bug 1123523 - Part 9: Dispatch an nsIAnimationObserver notification when an animation is changed. r=birtles 2015-03-14 16:34:40 +11:00
Cameron McCormack d648fe467f Bug 1123523 - Part 8: Dispatch nsIAnimationObserver notifications when an animation is added or removed. r=birtles 2015-03-14 16:34:40 +11:00
Cameron McCormack 7edb0d374f Bug 1123523 - Part 3: Store a flag on AnimationPlayer for whether it is exposed by Element.getAnimationPlayers(). 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