Commit Graph

804 Commits

Author SHA1 Message Date
Boris Chiou
2718fd0897 Bug 1424134 - Part 3: Implement ComputeSquaredDistance for individual transforms. r=birtles
We manually implement ComputeSquaredDistance for Translate, Rotate, and
Scale because we have to handle mismatch cases, and actually we don't
need to implement it for specified types.

Depends on D11934

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

--HG--
extra : moz-landing-system : lando
2018-11-16 18:58:41 +00:00
Hiroyuki Ikezoe
5e079c773c Bug 1507675 - Rewrite test_animation_performance_warning.html with async/await. r=boris
Depends on D12086

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

--HG--
extra : moz-landing-system : lando
2018-11-16 02:48:41 +00:00
Hiroyuki Ikezoe
a4c04af9af Bug 1507675 - Drop the second argument for then(). r=boris
The second argument should be a callback for reject case.

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

--HG--
extra : moz-landing-system : lando
2018-11-16 02:35:47 +00:00
Boris Chiou
e3efce4cc6 Bug 1501117 - Part 2: Serialize timing function from web animation api with servo. r=emilio,birtles
It's worth to serialize the timing function from web animation api with
servo, too. However, we need an FFI to do that, so this patch also add a
new FFI.

Depends on D10443

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

--HG--
extra : moz-landing-system : lando
2018-11-01 21:33:56 +00:00
Cameron McCormack
a94e23e1cd Bug 1496617 - Part 1: Support unprefixed image-rendering:crisp-edges r=firefox-style-system-reviewers,emilio
For now, we keep supporting the prefixed version, since there are examples/instructions
on the Web that don't include an unprefixed value.

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

--HG--
extra : moz-landing-system : lando
2018-11-01 01:35:26 +00:00
Brian Birtles
8ce29aced8 Bug 1502026 - Only synchronize CSS transitions with CSS transitions; r=hiro
For some content both transitions and animations are triggered simultaneously.
As a result of bug 1301305, if the set of animations includes animations that
affect geometry, then we ensure that any transform animations are run on the
main thread, rather than on the compositor.

However, we have observed some content where this synchronizing is not necessary
and produces unnecessary jank. In the particular cases we have observed,
the transitions and animations do not need to be synchronized so this patch
refines the approach from bug 1301305 to only synchronize within the set of CSS
transitions or the set of non-transition animations.

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

--HG--
extra : moz-landing-system : lando
2018-11-01 00:15:45 +00:00
Mark Banner
a26105ff45 Bug 1501662 - Add more .eslintrc.js files for test directories (dom, modules, netwerk and parser). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D9661

--HG--
extra : moz-landing-system : lando
2018-10-24 19:11:17 +00:00
Brian Birtles
d250a94f0d Bug 1472917 - Fix a couple of typos in transform interpolation tests; r=hiro
Depends on D9182

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

--HG--
extra : moz-landing-system : lando
2018-10-19 04:40:54 +00:00
Emilio Cobos Álvarez
40b1e83d81 Bug 1498734 - Always compute angle values to degrees. r=xidorn
This matches the spec, https://drafts.csswg.org/css-values/#angles, which says:

> All <angle> units are compatible, and deg is their canonical unit.

And https://drafts.csswg.org/css-values/#compat, which says:

>When serializing computed values [...], compatible units [...] are converted into a single canonical unit.

And also other implementations (Blink always serializes angles as degrees in
computed style for example).

Also allows us to get rid of quite a bit of code, and makes computed angle value
representation just a number, which is nice.

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

--HG--
extra : moz-landing-system : lando
2018-10-13 00:41:03 +00:00
shindli
40bae13b28 Backed out changeset 113f6263774f (bug 1495350) for TV failures that turned to tier1 failures in dom/animation/test/mozilla/test_style_after_finished_on_compositor.html 2018-10-04 11:15:37 +03:00
Brian Birtles
461a926291 Bug 1495350 - Adjust fill mode to use on the compositor based on the playback rate; r=hiro
When a compositor animation finishes that doesn't apply a fill, rather than
jumping back to the underlying value immediately we should apply a fill mode
until the main thread has a chance to remove the animation from the compositor.
This ensures that any main thread effects that are intended to synchronize with
the end of the animation have a chance to run before we show the underlying
style and helps to avoid flicker in such cases.

Currently we apply this synthesized fill mode to animations when they run
forwards (i.e. positive playback rate), but not backwards. This patch makes us
apply the same handling when running in reverse.

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

--HG--
extra : moz-landing-system : lando
2018-10-04 05:10:38 +00:00
Boris Chiou
ae2cd2accd Bug 1491954 - Flip boolean half way for path interpolation r=emilio
According to the new svg 2 spec update (#543), we flip the flag half way for
path interpolation.

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

--HG--
extra : moz-landing-system : lando
2018-09-21 18:39:41 +00:00
Zibi Braniecki
83ea94f5ba Bug 1491394 - Update callsites to use new mozILocaleService API. r=jfkthame
Depends on D5924

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

--HG--
extra : moz-landing-system : lando
2018-09-21 15:30:37 +00:00
Emilio Cobos Álvarez
1f3f128954 Bug 1489676 - Teach ComputeSquaredDistance derive about #[animation(constant)]. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D5337
2018-09-11 00:12:49 +02:00
Boris Chiou
a969445b87 Bug 1486094 - Part 4: Write tests for ComputeSquaredDistance on SVGPathData. r=birtles
Add tests for ComputeSquaredDistance on |offset-path:path()|.

Depends on D4791

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

--HG--
extra : moz-landing-system : lando
2018-09-07 22:18:29 +00:00
Brian Birtles
c23be2ef0f Bug 1467344 - Move tests from dom/animations/tests/css-transitions to WPT; r=hiro
--HG--
rename : dom/animation/test/css-transitions/test_animation-computed-timing.html => testing/web-platform/tests/css/css-transitions/AnimationEffect-getComputedTiming.tentative.html
rename : dom/animation/test/css-transitions/test_pseudoElement-get-animations.html => testing/web-platform/tests/css/css-transitions/CSSPseudoElement-getAnimations.tentative.html
rename : dom/animation/test/css-transitions/test_animation-cancel.html => testing/web-platform/tests/css/css-transitions/CSSTransition-canceling.tentative.html
rename : dom/animation/test/css-transitions/test_animation-currenttime.html => testing/web-platform/tests/css/css-transitions/CSSTransition-currentTime.tentative.html
rename : dom/animation/test/css-transitions/test_setting-effect.html => testing/web-platform/tests/css/css-transitions/CSSTransition-effect.tentative.html
rename : dom/animation/test/css-transitions/test_animation-finished.html => testing/web-platform/tests/css/css-transitions/CSSTransition-finished.tentative.html
rename : dom/animation/test/css-transitions/test_animation-ready.html => testing/web-platform/tests/css/css-transitions/CSSTransition-ready.tentative.html
rename : dom/animation/test/css-transitions/test_animation-starttime.html => testing/web-platform/tests/css/css-transitions/CSSTransition-startTime.tentative.html
rename : dom/animation/test/css-transitions/test_csstransition-transitionproperty.html => testing/web-platform/tests/css/css-transitions/CSSTransition-transitionProperty.tentative.html
rename : dom/animation/test/css-transitions/test_document-get-animations.html => testing/web-platform/tests/css/css-transitions/Document-getAnimations.tentative.html
rename : dom/animation/test/css-transitions/test_element-get-animations.html => testing/web-platform/tests/css/css-transitions/Element-getAnimations.tentative.html
rename : dom/animation/test/css-transitions/test_keyframeeffect-getkeyframes.html => testing/web-platform/tests/css/css-transitions/KeyframeEffect-getKeyframes.tentative.html
rename : dom/animation/test/css-transitions/test_effect-target.html => testing/web-platform/tests/css/css-transitions/KeyframeEffect-target.tentative.html
rename : dom/animation/test/css-transitions/test_event-dispatch.html => testing/web-platform/tests/css/css-transitions/event-dispatch.tentative.html
extra : rebase_source : f09d4ff00f5be59ec5f90b211eebb074bdc17781
2018-08-16 14:41:04 +09:00
Brian Birtles
8ad2e56a19 Bug 1467344 - Drop use of flushComputedStyle in css-transitions tests; r=hiro
flushComputedStyle is as follows:

  var cs = getComputedStyle(elem);
  cs.marginLeft;

That _probably_ flushes style in most engines, but it's possible some engine in
the future will optimize things in a way that it can flush marginLeft without
flushing, say, backgroundColor. Before moving these tests to wpt, it would be
better to explicitly flush the property (or at least one of the properties) we
are transitioning.

This patch also updates the "Setting zero combined duration" test from
test_animation-cancel.html since, in making this change, I realized the test was
wrong.

Specifically, it was testing that when we set a combined duration of zero that
a transition is canceled. However, nothing in the spec requires this. The spec
only requires a non-zero combined duration to _start_ a transition and only
cancels an existing transition if the combined duration becomes _zero_ if the
"the end value of the running transition is not equal to the value of the
property in the after-change style".

This test passed, however, because it changed the transition property to
margin-top, hence it was actually testing the same condition as the previous
test.

--HG--
extra : rebase_source : ab1890c3125cb0a136869cd665efd2aa358304f0
2018-08-16 14:41:04 +09:00
Brian Birtles
39f115e905 Bug 1467344 - Update tests in test_setting-effect.html; r=hiro
This patch splits the first test into four separate tests since it really seems
to be testing four different things.

Likewise, the later patch for replacing the effect is split into two parts:

- One to test the playState behavior
- One to test the value reported by transitionProperty

The test, "After setting a transition's effect to null, transitionend is still
dispatched", is dropped since it is covered by the last test in
test_event-dispatch.html.

--HG--
extra : rebase_source : dae7ade8a7217e7916930278050b1c9fae847553
2018-08-16 14:41:03 +09:00
Brian Birtles
7b8fddcb1b Bug 1467344 - Update tests in test_keyframeeffect-getkeyframes.html; r=hiro
This patch merely tidies up some whitespace and uses of quotes / template
strings. There are no substantive changes.

--HG--
extra : rebase_source : 09383565b47c2a6173e1839756058e2b20dfff16
2018-08-16 14:41:03 +09:00
Brian Birtles
e72376bfc3 Bug 1467344 - Update tests in test_animation-element-get-animations.html; r=hiro
This mostly just tidies up these tests to give them sensible titles.

The only test with major substantive changes is the first test. This test tests
three things:

1) That getAnimations() returns one transition per transitioning property
2) That getAnimations() returns transitions in the order they were generated
3) That CSS transitions have their start time set based on when they were
   generated.

(2) is covered later in this file by the test: 'getAnimations sorts
    transitions by when they were generated'
(3) is really a test for startTime, if anything, not getAnimations().
    I'm not sure how necessary it is, but I've added it to
    test_animation-starttime.html for now.

As a result, this patch updates this first test to only cover (1).

--HG--
extra : rebase_source : 992861421e83e8fc391f865888428de22ed16914
2018-08-16 14:41:03 +09:00
Brian Birtles
7c74982678 Bug 1467344 - Tidy up test in test_csstransition-transitionproperty.html; r=hiro
This is mostly whitespace tidy-ups. The only substantive change is the fix to
the test description which previously seemed to be missing some words.

--HG--
extra : rebase_source : 9eb84f5a845ece8fe60d5322de6d5f8a6580c370
2018-08-16 14:41:03 +09:00
Brian Birtles
08d47db33c Bug 1467344 - Update tests in test_animation-starttime.html; r=hiro
Apart from obvious tidy-ups the substantive changes to tests in this file are as
follows:

* Skipping forward through animation
  -> This is really testing two things:
     (a) That you can seek a transition using the start time.
     (b) That seeking a transition using the start time triggers
         dispatching events.

     This patch splits the above into two separate tests.

* Skipping backwards through animation,
  -> All these tests are really just exercising event dispatch which is
     already covered by test_event-dispatch.html.

     As a result this patch drops these tests.

* Setting startTime to null
  -> Covered by 'Setting an unresolved start time sets the hold time'
     in wpt/web-animations/timing-model/animations/setting-the-start-time-of-an-animation.html

* Animation.startTime after pausing
  -> Covered by 'Pausing clears the start time'
     in wpt/web-animations/timing-model/animations/pausing-an-animation.html

--HG--
extra : rebase_source : ed598e907085d1cb06ef2142d6471eec4a34300d
2018-08-16 14:41:03 +09:00
Brian Birtles
92f4d59c41 Bug 1467344 - Update tests in test_animation-ready.html; r=hiro
The test: 'A new ready promise is created each time play() is called the
animation property', is covered in:

  web-animations/interfaces/Animation/ready.html

by the 'A new ready promise is created when play()/pause() is called' test.
As a result, this patch removes that test.

--HG--
extra : rebase_source : 61059b90fec505784b9df67c9b8a2962ca45204b
2018-08-16 14:41:03 +09:00
Brian Birtles
f42870d113 Bug 1467344 - Drop test_animation-pausing.html; r=hiro
This seems to be adequately covered by:

  web-animations/timing-model/animations/pausing-an-animation.html
  (specifically the last test: 'The animation's current time remains fixed
  after pausing')

  web-animations/timing-model/animation-effects/simple-iteration-progress.html
  (which checks that the iteration progress is correctly calculated from the
  current time)

--HG--
extra : rebase_source : 58fc61afb9ae638568f17950723bdba0c758c6a5
2018-08-16 14:41:03 +09:00
Brian Birtles
fd734f45b8 Bug 1467344 - Update tests in test_animation-finished.html; r=hiro
For the first test, we really want to check that it is possible to restart
transitions (since they are otherwise disassociated once they finish) hence this
patch updates the test to the actual output in style rather than timing.

The second test is covered in

  web-animations/timing-model/animations/reversing-an-animation.html

by the 'Playing a finished and reversed animation seeks to end' test so this
patch removes it from this file.

--HG--
extra : rebase_source : 415b8c9ca314085e64ffc715bf72046db264cf52
2018-08-16 14:41:03 +09:00
Brian Birtles
ce2e73ce15 Bug 1467344 - Update tests in test_animation-currenttime.html; r=hiro
This patch basically completely rewrites this file to make it simpler and remove
unnecessary tests.

In particular:

* It sets the duration and delay to 100s to match what we use in most tests
* All the helper methods at the start are inlined into the relevant tests
  because doing so makes the tests much easier to read and debug.
* The first two tests are combined and extended
  - Testing the initial current time is zero is not generally useful but it is
    when we're testing setting it
  - What the second test really wants to test is that the style updates (i.e.
    you really can seek a transition, not just that the currentTime value
    updates)
  - The trick where we set the start time just to get out of the pending state
    seems unnecessary, we may as well just wait on ready. In fact, we don't
    _need_ to do that, but this test is about checking you can seek a transition
    in motion.
* In the fourth test, 'Skipping backwards through transition', we don't check
  the event is dispatched since that is covered in test_event-dispatch.html
  in the 'Active -> Before' test.
* The final test, 'Animation.currentTime after pausing', is covered by
  web-animations/timing-model/animations/pausing-an-animation.html

--HG--
extra : rebase_source : 113af8f3e4b4f2ffe90cb9bb87be3c2e72a82289
2018-08-16 14:41:03 +09:00
Brian Birtles
01f72be8ec Bug 1467344 - Fix some minor formatting in test_animation-computed-timing.html; r=hiro
--HG--
extra : rebase_source : bc27d838e5e1f905852fe847681954e02c2c0624
2018-08-16 14:41:02 +09:00
Brian Birtles
7aa56d6148 Bug 1467344 - Drop some unnecessary <body> elements from test files; r=hiro
We're a bit inconsistent about this, but generally we try to keep this files as
minimal as possible.

There is still a lot of other cruft in the starttime and currenttime test files
but we will remove that when we tidy up those files in later patches in this
series.

--HG--
extra : rebase_source : 93ef290315b4650650de960551ff07572ff7656e
2018-08-16 14:41:02 +09:00
Brian Birtles
e251f1ce8d Bug 1467344 - Update the titles of each test file; r=hiro
--HG--
extra : rebase_source : 4df35b9464ebd90b05303fb908df92c4ad43e024
2018-08-16 14:41:02 +09:00
Brian Birtles
7817c2fe89 Bug 1467344 - Fix the spelling of canceled/canceling in dom/animation/test/css-transitions/; r=hiro
--HG--
extra : rebase_source : 486ed16cf22a6104ec15be455258eab2f902865b
2018-08-16 14:41:02 +09:00
Brian Birtles
e53dbb4a04 Bug 1467344 - Replace var with const/let in dom/animation/test/css-transitions/; r=hiro
--HG--
extra : rebase_source : d98025fe06bff9c486082cf323b99417ae42e6a7
2018-08-16 14:41:02 +09:00
Brian Birtles
32f3f5b4fe Bug 1467344 - Use async/await in dom/animation/test/css-transitions/; r=hiro
As part of this change, the "Restart transition after cancelling transition
immediately" test in test_event-dispatch.html needed significant changes.
The reason is that this test was calling:

  watcher.wait_for([ 'transitioncancel',
                     'transitionrun',
                     'transitionstart' ]);

However, it was not waiting for the result of that call and hence was not
actually checking if the events were being dispatched. And, they are not.

There are two problems. Firstly, this test cancels the transition by setting
display:none. However, transitions don't run on display:none elements so
attempting to restart the transition will not generate transition events.
This might be a bug, but it is not a recent regression in any case (I tested
back to Firefox 54).

However, this test does not require using display:none to cancel. There are
_many_ tests that check that display:none generates a transitioncancel event.
This test only needs to make the transition idle. As a result, this patch makes
that test call transition.cancel() instead.

However, even with that change this test will not pass because it sets
a transition-delay of 100s (presumably so that it does not need to check for
a transitionstart event). As a result this test should not wait on _both_
transitionrun and transitionstart but just transitionrun.

--HG--
extra : rebase_source : a0af0928fd5668b23c92bd8ca142d4b8e99f5429
2018-08-16 14:41:02 +09:00
Brian Birtles
58054bc030 Bug 1467344 - Use arrow functions in dom/animation/test/css-transitions/; r=hiro
This patch also drops the checkStateOnSettingCurrentTimeToZero function since it
is no longer used.

--HG--
extra : rebase_source : bd4fdb9368d55b120c839330dbd90a0a89464370
2018-08-16 14:41:01 +09:00
Brian Birtles
29e984d336 Bug 1483404 - Use "auto" values for unspecified keyframe-specific composite operations; r=smaug
Summary:
This brings our implementation into line with the following spec change:

  ced6b5aac0

See https://github.com/w3c/csswg-drafts/issues/3000

Reviewers: smaug

Tags: #secure-revision

Bug #: 1483404

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

--HG--
extra : rebase_source : 097d8307cea82b5d1ea0345414153965067b2b5b
extra : amend_source : fe1f4aeef842961600fe3dba760a573ed2fc84df
2018-08-15 09:51:28 +09:00
Boris Zbarsky
754087a992 Bug 1446940 part 5. Stop getting docshells from windows via getInterface in dom/editor/etc code. r=kmag 2018-08-01 13:07:11 -04:00
Hiroyuki Ikezoe
9cb3bb79e5 Bug 1479133 - Use AnimationInfo::GetGenerationFromFrame to get the animation generation for WebRender. r=birtles
WebRender has no layers at all.

MozReview-Commit-ID: 7qYE8vONfU9

--HG--
extra : rebase_source : 58e0853ce4f694bfb32e7fa34ef37db6db511185
2018-07-30 11:20:53 +09:00
Hiroyuki Ikezoe
0ffcf23607 Bug 1478643 - Apply change hints for transform animation in the case where the current transform style is 'none' and no change hint produced in AddLayerChangesForAnimation. r=birtles
The applying change hints are the same as what we apply for transform style
changed from something to 'none'.

All test cases pass with this fix fail without the fix.

MozReview-Commit-ID: 7HStU26lRPq

--HG--
extra : rebase_source : 701361d477ab7954ab15fde75fd40d98724e47b3
2018-07-30 11:13:54 +09:00
Hiroyuki Ikezoe
0637266108 Bug 1478643 - Add test cases checking finished opacity animation on the compositor. r=birtles
All test cases here pass without any changes on the current trunk, but all
counter part test cases for transform introducing in a subsequent patch will
fail without the proper fix.

MozReview-Commit-ID: 3hgsVfFJPrZ

--HG--
extra : rebase_source : 535b74c6ddb070af1b1803d966a94bf7ae7bd37d
2018-07-30 10:44:47 +09:00
Hiroyuki Ikezoe
aae11e059f Bug 1479246 - Use z-index for the property running on the main thread instead of background-color. r=boris
background-color animations will run on the compositor.  So we have to change
the property in tests which suppose that background-color animation runs on the
main-thread.

The reason why we use z-index is that the property produces only
nsChangeHint_RepaintFrame, thus it's throttled and won't be unthrottled
periodically on out-of-view elements just like background-color animations.

MozReview-Commit-ID: LZYs0qOGskh

--HG--
extra : rebase_source : f299e46a293db067f771ebd50be34ba9460e8ea7
2018-07-29 15:59:21 +09:00
Brian Birtles
53282fc266 Bug 1478266 - Don't reset pending tasks when setting the target effect to null r=boris
This updates our implementation and tests to match the following spec change:

  2e56cd7d77

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

--HG--
extra : moz-landing-system : lando
2018-07-26 05:20:41 +00:00
Hiroyuki Ikezoe
ba664f7542 Bug 1444816 - Use navigation start time in the case where the refresh driver's time stamp is behind from the start time to avoid negative timelime time at the very beginning of document load. r=birtles
MozReview-Commit-ID: GTnDNRMAWNQ

--HG--
extra : rebase_source : c741ffdd9b90bf1e11ebc3dfc462b60e032aa2f4
2018-07-25 09:41:14 +09:00
Hiroyuki Ikezoe
329ff338de Bug 1444816 - Use assert_greater_than instead of assert_true for time comparison. r=birtles
It would be easier to understand what happens.

MozReview-Commit-ID: 5lidrbNBzFm

--HG--
extra : rebase_source : d4f1e75928cee449f98ee8224b8740b2ba0f9898
2018-07-23 11:34:51 +09:00
Brian Birtles
8ab6ee61ba Bug 1471814 - Add a preference for {Document,Element}.getAnimations(); r=bz,hiro
This is probably the last thing we will ship since it needs the most spec work.

MozReview-Commit-ID: LLmDBLCsCBJ

--HG--
extra : rebase_source : c06752c9201a9ede87e1ac200ab12577bf784ce6
2018-07-14 09:23:03 +09:00
Brian Birtles
35fffc8314 Bug 1471814 - Ignore the composite member on Keyframe objects when the compositing pref is not set; r=hiro
MozReview-Commit-ID: 9Xn32jLlpq1

--HG--
extra : rebase_source : cbc6d4a972295174e26629845497e22fe1a80aa1
2018-07-14 09:23:03 +09:00
Brian Birtles
382fd2fe39 Bug 1471814 - Add a preference for animation composite modes; r=bz,hiro
This feature should not be shipped until the various definitions of addition for
each additive property are properly specified.

Unlike other patches in this series, compositing is not frequently used
internally (e.g. by DevTools etc.) so there is no need to enable this by default
for system code.

Also, it turns out we have inadvertently been shipping part of this feature for
some time now. The next patch in this series will add tests for that case and
disable that part of the feature (a suitable intent to unship will follow). This
patch merely adapts and extends the existing tests without affecting the surface
area covered by the combination of the newly-added pref and the existing
dom.animations-api.core.enabled pref.

MozReview-Commit-ID: Htr6mlyCBav

--HG--
rename : dom/animation/test/mozilla/file_disable_animations_api_core.html => dom/animation/test/mozilla/file_disable_animations_api_compositing.html
rename : dom/animation/test/mozilla/test_disable_animations_api_core.html => dom/animation/test/mozilla/test_disable_animations_api_compositing.html
extra : rebase_source : 7715a25e59568eb122ba3f7dbd2c2b2ffdd19954
2018-07-14 09:23:03 +09:00
Brian Birtles
fc657410ff Bug 1471814 - Add a preference for implicit keyframes; r=bz,hiro
This preference controls whether authors are allowed to specify animations
without a 0% or 100% keyframe.

We intend to ship this soon but this preference acts as a safeguard in case we
discover we need to disable it.

This feature is very convenient and commonly used so this patch ensures it is
always enabled for system content.

MozReview-Commit-ID: BHTsuS2xO61

--HG--
rename : dom/animation/test/mozilla/file_disable_animations_api_core.html => dom/animation/test/mozilla/file_disable_animations_api_implicit_keyframes.html
rename : dom/animation/test/mozilla/test_disable_animations_api_core.html => dom/animation/test/mozilla/test_disable_animations_api_implicit_keyframes.html
extra : rebase_source : 04fd93dd26a4765c14b0b22febdb0311b650ea59
2018-07-14 09:23:03 +09:00
Brian Birtles
5d13151cb9 Bug 1471814 - Add a preference for Web Animations timelines; r=bz,hiro
We don't intend to ship this in the near future until the integration with
AnimationWorklet is clear (although we might ship a read-only version).

That said, we use this feature extensively internally (e.g. in DevTools etc.) so
we enable this feature for system callers.

MozReview-Commit-ID: AhB7ZmU1Xzw

--HG--
extra : rebase_source : 630d7dc56b44a9261bb34aa5417cb9b7050efba4
2018-07-14 09:23:03 +09:00
Brian Birtles
c96dd5e595 Bug 1475162 - Drop pref annotations from tests that no longer need them; r=hiro
Many tests set the dom.animations-api.core.enabled pref to true when all they
really require are the features covered by the dom.element-animate.core.enabled
pref. Now that we have removed that pref and permanently enabled that
functionality we can drop the annotations from such tests.

MozReview-Commit-ID: CGOLp6pVFLE

--HG--
extra : rebase_source : e298e9404d76d55421d9ca4b514410d02cc243b1
2018-07-12 17:22:09 +09:00
Hiroyuki Ikezoe
4abbfa1d61 Bug 1474247 - Call ReschedulePendingtasks when we set a new target to KeyframeEffect. r=birtles
MozReview-Commit-ID: 1n5I6RPKAM5

--HG--
extra : rebase_source : c611c925282a16ec9bbfd184722b0182bf4d1944
2018-07-12 17:05:50 +09:00
Hiroyuki Ikezoe
41c4536a67 Bug 1474247 - Add a test case that the target element changed to another element in the same document. r=birtles
MozReview-Commit-ID: Dgew42GWT5d

--HG--
extra : rebase_source : 4c927d24e03b941d032d78f57ed3eb3bc9193a98
2018-07-12 17:05:49 +09:00
Hiroyuki Ikezoe
0badd2beca Bug 1474247 - Check mPendingState instead of mPendingReadyTime in Animation::ReschedulePendingTasks(). r=birtles
When the pending animation having no target element sets a new effect having
a target element associated with a document, PendingAnimationTracker has to
start tracking the animation regardless of mPendingReadyTime.

MozReview-Commit-ID: DxmbXtLhjCT

--HG--
extra : rebase_source : 46c9a51e7d3b971a0c0ffcf94b579d22450028f5
2018-07-12 17:05:34 +09:00
Hiroyuki Ikezoe
4466a3936f Bug 1474247 - Test cases for animations tracked by the pending animation tracker for Animation::SetEffect, Animation::Cancel() and . r=birtles
MozReview-Commit-ID: 4XzAoylcwpS

--HG--
extra : rebase_source : b800a4d1c2ca831f2f244050a0faaf071043dfc9
2018-07-12 14:42:10 +09:00
Boris Chiou
c8d7bee5ff Bug 1467277 - Avoid getting zero normalized vector of rotate3d for animations. r=hiro
If we have a rotate axis whose length is extremely large, we will get an
infinite value, and its normalized vector is a zero vector, instead of an
unit vector, i.e. (x/inf, y/inf, z/inf) == (0, 0, 0).
The solution is: we scale the vector, so the length becomes a finite value,
and we could get a valid unit vector. Therefore, we use
a different normalization method, robust_normalize().

MozReview-Commit-ID: L8SteFe09aO

--HG--
extra : rebase_source : 4568c8bf906a9246e4ef13672a9ed541852b974a
2018-07-05 15:41:23 -07:00
Hiroyuki Ikezoe
8015da3cef Bug 1472654 - Drop SchedulePaint call in AddAnimationsForProperty. r=birtles
This call was added in bug 929362, but the key factor to fix the bug was just
setting a flag representing that the target frame doesn't allow the animation
running on the compositor and checking the flag in the function whether the
animation can be run on the compositor or not in later ticks.  So the call
wasn't necessary in the first place.

The test case here fails without this fix.  The test case actually doesn't
observe animation restyle count at all, so it might look a bit awkward in
file_restyles.html, if we add other test cases checking SchedulePaint calls
in future, we will move the tests in a different file.
(The reason there is no animation restyles in this case is that we properly
 throttle the animation in this case.)

MozReview-Commit-ID: AyHciRJHM0s

--HG--
extra : rebase_source : f3963336ea9165b0a9c1a662bdac5c645b209219
2018-07-05 07:18:45 +09:00
Hiroyuki Ikezoe
b4fed9e95d Bug 1246045 - Throttle animations in out-of-view iframe. r=birtles
Before this change, we don't acend up frame tree across different documents,
but it's possible that subframe document is scrolled out in the parent document,
if there are animations in such subframes, we should throttle the animations
too.

The test case added here fails without this fix.

MozReview-Commit-ID: EdOEVEwomPc

--HG--
extra : rebase_source : 4d6366cf609d9269ec05b3722f5adb21d940a9e3
2018-06-29 10:01:26 +09:00
Hiroyuki Ikezoe
2eca924126 Bug 1471106 - Set overflow:hidden to body element to avoid accidentally unthrottling animations to update the overflow region. r=birtles
MozReview-Commit-ID: CtcgyUq37W5

--HG--
extra : rebase_source : 84015639f21f2acbb544ea7ab0bed1e78e003549
2018-06-27 15:21:48 +09:00
Hiroyuki Ikezoe
5a526baa41 Bug 1471174 - Drop opacity value that was for preventing the animations run on the compositor and check the animation is NOT running on the compositor. r=birtles
Because now we don't try to send the animations on visibility:hidden element.

MozReview-Commit-ID: IFqIc8ewz5T

--HG--
extra : rebase_source : ed031b3a55fd89f74437b71812f90dfc1825e823
2018-06-27 09:40:55 +09:00
Hiroyuki Ikezoe
5bb979bdfb Bug 1471174 - Don't try to send invisible animations that we already throttled on the main thread. r=birtles
Even if we unthrottled the invisbile animations to update the overflow region,
we don't need to send the animations to the compositor since the scroll bar
updates caused by the overflow should have been finished before sending
animations to the compositor.

MozReview-Commit-ID: GtKdPfBSyRB

--HG--
extra : rebase_source : 3b15f4578ed60740c1409304fe35ecd4f53fbd5b
2018-06-27 09:40:52 +09:00
Emilio Cobos Álvarez
b8c809c60e Bug 1430884: followup: Fix some typos in file_restyles.html. r=me
MozReview-Commit-ID: 4P5EC1R1i0z
2018-06-25 21:19:42 +02:00
Hiroyuki Ikezoe
31001ebaf6 Bug 1430884 - Don't call UpdateVisibleDescendants for placeholder frames. r=birtles,heycam
The styles for placeholder frames differ from the styles for the real frames so
that the styles don't have visibility:hidden even if the parent has
visibility:hidden style.

The placeholder style is resolved by ServoStyleSet::ResolveStyleForPlaceholder
in nsCSSFrameConstructor::CreatePlaceholderFrameFor.

MozReview-Commit-ID: GgFn5VJOvcl

--HG--
extra : rebase_source : a32771f5bb6c6862e483fe36a2060d604ee2413d
2018-06-25 18:29:44 +09:00
Hiroyuki Ikezoe
fbf7fab2f3 Bug 1430884 - Throttle transform animations without %0 or 100% keyframe. r=birtles
MozReview-Commit-ID: 3vLAlSkLz97

--HG--
extra : rebase_source : 7a82246699f3858757dce887e0d2154d165c0da1
2018-06-25 18:29:28 +09:00
Hiroyuki Ikezoe
10960cad13 Bug 1430884 - Throttle nsChangeHint_UpdateContainingBlock on invisible element. r=birtles
When an animation targets a CSS property that could cause a containing block to
be generated for its descendants, this containing block must be generated even
if the particular property values used by the animation would not normally
trigger generation of a containing block (e.g. transform: none).  This is due
to the implicit application of will-change defined in CSS Animations[1] and Web
Animations[2].

Since this containing block is generated at the start of the animations, we can
throttle animations that produce the UpdateContainingBlock change hint for
animations that are not visible since they shouldn't have any further side
effects beyond the generation of containing blocks (which have already happened).

[1] https://drafts.csswg.org/css-animations/#animations
[2] https://drafts.csswg.org/web-animations-1/#side-effects-section


Unfortunately perspective animations starting with 'none' and transform
animations from 'none' to 'none' don't create a containing block (bug 1470349
and bug 1470370).  That doesn't block the optimization in this patch, however,
since those bugs occur regardless of element visibility.

MozReview-Commit-ID: 8rTl8dShHrD

--HG--
extra : rebase_source : 886b003d0f3c555a12baf0de81b4130ef2d71e82
2018-06-25 18:29:09 +09:00
Hiroyuki Ikezoe
636e9381d5 Bug 1430884 - Throttle animations producing nsChangeHint_UpdateOverflow change hint if the target element is not visible. r=birtles
In the case where the target element is scrolled out or visibility:hidden and
has no visible descendants, we can treat nsChangeHint_UpdateOverflow just like
transform animations which produce nsChangeHint_UpdatePostTransformOverflow,
i.e. unthrottle the animations periodically if the target element is inside a
scrollable element.  Some transform animations produce UpdateOverflow hint,
so it would be really nice to optimize the hint.

MozReview-Commit-ID: E1MgPZRi8mW

--HG--
extra : rebase_source : d29a29e137742f88a64b3b18a5a7d4e64e76f54f
2018-06-25 11:50:56 +09:00
Hiroyuki Ikezoe
79b444cd26 Bug 1430884 - Use const/let in file_restyles.html. r=birtles
MozReview-Commit-ID: F2o2y33KV75

--HG--
extra : rebase_source : c390b70fe8ee9bf55b0fb718818467da95fe3c85
2018-06-25 06:07:15 +09:00
Margareta Eliza Balazs
e1ea59be60 Backed out 9 changesets (bug 1430884) for frequently failing dom/animation/test/mozilla/test_restyles.html on android-em-4-3-armv7-api16 debug
Backed out changeset 262dbc8daac1 (bug 1430884)
Backed out changeset c3f9f3f66a98 (bug 1430884)
Backed out changeset 39e1c4e3c8c9 (bug 1430884)
Backed out changeset 4505e3f87b2e (bug 1430884)
Backed out changeset e7e8977e0e92 (bug 1430884)
Backed out changeset 6dbae2b8957d (bug 1430884)
Backed out changeset 1e047fbcae2a (bug 1430884)
Backed out changeset 52be07f10eaa (bug 1430884)
Backed out changeset cec68a5b01da (bug 1430884)

--HG--
extra : rebase_source : 9877dce2438d42eca99898b22c95ecc04dbd748f
2018-06-25 12:23:59 +03:00
Hiroyuki Ikezoe
ba1228b549 Bug 1430884 - Don't call UpdateVisibleDescendants for placeholder frames. r=birtles,heycam
The styles for placeholder frames differ from the styles for the real frames so
that the styles don't have visibility:hidden even if the parent has
visibility:hidden style.

The placeholder style is resolved by ServoStyleSet::ResolveStyleForPlaceholder
in nsCSSFrameConstructor::CreatePlaceholderFrameFor.

MozReview-Commit-ID: GgFn5VJOvcl

--HG--
extra : rebase_source : 5ea5b101fff03cb2a834e218f4e6df0a0527dfdb
2018-06-25 11:51:06 +09:00
Hiroyuki Ikezoe
6d104540fb Bug 1430884 - Throttle transform animations without %0 or 100% keyframe. r=birtles
MozReview-Commit-ID: 3vLAlSkLz97

--HG--
extra : rebase_source : 424a94ace113c3383fd91300802973ba60da5f7d
2018-06-25 11:51:06 +09:00
Hiroyuki Ikezoe
2ae0dce721 Bug 1430884 - Throttle nsChangeHint_UpdateContainingBlock on invisible element. r=birtles
When an animation targets a CSS property that could cause a containing block to
be generated for its descendants, this containing block must be generated even
if the particular property values used by the animation would not normally
trigger generation of a containing block (e.g. transform: none).  This is due
to the implicit application of will-change defined in CSS Animations[1] and Web
Animations[2].

Since this containing block is generated at the start of the animations, we can
throttle animations that produce the UpdateContainingBlock change hint for
animations that are not visible since they shouldn't have any further side
effects beyond the generation of containing blocks (which have already happened).

[1] https://drafts.csswg.org/css-animations/#animations
[2] https://drafts.csswg.org/web-animations-1/#side-effects-section


Unfortunately perspective animations starting with 'none' and transform
animations from 'none' to 'none' don't create a containing block (bug 1470349
and bug 1470370).  That doesn't block the optimization in this patch, however,
since those bugs occur regardless of element visibility.

MozReview-Commit-ID: 8rTl8dShHrD

--HG--
extra : rebase_source : f2f89c8ad074f1ad73ebd5652311d22e71cf7344
2018-06-25 11:51:06 +09:00
Hiroyuki Ikezoe
72d2033486 Bug 1430884 - Throttle animations producing nsChangeHint_UpdateOverflow change hint if the target element is not visible. r=birtles
In the case where the target element is scrolled out or visibility:hidden and
has no visible descendants, we can treat nsChangeHint_UpdateOverflow just like
transform animations which produce nsChangeHint_UpdatePostTransformOverflow,
i.e. unthrottle the animations periodically if the target element is inside a
scrollable element.  Some transform animations produce UpdateOverflow hint,
so it would be really nice to optimize the hint.

MozReview-Commit-ID: E1MgPZRi8mW

--HG--
extra : rebase_source : d29a29e137742f88a64b3b18a5a7d4e64e76f54f
2018-06-25 11:50:56 +09:00
Hiroyuki Ikezoe
ba3a54d369 Bug 1430884 - Use const/let in file_restyles.html. r=birtles
MozReview-Commit-ID: F2o2y33KV75

--HG--
extra : rebase_source : c390b70fe8ee9bf55b0fb718818467da95fe3c85
2018-06-25 06:07:15 +09:00
Dan Glastonbury
143a0b32a3 Bug 1467621 - P4: Fix distance for drop-shadow with currentcolor. r=hiro
MozReview-Commit-ID: 9L9rkPAROqG

--HG--
extra : rebase_source : 683a390502658b79e85fe129b6f364ad66b50cf6
2018-06-22 11:17:04 +10:00
Hiroyuki Ikezoe
7cd41518c9 Bug 1468294 - Double f64::EPSILON for calculation error. r=birtles
It's possible that both this_weight and other_weght have calculation errors
which are approximately equal to f64::EPSILON.

MozReview-Commit-ID: 8OddG9rI3qd

--HG--
extra : rebase_source : 9c22d17dcfb8efea7276864502344dc4981c358a
2018-06-13 06:42:14 +09:00
Joel Maher
50b91c0a14 Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
Hiroyuki Ikezoe
c1fc73bb2d Bug 1253164 - Make nsIFrame allow running async animations once the frame is able able to run animations on the compositor again. r=birtles
For example, we don't run transform animations on large frames but once
the frame size is small enough we should run transform animations on the frame.

MozReview-Commit-ID: DkfB9g2Gcdi

--HG--
extra : rebase_source : 93a884c3063d4a6c2626e6695583664b24fe11c8
2018-06-07 09:30:33 +09:00
Brian Birtles
b6222ec571 Bug 1466031 - Move CSS animations / Web animation integration tests to web-platform-tests; r=hiro
--HG--
rename : dom/animation/test/css-animations/test_cssanimation-animationname.html => testing/web-platform/tests/css/css-animations/CSSAnimation-animationName.tentative.html
rename : dom/animation/test/css-animations/test_animation-cancel.html => testing/web-platform/tests/css/css-animations/CSSAnimation-canceling.tentative.html
rename : dom/animation/test/css-animations/test_setting-effect.html => testing/web-platform/tests/css/css-animations/CSSAnimation-effect.tentative.html
rename : dom/animation/test/css-animations/test_animation-finished.html => testing/web-platform/tests/css/css-animations/CSSAnimation-finished.tentative.html
rename : dom/animation/test/css-animations/test_animation-computed-timing.html => testing/web-platform/tests/css/css-animations/CSSAnimation-getComputedTiming.tentative.html
rename : dom/animation/test/css-animations/test_animation-currenttime.html => testing/web-platform/tests/css/css-animations/CSSAnimation-getCurrentTime.tentative.html
rename : dom/animation/test/css-animations/test_animation-id.html => testing/web-platform/tests/css/css-animations/CSSAnimation-id.tentative.html
rename : dom/animation/test/css-animations/test_animation-pausing.html => testing/web-platform/tests/css/css-animations/CSSAnimation-pausing.tentative.html
rename : dom/animation/test/css-animations/test_animation-playstate.html => testing/web-platform/tests/css/css-animations/CSSAnimation-playState.tentative.html
rename : dom/animation/test/css-animations/test_animation-ready.html => testing/web-platform/tests/css/css-animations/CSSAnimation-ready.tentative.html
rename : dom/animation/test/css-animations/test_animation-starttime.html => testing/web-platform/tests/css/css-animations/CSSAnimation-startTime.tentative.html
rename : dom/animation/test/css-animations/test_pseudoElement-get-animations.html => testing/web-platform/tests/css/css-animations/CSSPseudoElement-getAnimations.tentative.html
rename : dom/animation/test/css-animations/test_document-get-animations.html => testing/web-platform/tests/css/css-animations/Document-getAnimations.tentative.html
rename : dom/animation/test/css-animations/test_animations-dynamic-changes.html => testing/web-platform/tests/css/css-animations/Element-getAnimations-dynamic-changes.tentative.html
rename : dom/animation/test/css-animations/test_element-get-animations.html => testing/web-platform/tests/css/css-animations/Element-getAnimations.tentative.html
rename : dom/animation/test/css-animations/test_keyframeeffect-getkeyframes.html => testing/web-platform/tests/css/css-animations/KeyframeEffect-getKeyframes.tentative.html
rename : dom/animation/test/css-animations/test_effect-target.html => testing/web-platform/tests/css/css-animations/KeyframeEffect-target.tentative.html
rename : dom/animation/test/css-animations/test_event-dispatch.html => testing/web-platform/tests/css/css-animations/event-dispatch.tentative.html
rename : dom/animation/test/css-animations/test_event-order.html => testing/web-platform/tests/css/css-animations/event-order.tentative.html
rename : dom/animation/test/testcommon.js => testing/web-platform/tests/css/css-animations/support/testcommon.js
extra : rebase_source : 87f112f3018504414a7d6d17d66c4980b58017d0
2018-06-04 10:20:58 +09:00
Brian Birtles
11ca5452f9 Bug 1466031 - Update test_setting-effect.html; r=hiro
Apart from whitespace / test description tests this patch also drops an
assertion about the animation playState since it seems unrelated to the purpose
of that particular test.

--HG--
extra : rebase_source : 73be030dd1dc98ae1facd9c2b80dd1b5bcbf04eb
2018-06-04 10:20:57 +09:00
Brian Birtles
260853229a Bug 1466031 - Update test description in test_pseudoElement-get-animations.html; r=hiro
--HG--
extra : rebase_source : 3db36e712c7b002e01c15443cef31ed004fac19d
2018-06-04 10:20:57 +09:00
Brian Birtles
2509ef01f9 Bug 1466031 - Update test_element-get-animations.html; r=hiro
As well as addressing a few FIXMEs this patch drops the checking of start times
since that seems out of scope for this file and is covered elsewhere (I believe
we only added it at first to bootstrap this work).

--HG--
extra : rebase_source : daa067147d6833880deb59b3d270ca122999a64f
2018-06-04 10:20:57 +09:00
Brian Birtles
141d6a3152 Bug 1466031 - Update test_animations-dynamic-changes.html; r=hiro
--HG--
extra : rebase_source : 946d2c211e466a5abc05810ab5717b881875c768
2018-06-04 10:20:57 +09:00
Brian Birtles
284e3445aa Bug 1466031 - Update test_animation-starttime.html; r=hiro
This patch updates the tests in this file as follows:

* startTime of a newly created (play-pending) animation is unresolved
  -> Covered by 'startTime of a play-pending animation is unresolved'
     in wpt/web-animations/interfaces/Animation/startTime.html

     However, it would be useful to have a test a new CSS animation is
     play-pending so I have extended the test in test_animation-playstate.html
     to cover this.

* startTime of a newly created (pause-pending) animation is unresolved
  -> Covered by 'startTime of a pause-pending animation is unresolved'
     in wpt/web-animations/interfaces/Animation/startTime.html

* startTime is resolved when running
  -> Covered by 'startTime is resolved when running'
     in wpt/web-animations/interfaces/Animation/startTime.html

* startTime is unresolved when paused
  -> Moved to wpt/web-animations/timing-model/animations/pausing-an-animation.html

* startTime while pause-pending and play-pending
  -> Moved to wpt/web-animations/timing-model/animations/pausing-an-animation.html

* startTime while play-pending from finished state,
  startTime while play-pending from finished state using finish()
  -> Merged and moved to wpt/web-animations/timing-model/animations/playing-an-animation.html

* Pausing should make the startTime become null
  -> Simplified and merged into the test for 'startTime is unresolved when
     paused' / 'Pausing clears the start time' test in
     wpt/web-animations/timing-model/animations/pausing-an-animation.html

* Sanity test to check round-tripping assigning to a new animation's startTime
  -> Updated and left.

* Skipping forward through animation
  -> This is really testing two things:
     (a) That you can seek a CSS animation using the start time.
         For this it makes sense to have a separate test that also checks that
         the computed style is updated (like we have for current time).
     (b) That seeking a CSS animation using the start time triggers
         dispatching events.

     This patch splits the above into two separate tests.

* Skipping backwards through animation,
  Redundant change, before -> active, then back,
  Redundant change, before -> after, then back,
  Redundant change, active -> before, then back,
  Redundant change, active -> after, then back,
  Redundant change, after -> before, then back,
  Redundant change, after -> active, then back
  -> All these tests are really just exercising event dispatch which is
     already covered by test_event-dispatch.html.

     Provided we have a test that checks that events are dispatched when
     setting the startTime we don't need to test each combination again since
     we have tests for each of these combinations already when using the
     currentTime to seek and we can assume UAs are following the same code
     path at this point.

     As a result this patch drops these tests.

* Setting startTime to null
  -> Covered by 'Setting an unresolved start time sets the hold time'
     in wpt/web-animations/timing-model/animations/setting-the-start-time-of-an-animation.html

* Animation.startTime after pausing
  -> Covered by the new 'Pausing clears the start time' test in
     wpt/web-animations/timing-model/animations/pausing-an-animation.html

* Animation.startTime after canceling
  -> Merged into
     wpt/web-animations/timing-model/animations/canceling-an-animation.html
     and made it follow the spec a little more closely (which requires
     clearing the start time and hold time).

--HG--
extra : rebase_source : 9bb3d82e18e5c2d9654576502a1d4263a1e46daa
2018-06-04 10:20:57 +09:00
Brian Birtles
3a94426531 Bug 1466031 - Move the reversing test to Web Animations web-platform-tests; r=hiro
--HG--
extra : rebase_source : f2d1fda92736cc07d2535e06dd7f35673a7d3562
2018-06-04 10:20:56 +09:00
Brian Birtles
4dfeec9f3c Bug 1466031 - Tidy up test_animation-ready.html; r=hiro
Although many of these tests are similar to tests in the Web Animations
web-platform-tests test suite they focus on the interaction with
animation-play-state and so are probably worth keeping.

There are two exceptions that I felt were worth changing:

* The test for the handling of a ready promise on an aborted pause. I could not
  find a similar test in the Web Animations wpt and the test is not really
  particular to CSS animations so this patch moves it to Web Animations wpt.

* The test for the resolution value of the ready promise for a paused animation
  is covered by the "A pending ready promise should be resolved and not replaced
  when the animation is paused" in pausing-an-animation.html in the Web
  Animations wpt (although peripherally) and that seems like the better place
  for this test anyway (it is not specific to CSS animations) so I have simply
  deleted it from this file.

--HG--
extra : rebase_source : b803572692c70fced551d4343ac241068b6f0057
2018-06-04 10:20:56 +09:00
Brian Birtles
e8003d01b4 Bug 1466031 - Tidy up test_animations-playstate.html; r=hiro
--HG--
extra : rebase_source : e0b70521af1f0faa292d4d46e22d0c870bacde45
2018-06-04 10:20:56 +09:00
Brian Birtles
4c2ded77b8 Bug 1466031 - Tweak whitespace in test_animation-id.html; r=hiro
This just makes the grouping a little more clear I think.

--HG--
extra : rebase_source : 67749506b5befd705cd29331383066e5fe25afef
2018-06-04 10:20:55 +09:00
Brian Birtles
5becd5775e Bug 1466031 - Tidy up test_animation-finished.html; r=hiro
This mostly just involves using promise_rejects to simplify some test code.

The change to the test description of the last test might seem like it is giving
it the opposite meaning but the original test name was "Test finished promise
changes when animationPlayState set to running"[1], and it is about testing
that there are NO changes but that got lost when the "Test" part of the
description was dropped.


[1] https://searchfox.org/mozilla-central/rev/cb846d13d3f9ec5d38ace93a74f749a18e9c67f5/dom/animation/test/css-animations/test_animation-player-finished.html#287

--HG--
extra : rebase_source : e318bd236f522e612a8717c4b7b871b1dd74ed54
2018-06-04 10:20:55 +09:00
Brian Birtles
3c5785da47 Bug 1466031 - Drop test_animation-finish.html; r=hiro
These tests are all covered elsewhere:

* The "Test exceptions when finishing infinite animation" test is covered by
  the "Finishing an infinite animation throws" test in
  finishing-an-animation.html in the Web Animations web-platform-tests.
* The "Test finish() while paused" test is covered by the "Finishing a paused
  animation resolves the start time" test in finishing-an-animation.html in
  the Web Animations web-platform-tests.
* The "Test finish() while pause-pending with positive playbackRate" test is
  covered by the "Finishing a pause-pending animation resolves the pending
  task immediately and update the start time" test in
  finishing-an-animation.html in the Web Animations web-platform-tests.
* The 'Test finish() while pause-pending with negative playbackRate" test is
  covered by the "Finishing a pause-pending animation with negative playback
  rate resolves the pending task immediately" test in
  finishing-an-animation.html in the Web Animations web-platform-tests.

In fact, it very much looks like these tests were copied to Web Animations'
web-platform-tests at some point without deleting the original.

--HG--
extra : rebase_source : d63b1c3ca7548e7f4f27c607e4671691094ddd86
2018-06-04 10:20:55 +09:00
Brian Birtles
8f39ae4272 Bug 1466031 - Re-arrange tests in test_animations-currenttime.html; r=hiro
A number of these tests are redundant with other tests or are otherwise
unnecessary. Other tests should be moved to a more appropriate file.

Some notable examples:

* A number of the tests relate to dispatching events in various phases and have
  been moved to test_event-dispatch.html.
* The "Seeking finished -> paused dispatches animationstart" test is covered
  by the "After -> Active" test in test_event-dispatch.html (which also
  operates on a paused animation).
* The "Animation.currentTime clamping" is really just testing finishing
  behavior and is covered by the updating-the-finished-state.html tests in the
  Web Animations web-platform-tests (specifically the "Updating the finished
  state when playing past end" test).
* Likewise for the "Animation.currentTime clamping for reversed animation"
  test.

--HG--
extra : rebase_source : 949ec7e12396fa97c741c7cc90abb3ff64cc7ab7
2018-06-04 10:20:55 +09:00
Brian Birtles
a07b093a4b Bug 1466031 - Apply various whitespace tweaks to test_animation-computed-timing.html; r=hiro
--HG--
extra : rebase_source : 93a14e6329309f8ef09614c62ad57b7941235dcc
2018-06-04 10:20:55 +09:00
Brian Birtles
0d0f48e374 Bug 1466031 - Update the titles of each test file; r=hiro
Some of these names will make more sense after the renaming of files towards the
end of this patch series.

Also a couple of files do not have titles added since they will be subsequently
removed.

--HG--
extra : rebase_source : 6ba046f9c1cc2e062d5aa7f7a49b791ef7ee7e83
2018-06-04 10:20:55 +09:00
Brian Birtles
3b45943212 Bug 1466031 - Fix the spelling of canceled/canceling in dom/animation/test/css-animations/; r=hiro
--HG--
extra : rebase_source : 63090a905d293df990f69ab434aab8c5f08e4c08
2018-06-04 10:20:55 +09:00
Brian Birtles
5f1c559e1f Bug 1466031 - Use for ... of instead of forEach in a few places in dom/animation/test/css-animations/; r=hiro
--HG--
extra : rebase_source : 625bbff718339ae0943664dd26d8ca693b8eb02a
2018-06-04 10:20:54 +09:00
Brian Birtles
d0fae9ac7e Bug 1466031 - Use async/await in dom/animation/test/css-animations/; r=hiro
--HG--
extra : rebase_source : aa428787355384b9dc01f8c312adc03aeadb6b28
2018-06-04 10:20:54 +09:00
Brian Birtles
cd3afc3d8a Bug 1466031 - Replace var with const/let in dom/animation/test/css-animations/; r=hiro
--HG--
extra : rebase_source : e6d69231e8825491a6f2b6713ce6ad0655658aee
2018-06-04 10:20:54 +09:00
Brian Birtles
e190516708 Bug 1466031 - Use arrow functions in dom/animation/test/css-animations/; r=hiro
--HG--
extra : rebase_source : 2446c48d66750142e5c3a544f115beb859043ac8
2018-06-04 10:20:54 +09:00
Hiroyuki Ikezoe
ad0bca6be5 Bug 1395971 - Wait for animation being ready to restyle. r=birtles
MozReview-Commit-ID: LqZGaxs4UIB

--HG--
extra : rebase_source : b3b1cfe3ff5bb9c858bc0c3f77e57b557c8e536e
2018-06-01 07:35:52 +09:00
Hiroyuki Ikezoe
352bf6d239 Bug 1395971 - Use await/async in file_deferred_start.html. r=birtles
MozReview-Commit-ID: GkbZ9R0LXL2

--HG--
extra : rebase_source : c302077d62da69f0e78b068ad8c0100e74d3921a
2018-06-01 05:21:22 +09:00
Hiroyuki Ikezoe
e08f3b2a13 Bug 1395971 - Use arrow function in file_deferred_start.html. r=birtles
MozReview-Commit-ID: 9o1M78IOB1c

--HG--
extra : rebase_source : 1b5c22eede3822cf3a05ad8ab2611f77d9e3ad99
2018-06-01 05:21:22 +09:00
Hiroyuki Ikezoe
1d990aba9c Bug 1413370 - Drop isAndroid variable in file_restyles.html. r=birtles,boris
It's no longer used since bug 1458841.

MozReview-Commit-ID: 38UlQjtOVvo

--HG--
extra : rebase_source : 30ba69a8bad21c619b3f9ce139bd5a882bdf98b1
2018-05-30 18:21:18 +09:00
Hiroyuki Ikezoe
fa97dda579 Bug 1458841 - Use waitForAnimationReadyToRestyle wherever we wait for animation.ready right after animation creation. r=birtles
Previously we used the tweakExpectedRestyleCount function (replaced by the
waitForAnimationReadyToRestyle function in the previous patch) only in cases
where we were actually expecting restyles to happen.  For cases where we don't
expect restyles, i.e. cases where we assert the restyle count is zero, we
didn't use this method meaning we didn't bother checking if there was a restyle
expected for the current frame or not.

Since we normally wait for 5 frames anyway before checking that there have been
no restyles, failing to count the number of frames and waiting only 4 frames is
not a problem.  However, if a new test were added that just copied this code and
only waited one frame, it might fail to test what it intended.  So, to avoid
possible future bugs and in order to be more consistent with tests that do
expect restyles, this patch replaces a number of uses animation.ready with
waitForAnimationReadyToRestyle.

MozReview-Commit-ID: 7qBmobTKolh

--HG--
extra : rebase_source : baa272102fed7a66cc4fc89f6d63ba0333087a2d
2018-05-30 09:48:10 +09:00
Hiroyuki Ikezoe
272b797238 Bug 1458841 - Introduce a utility function that waits for a given animation being ready to be restyle. r=birtles
And replace tweakExpectedRestyleCount with the function.

MozReview-Commit-ID: 96jC9looyZq

--HG--
extra : rebase_source : 7dae8b258b874a9b366767a6e49de83bf2caccc9
2018-05-30 09:41:47 +09:00