Commit Graph

74 Commits

Author SHA1 Message Date
Rob Wu
4a6f84f91d Bug 1544834 - Replace deprecated generics in test code r=evilpie
- `Array.map` becomes `Array.from`
- Array copying via `Array.slice` becomes `Array.from`.
- `Array.forEach` that did not rely on closures becomes `for`-`of` loops.
- Anything else: `Array.X` becomes `Array.prototype.X`.

Complex cases:

dom/bindings/test/TestInterfaceJS.js and
dom/bindings/test/test_exception_options_from_jsimplemented.html
use `Array.indexOf` to generate an error with a specific error message.
Switched to `Array.prototype.forEach` to generate the same error.

js/src/jit-test/tests/basic/exception-column-number.js
In this test `Array.indexOf()` is used to generate an error. Since the
exact message doesn't matter, I switched to `Array.from()`.

Intentionally not changed:

editor/libeditor/tests/browserscope/lib/richtext/richtext/js/range.js
Did not modify because this is 3rd-party code and the code uses
feature detection as a fall back when Array generics are not used.

testing/talos/talos/tests/dromaeo/lib/mootools.js
Did not modify because mootools adds the `Array.slice` method to the
`Array` object.

Not changed because they check the implementation of Array generics:
js/src/jit-test/tests/basic/arrayNatives.js
js/src/jit-test/tests/basic/bug563243.js
js/src/jit-test/tests/basic/bug618853.js
js/src/jit-test/tests/basic/bug830967.js
js/src/jit-test/tests/jaeger/recompile/bug656753.js
js/src/jit-test/tests/self-hosting/alternate-static-and-instance-array-extras.js
js/src/tests/non262/Array/generics.js
js/src/tests/non262/Array/regress-415540.js
js/src/tests/non262/extensions/regress-355497.js
js/src/tests/non262/extensions/typedarray-set-neutering.js

Depends on D27802

Differential Revision: https://phabricator.services.mozilla.com/D27803

--HG--
extra : moz-landing-system : lando
2019-04-17 19:03:19 +00:00
Brian Grinstead
c4fa4cfc0c Bug 1544322 - Part 4 - Remove the [type] attribute for multiline <script> tags loading files in /tests/SimpleTest/ r=bzbarsky
This is an autogenerated commit to handle scripts loading mochitest harness files, in
the case where the script src is on the line below the script tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 4` argument.

Differential Revision: https://phabricator.services.mozilla.com/D27459

--HG--
extra : moz-landing-system : lando
2019-04-16 04:01:46 +00:00
Boris Chiou
267334cb8c Bug 1536392 - Disable multiple transform-like properties animation at 5s on GeckoView. r=hiro
If we have an animation with multiple transform-like properties, it
seems getOMTAStyle(transform) returns an empty string at 50% on
Android x86_64 opt with e10s, so we cannot pass this test case. We
temporarily disable this test case on this platform.

Differential Revision: https://phabricator.services.mozilla.com/D24103

--HG--
extra : moz-landing-system : lando
2019-03-20 00:12:50 +00:00
Boris Chiou
55dfc7b50b Bug 1425837 - Part 8: Test that individual transforms run on the compositor thread. r=hiro,birtles
This also adds the missing preference in test_transition_per_property.html.

Depends on D22567

Differential Revision: https://phabricator.services.mozilla.com/D22568

--HG--
extra : moz-landing-system : lando
2019-03-18 18:05:04 +00:00
James Willcox
0f9084622b Bug 1507166 - Make test_omta_animations.html work under GeckoView r=birtles
The GeckoView test app doesn't handle visited link history, so disable
a couple tests that rely on that.

Differential Revision: https://phabricator.services.mozilla.com/D17698

--HG--
extra : moz-landing-system : lando
2019-01-27 04:14:25 +00:00
Hiroyuki Ikezoe
218b4e7038 Bug 1504065 - Support background-color animations on the compositor for nsIDOMWindowUtils::GetOMTAValue. r=birtles
Depends on D13001

Differential Revision: https://phabricator.services.mozilla.com/D13002

--HG--
extra : moz-landing-system : lando
2018-11-28 00:59:15 +00:00
Andreea Pavel
f97b59258b Backed out 2 changesets (bug 1504065) for failing Win reftest at child-in-animating-element-display-none.html on a CLOSED TREE
Backed out changeset 129188370231 (bug 1504065)
Backed out changeset 359e81b35cfb (bug 1504065)
2018-11-27 15:33:29 +02:00
Hiroyuki Ikezoe
7943d48803 Bug 1504065 - Support background-color animations on the compositor for nsIDOMWindowUtils::GetOMTAValue. r=birtles
Depends on D13001

Differential Revision: https://phabricator.services.mozilla.com/D13002

--HG--
extra : moz-landing-system : lando
2018-11-27 09:27:22 +00:00
Hiroyuki Ikezoe
26dd062cf9 Bug 1456679 - Enable tests in test_animations_omta.html on WebRender. r=kats
MozReview-Commit-ID: LOMQjkMYMnl

--HG--
extra : rebase_source : 6833ac484da68243f8491f2d852dc99384504a77
2018-05-08 15:59:01 +09:00
Hiroyuki Ikezoe
eb89e1cf7f Bug 1458414 - Enable test_animation_omta.html on WebRender. r=kats
But some test cases are skipped, they will be enabled in bug 1456679.

MozReview-Commit-ID: HLxPjkf6KjY

--HG--
extra : rebase_source : 55c24d34a53423a921060a431ac941b068407eb9
2018-05-02 12:15:05 +09:00
Florian Quèze
66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Florian Quèze
bdc1ffa608 Bug 1334831 - script-generated patch to use .remove() instead of .parentNode.removeChild, r=jaws. 2017-01-30 08:10:22 +01:00
Mantaroh Yoshinaga
90c5d3d372 Bug 1202333 part 1 - Remove excessive animationiteration event. r=birtles
The Firefox fired excessive animationiteration event.
But We fixed specification in order to prevent firing the animationiteration when animation is start.

For detail, See https://github.com/w3c/csswg-drafts/issues/68

MozReview-Commit-ID: 391DRxSpq86

--HG--
extra : rebase_source : 38e6710da4d9ad7422d6313eeae2803402a51b24
2016-12-20 15:57:13 +09:00
Hiroyuki Ikezoe
aa35d16aa2 Bug 1305325 - Part 9: Send animations even if it's paused, finished or zero playback rate. r=birtles.
If all of animations on an element are paused, finished or zero playback rate,
we don't send those animations to the compositor.
Also in this change, we send zero active duration animations to the compositor
in the same way as normail animations.

MozReview-Commit-ID: CHjv6Buy5fa
2016-12-02 15:34:13 +09:00
Jonathan Kew
36da9c774c Bug 1320474 - Add tests for the use of <string> as keyframes-name. r=birtles 2016-11-29 12:58:57 +00:00
Daisuke Akatsuka
b0388916e5 Bug 1064937 - Part 1: CSS Animations and Transitions should support transitions/animations of non-interpolable properties. r=birtles,pbro
MozReview-Commit-ID: 4kMytRCKK79

--HG--
extra : rebase_source : 864b568a96b399231a1cb75742d8c428f5ee2c5c
2016-11-11 16:40:38 +09:00
Hiroyuki Ikezoe
ca0f6e0ff5 Bug 1223658 - Part 5: Send animations to compositor even though it's in delay phase. r=birtles
To send animations to compositor in the delay phase we need to
modify Animation::IsPlaying returning true in the delay phase.

Note about background-position-in-delay.html:
After this patch, background-position animation also creates an active layer
from its delay phase.

Also note about test cases in test_animations_omta.html:
After landing bug 1279071, getOMTAStyle() returns the style value only
specified by animations, also in this patch we don't apply any opacity or
transform values in the delay phase, as a result we can't tell animating
value during delay phase on the compositor.

MozReview-Commit-ID: ILYKig3c08d

--HG--
extra : rebase_source : 5715c1f9ec43da3c8374f08cdca82e2ca29fe474
2016-10-14 19:14:12 +09:00
Hiroyuki Ikezoe
2445bd484f Bug 1279071 - Change GetOpacity to GetAnimationOpacity to return opacity value applied by animation. r=birtles,mstange
MozReview-Commit-ID: 6rMUlnppOeK

--HG--
extra : rebase_source : 94fa5d812764f8426d57ebc93bbcb4f286ffea26
2016-08-25 09:07:56 +09:00
Mantaroh Yoshinaga
c34b85860e Bug 1134163 - Part2 - Modify animation tests which rely on animationstart timing. r=birtles
MozReview-Commit-ID: 2IaCejiFgY2

--HG--
extra : transplant_source : %1Dp%CA%B3%E2%D4%15%CDH%EA%CEzbdI-B2%3D%9C
2016-04-28 16:30:23 +09:00
Brian Birtles
8b6a1ba8ad Bug 1260655 - Use CSSAnimationBuilder::BuildAnimationFrames to set up CSS animations using Keyframe objects; r=heycam
MozReview-Commit-ID: BMLvYP8iIIa
2016-03-30 13:01:13 +09:00
Brian Birtles
d0ad270eef Bug 1232563 part 1 - Request a layer update if an animation is newly finished; r=heycam
When requesting restyles we take special care to detect when an animation has
newly finished so we perform the necessary restyle to represent the fill state.
However, we should really explicitly pull the animation off the layer at this
point by requesting a layer update. (That is, when an animation is
newly-finished we should use RestyleType::Layer instead of
RestyleType::Standard. Currently we just use RestyleType::Standard.)

In this bug we plan to move restyle requests down to the effect (since it is
the *effect* that is restyled). However, only the Animation has the notion of
"finished" or not so we detect this particular case in the Animation and
request the layer update there. We already request layer updates in the
Animation for other situations such as pausing so doing *layer* updates in the
Animation and regular restyles in the effect is not inconsistent.

This patch also tweaks test_animations_omta.html since it was previously
erroneously testing that a finished animation was still running on the
compositor.

--HG--
extra : rebase_source : 3cd1abe2a10370e90cde64b4b42b27326082f6f0
2016-01-06 11:04:06 +09:00
Brian Birtles
883db6aa8f Bug 1181392 part 9 - Remove use of IsFinishedTransition from nsTransitionManager::FlushTransitions; r=dbaron
This patch updates the logic in nsTransitionManager::FlushTransitions that deals
with detecting newly-started (i.e. when the delay phase has just finished) or
newly-finished animations. The existing logic had the following behavior:

* Calling SetIsFinishedTransition for newly-finished transitions.
  This is no longer needed since by this point all consumers of
  IsFinishedTransition have been updated to use alternative means for testing
  if an animation is relevant.

* Setting transitionStartedOrEnded to true so that we would post an animation
  restyle.
  We can achieve this same effect by simplying updating the canThrottleTick
  flag using the result of calling Animation::CanThrottle on each animation.
  Animation::CanThrottle will return false for a newly-started or
  newly-finished animation (it returns false for a newly-started animation
  since the animation's mIsRunningOnCompositor flag won't yet be true at that
  point.)

* Updating the animation generation for newly-started and newly-finished
  animations in order to trigger a layer update.
  At least that appears to be the intention of this code. However, it currently
  has no effect since the animation generation on the pres context is not
  incremented in any context I could find where a newly started/finished
  animation might be detected.

For this third case, this patch adds tests to ensure that transitions are
correctly added and removed from the compositor when they start and finish.
This is because most of the existing tests in test_animations_omta.html cover
only CSS animations.

As noted in the comments in the test, if a tick lands at the exact beginning of
a transition we will typically not send it to the layer until the following tick
because the RestyleManager will filter out the seemingly redundant change (i.e.
no change to the computed style). Presumably updating the animation generation
was intended to avoid this.

This same behavior is true of CSS animations (and the same kind of comment
appears elsewhere in test_animations_omta.html). Long-term this is probably
worth fixing so that when a transition is triggered we get it to the compositor
one tick earlier which should improve responsiveness when the main thread is
busy and the interval between ticks is long. Furthermore, we should do the same
for both all type of animations, not just transitions.

Currently, however, this patch preserves the existing behavior and helps narrow
the difference between transitions and animations so we can apply this
optimization to both.
2015-08-07 12:29:36 +09:00
Brian Birtles
937bc54615 Bug 1181392 part 5 - Remove use of IsFinishedTransition from AnimationCollection::HasAnimationOfProperty; r=dbaron
AnimationCollection::HasAnimationOfProperty uses IsFinishedTransition to filter
out transitions that should otherwise be ignored. This is used in the following
places:

1. nsLayoutUtils::HasAnimations

   The is only used by nsIFrame::BuildDisplayListForStackingContext to see if
   there are any opacity animations

   For this case, simply returning *current* animations would be sufficient
   (since finished but filling animations should have already filled in the
   display opacity)

2. CommonAnimationManager::GetAnimationsForCompositor

   This should really only return *current* animations--that is, animations that
   are running or scheduled to run. Finished animations never run on the
   compositor. Indeed, only *playing* animations run on the compositor but, as
   we will see in some of the cases below, it is sometimes useful to know that
   an animation *will* run on the compositor in the near future (e.g. so we can
   pre-render content).

   The places where GetAnimationsForCompositor is used are:

   - When building layers to add animations to layers in nsDisplayList--in this
     case we skip any animations that aren't playing so if
     GetAnimationsForCompositor only returned current animations that would be
     more than sufficient.

   - In nsLayoutUtils::HasAnimationsForCompositor. This in turn is used:

     - In ChooseScaleAndSetTransform to see if the transform is being animated
       on the compositor. If so, it calls
       nsLayoutUtils::ComputeSuitableScaleForAnimation (which also calls
       GetAnimationsForCompositor) and passes the result to
       GetMinAndMaxScaleForAnimationProperty which we have already adjusted in
       part 4 of this patch series to only deal with *relevant* animations

       Relevant animations include both current animations and in effect
       animations but we don't run forwards-filling animations on the compositor
       so GetAnimationsForCompositor should NOT return them. Current animations
       should be enough. In fact, playing animations should be enough but we
       might want to pre-render layers at a suitable size during their delay
       phase so returning current animations is probably ok.

     - In nsDisplayListBuilder::MarkOutOfFlowFrameForDisplay to add a fuzz
       factor to the overflow rect for frames undergoing a transform animation
       on the compositor. In this case too current animations should be
       sufficient.

     - In nsDisplayOpacity::NeedsActiveLayer to say "yes" if we are animating
       opacity on the compositor. Presumably in this case it would be good to
       say "yes" if the animation is in the delay phase too (as it currently
       does). After the animation is finished, we should drop the layer, i.e.
       current animations should be sufficient.

     - In nsDisplayTransform::ShouldPrerenderTransformedContent. As with
       nsDisplayOpacity::NeedsActiveLayer, we only need to pre-render
       transformed content for animations that are current.

     - In nsDisplayTransform::GetLayerState. As with
       nsDisplayOpacity::NeedsActiveLayer, we only need to return active here
       for current animations.

     - In nsIFrame::IsTransformed. Here we test the display style to see if
       there is a transform and also check if transform is being animated on the
       compositor. As a result, we really only need HasAnimationsForCompositor
       to return true for animations that are playing--otherwise the display
       style will tell us if we're transformed or not. Returning true for all
       current compositor animations (which is a superset of playing), however,
       should not cause problems (we already return true for even more than
       that).

     - In nsIFrame::HasOpacityInternal which is much the same as
       nsIFrame::IsTransformed and hence current should be fine.

3. AnimationCollection::CanThrottleAnimation

   Here, HasAnimationOfProperty is used when looking for animations that would
   disqualify us from throttling the animation by having an out-of-date layer
   generation or being a transform animation that affects scroll and so requires
   that we do the occasional main thread sample to update scrollbars.

   It would seem like current animations are enough here too. One interesting
   case is where we *had* a compositor animation but it has finished or been
   cancelled. In that case, the animation won't be current and we should not
   throttle the animation since we need to take it off its layer.

   It turns out checking for current animations is still ok in this case too.
   The reasoning is as follows:

   - If the animation is newly-finished, we'll pick that up in
     Animation::CanThrottle and return false then.

   - If the animation is newly-idle then there are two cases:

     If the cancelled animation was the only compositor animation then
     AnimationCollection::CanPerformOnCompositorThread will notice that there
     are no playing compositor animations and return false and
     AnimationCollection::CanThrottleAnimation will never be called.

     If there are other compositor animations running, then
     AnimationCollection::CanThrottleAnimation will still return false because
     whatever cancelled the animation will update the animation generation and
     we'll notice the mismatch between the layer animation generation and the
     animation generation on the collection.

Based on the above analysis it appears that making
AnimationCollection::HasAnimationOfProperty return only current animations (and
simulatneously renaming it to HasCurrentAnimationOfProperty) is safe. Indeed, in
effect, we already do this for transitions but not for animations. This patch
generalizes this behavior to all animations.

This patch also updates test_animations_omta.html since it was incorrectly
testing that a finished opacity animation was still running on the compositor.
Finished animations should not run on the compositor and the changes in this
patch cause that to happen. The reason we don't just update this test to check
for RunningOn.MainThread is that for opacity animations, unlike transform
animations, we can't detect if an opacity on a layer was set by animation or
not. As a result, for opacity animations we typically test the opacity on
either the main thread or compositor in order to allow for the case where an
animation-set opacity is still lingering on the compositor.
2015-08-07 12:29:36 +09:00
Lee Salzman
317af90588 Bug 771367 - Update test_animations_omta.html to support testing pseudo-elements. r=dbaron
--HG--
extra : rebase_source : 659f839d709a4955d7351c1200e6dcbf527c0c51
2015-07-01 12:08:30 -04:00
L. David Baron
b3c27e4396 Bug 1153426 - Don't crash when doing an off-main-thread animation of a transform to or from the 'none' value. r=birtles
I confirmed locally (with ./mach mochitest-plain --e10s on Linux) that
the added test crashes without the patch and passes with the patch.
2015-04-16 18:13:15 -07:00
L. David Baron
708af8df5f Bug 980770 followup - Use requestLongerTimeout(2) in test_animations_omta.html to fix intermittent Android timeout. 2015-04-01 22:11:03 -07: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
df063f161f Bug 847287 patch 7 - Dynamically update cascade results when animations start or stop being in effect. r=birtles
This is an additional part of the main work in this bug; it keeps
mWinsInCascade updated in cases where we need to update it.
2015-03-31 15:05:54 -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
L. David Baron
81ab847386 Bug 847287 patch 1 - Add additional tests. r=birtles
All of the todos will be fixed by later patches in this bug (as will
some already-existing todos in the same file).
2015-03-31 15:05:54 -07:00
L. David Baron
313a709b74 Bug 1090555 - Fix visited link test in test_animations_omta.html to wait for visited link coloring properly. r=birtles
This patch contains two changes:
 (1) The addition of refVisitedLink and the use of
     waitForVisitedLinkColoring() on it.
 (2) Changing the URL of the visited lisks (both visitedLink and
     refVisitedLink) from "" to window.top.location.href, since the
     former doesn't work for Android mochitests while it does work on
     Linux mochitest-e10s.

I tested locally that without the patch I get the failures, and with the
patch the failures go away, using:
./mach mochitest-plain --e10s --setpref layers.acceleration.force-enabled=true --setpref layers.offmainthreadcomposition.async-animations=true layout/style/test/test_animations_omta.html

Further, when running (and passing), I checked that
waitForVisitedLinkColoring() does go through one setTimeout cycle.

Also, I tested that if I effectively revert
https://hg.mozilla.org/mozilla-central/rev/d13154302d77 by changing the
third parameter to the GetContext call in
nsStyleSet::ResolveStyleWithReplacement to be nullptr instead of
visitedRuleNode, I get the failure:
TEST-UNEXPECTED-FAIL | layout/style/test/test_animations_omta.html | visited link background color after animation-only flush - got rgb(255, 255, 0), expected rgb(0, 0, 255)
which confirms that the test is still testing what it was designed to
test.
2015-03-24 19:13:47 -07:00
L. David Baron
844ee17b53 Bug 1125455 patch 7 - For compositor-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
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
beb96f1918 Bug 1125455 patch 3 - Add mochitests for animations overriding transitions. r=birtles
Note that (at this stage) some of the tests in both files fail (which I
have verified locally), as noted by the todos and FIXMEs in the test,
which will be removed in later patches in this bug, as the failures are
fixed.
2015-03-19 21:10:00 -07: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
634de3488b Bug 1125455 patch 7 - For compositor-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
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
9d97e616c7 Bug 1125455 patch 3 - Add mochitests for animations overriding transitions. r=birtles
Note that (at this stage) some of the tests in both files fail (which I
have verified locally), as noted by the todos and FIXMEs in the test,
which will be removed in later patches in this bug, as the failures are
fixed.
2015-03-18 07:35:30 -07:00
Kartikaya Gupta
f735ff5b59 Bug 962594 - Add tests. r=heycam 2015-03-15 20:28:52 -04:00
L. David Baron
bc26f211f6 Bug 960465 patch 17 - Remove separate animation and non-animation phases of restyling. r=birtles
Note that this means that when we start transitions, we post restyles
that are processed during the current restyling operation, rather than
in a later phase.  This depends on patch 11, which makes the transition
manager skip style changes that it posts while starting transitions, to
ensure that this doesn't lead to an infinite loop.  This also depends on
patch 16, which only consumes restyle data for the primary frame, to
ensure that the animation restyles posted are processed properly.  It
also depends on patch 14, which makes us retain data on finished
transitions, to avoid triggering extra transitions on descendants when
both an ancestor and a descendant transition an inherited property, and
the descendant does so faster.

This fixes a known failure in layout/style/test/test_animations.html and
test_animations_omta.html (as visible in the patch).  I believe this is
because this patch changes us to compute keyframe values for animations
on top of a style context *with* animation data rather than one without,
which means what we're computing them on top of changes each time.  (The
purpose of patch 3 was to avoid this in the case where avoiding it
matters, i.e., implicit 0% and 100% keyframes.)
2015-02-17 11:15:05 +13:00
Brian Birtles
9d3da82395 Bug 1070745 part 1 - Factor out new_div etc. to animation_utils.js; r=dholbert
We use new_div, check_events etc. in a number of animation-related mochitests
and with this bug we'll want to use them in a few more. This patch factors them
out into animation_utils.js and tidies them up a little.
2014-10-20 13:55:43 +09:00
Cameron McCormack
332169032c Bug 931668 - Part 23: Change a few test assertion expectations. r=dbaron
--HG--
extra : rebase_source : 7e2be6dd13436dac97425dc91432b69c5a469ddf
2014-09-05 13:48:48 +10:00
L. David Baron
a5f4dcf547 Bug 996796 patch 12 - Fix the visited rule node handling in ResolveStyleWithReplacement. r=heycam
The added test passes locally on Linux with OMT compositing and OMT
animations enabled.  However, it also passes without the patch because
the calls to FlushAnimations and FlushTransitions from
PresShell::FlushPendingNotifications cover up the damage done by bugs in
the animation-only style flush.

Unfortunately due to lack of global history on B2G and not running OMT
animations tests on any other platforms, the new test won't actually run
in automation right now.
2014-08-02 19:37:45 -07:00
Brian Birtles
8480c917d7 Bug 1029969 - Make compositor animation (OMTA) tests ignore floating-point differences; r=dzbarsky 2014-06-27 11:28:51 +09:00
Brian Birtles
72cf77230c Bug 1004377 - Dispatch events for CSS Animations with empty keyframes rules; r=dholbert
This patch removes the check that skipped queueing events for animations
without keyframes since the spec indicates such animations should dispatch
events.

There is a further correctness fix here for the case where a keyframes rule
is modified using the CSSOM so that it becomes empty. Previously when we
came to create the new animation rules we would end up setting
ElementAnimations::mNeedRefreshes to false since we check if the keyframes
rule is empty and if it is we would skip all further processing (including
setting mNeedsRefreshes).

That means that:
(a) We may end up unregistering from the refresh observer so we would never
    dispatch the end event for such an animation.
(b) If the animation was running on the compositor we may never remove it from
    the compositor or may not do it in a timely fashion.

To fix both these problems, this patch removes the check for an empty keyframes
rule so that mNeedsRefreshes is set in this case.
2014-06-12 13:18:14 +09:00
Brian Birtles
dd9b7eee62 Bug 1018862 part 5 - Move paint listener promise wrappers to animation_utils.js; r=dholbert
This patch moves some utility methods from test_animations_omta.html to
animation_utils.js so that they can be used for testing transitions as well.
2014-06-12 13:17:47 +09:00
Brian Birtles
4e4bfaf98f Bug 1018862 part 4 - Move omta_is and friends to animation_utils.js; r=dholbert
This patch simply moves code from test_animations_omta.html to
animation_utils.js so that we can use it for testing transitions as well.
2014-06-12 13:17:47 +09:00
Brian Birtles
eaabbd322b Bug 1018862 part 3 - Fix the order of arguments to omta_is_approx; r=dholbert
This patch simply re-arranges the order of arguments to omta_is_approx so that
the delta sits along side the values being compared.

This, I think, makes more sense and also is more consistent when converting
tests from test_animations.html to test_animations_omta.html since the
"RunningOn" parameter is consistently inserted in the second-to-last position
just before the description for both omta_is and omta_is_approx.
2014-06-12 13:17:47 +09:00
Brian Birtles
11ab984348 Bug 1018862 part 2 - Make new_div no longer secretly flush styles; r=dholbert
This patch removes the line from new_div that forced a style flush. This was
very confusing because:
* It behaved differently to new_div in test_animations.html so copying tests
  over was more complex (particularly when registering for events is involved).
* It meant after setting up initial style using new_div you could just call
  waitForPaints but if you updated style using elem.style you'd need to call
  waitForPaintsFlushed.

In adjusting test_animations_omta.html we are able to simplify the tests
somewhat. This patch also adds a few additional checks that waiting to update
the compositor does not produce different results.
2014-06-12 13:17:47 +09:00
Brian Birtles
28571a4627 Bug 1018862 part 1 - Factor out common async animation test methods; r=dholbert
This patch moves some test utility methods from test_animations_omta.html to
animation_utils.js. It also renames addAsyncTest to addAsyncAnimTest and
likewise for a few other methods.
2014-06-12 13:17:46 +09:00