Commit Graph

1698 Commits

Author SHA1 Message Date
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
Emilio Cobos Álvarez
1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Cosmin Sabou
1bc774a842 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-01 12:44:57 +03:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02: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
Hiroyuki Ikezoe
6d4ad6222a Bug 1458841 - Remove test code for the old microtask behavior. r=birtles
MozReview-Commit-ID: ACNgQ0EWrKI

--HG--
extra : rebase_source : 8b628a7e80fa3d0e8d8de53e492eb521d112d0e6
2018-05-30 09:39:18 +09:00
Hiroyuki Ikezoe
a28e0be181 Bug 1463605 - Call MarkNeedsDisplayItemRebuild() for IB split siblings too. r=mattwoodrow
MozReview-Commit-ID: 4vN69YLUbIy

--HG--
extra : rebase_source : dfb73c8d92395a18bbaeb1e68b60ea715e0ecbb4
2018-05-23 18:15:12 +09:00
Hiroyuki Ikezoe
452c7f0e9a Bug 1463605 - Set mMayHaveOpacityAnimation and mMayHaveTransformAnimation flag to continuation or IB split sibling frames too. r=birtles
Without this fix layout/reftests/css-animations/ib-split-sibling-opacity.html
would have failed if the next change in this patch series is applied.

MozReview-Commit-ID: CFNXePkXuOs

--HG--
extra : rebase_source : 48df6bf107e1a14dd2b2ae7c23d38d29581aabcb
2018-05-23 18:15:12 +09:00
Brian Birtles
af7674e36b Bug 1456394 - Drop AnimationEffectTiming(ReadOnly) interfaces; r=bz,hiro
MozReview-Commit-ID: KKqAWemDXwv

--HG--
extra : rebase_source : 22541fef1d5286510a44591ec0eb4b43832a76a0
2018-05-07 12:58:37 +09:00
Brian Birtles
3c006b6e4c Bug 1456394 - Use updateTiming() in animation tests; r=hiro
We will remove animation.effect.timing in the next patch.

MozReview-Commit-ID: EyeFNM81NbN

--HG--
extra : rebase_source : 9fe5eb0e5d141ffffa017db255328c742a059611
2018-05-07 12:58:37 +09:00
Brian Birtles
f8118acf9a Bug 1456394 - Make TimingParameters::operator== compare end delay values; r=hiro
MozReview-Commit-ID: 5frk5APUTDd

--HG--
extra : rebase_source : 4d9d88963e3590ac14d8a243c4494c71e723a6f1
2018-05-07 12:42:24 +09:00
Brian Birtles
8dc6ef2391 Bug 1456394 - Add AnimationEffect.updateTiming(); r=bz,hiro
https://drafts.csswg.org/web-animations-1/#dom-animationeffect-updatetiming

MozReview-Commit-ID: ISgksSpH8yH

--HG--
extra : rebase_source : 0b9c03adba9c9068fa3ec1ff06541d587576a29f
2018-05-07 12:37:11 +09:00
Brian Birtles
4ab18a6435 Bug 1456394 - Factor out TimingParams::FromEffectTiming; r=hiro
Factoring out this method makes the code a little easier to read, particularly
when in the next patch in this series we add
a TimingParams::MergeOptionalEffectTiming method.

MozReview-Commit-ID: 5AU6IfN2grZ

--HG--
extra : rebase_source : f90614c7dd03413b4ce05d62d3ac73f0ba0e7dc3
2018-05-07 12:34:47 +09:00
Brian Birtles
79bd9b3a55 Bug 1456394 - Add AnimationEffect.getTiming(); r=bz,hiro
https://drafts.csswg.org/web-animations-1/#dom-animationeffect-gettiming

MozReview-Commit-ID: 8gnd5Gl0UkK

--HG--
extra : rebase_source : 12d28eac599bb2462ef8e6b32cf75e8bd14262eb
2018-05-07 12:32:38 +09:00
Brian Birtles
516b224d43 Bug 1456394 - Rename animation timing dictionaries; r=bz
As per the changes in:

  d4519d9bba (diff-4c9f5c055fb219a7fcad23a9a7a80b64R4206)

MozReview-Commit-ID: Iwvbp0H6jlg

--HG--
extra : rebase_source : 2c8bbab7aee617b65e5a7647ed146abdb0dde2d6
2018-05-07 12:09:54 +09:00
Brian Birtles
f8c518344a Bug 1456394 - Rename AnimationEffectReadOnly to AnimationEffect; r=bz,hiro
MozReview-Commit-ID: 8jzJiCWt5vs

--HG--
rename : dom/animation/AnimationEffectReadOnly.cpp => dom/animation/AnimationEffect.cpp
rename : dom/animation/AnimationEffectReadOnly.h => dom/animation/AnimationEffect.h
rename : dom/webidl/AnimationEffectReadOnly.webidl => dom/webidl/AnimationEffect.webidl
extra : rebase_source : 2bd6490fe9be47cfb760bda81a63c33ba0b0397d
2018-05-07 11:15:16 +09:00
Brian Birtles
3184f30162 Bug 1456394 - Merge KeyframeEffectReadOnly and KeyframeEffect; r=bz,hiro
MozReview-Commit-ID: FvTMGjxfRXk

--HG--
extra : rebase_source : 8f7fd0903c9ca2f545dce2633eb797345a7517f8
2018-05-07 11:08:59 +09:00
Brian Birtles
9622b88217 Bug 1456394 - Rename KeyframeEffectReadOnly.{h,cpp} to KeyframeEffect.{h,cpp}; r=bz,hiro
MozReview-Commit-ID: 5Q7oQV8vmgS

--HG--
rename : dom/animation/KeyframeEffectReadOnly.cpp => dom/animation/KeyframeEffect.cpp
rename : dom/animation/KeyframeEffectReadOnly.h => dom/animation/KeyframeEffect.h
extra : rebase_source : cdc8448e7d07376691ef9187f7d6f4424800b690
2018-05-07 11:07:06 +09:00
Brian Birtles
81725f45de Bug 1456394 - Move KeyframeEffect constructors to KeyframeEffectReadOnly.{h,cpp}; r=bz,hiro
By doing this we will have all the KeyframeEffect* related code in
KeyframeEffectReadOnly.{h,cpp} so we can rename them to KeyframeEffect.{h,cpp}
in the next patch and make it easier to examine the history for the bulk of this
code.

The added [HeaderFile] annotation will be removed in a subsequent patch in this
series.

MozReview-Commit-ID: Fxk6fPukgAS

--HG--
extra : rebase_source : 0bb0f846aba69e2b79724adb3148948317667eae
2018-05-07 11:07:01 +09:00
Brian Birtles
faad139012 Bug 1456394 - Moving timing updates to KeyframeEffectReadOnly; r=hiro
This might seem a bit odd but later in this patch series we will rename
KeyframeEffectReadOnly to KeyframeEffect.

MozReview-Commit-ID: H9b8brtA36W

--HG--
extra : rebase_source : 9e34d583c087733b3fa05d99a67def55653c4556
2018-05-07 11:02:12 +09:00
Brian Birtles
d6adea94b0 Bug 1456394 - Move KeyframeEffect attribute setters to KeyframeEffectReadOnly; r=bz,hiro
It might seem a bit odd to move the setters to the read-only class that we are
ultimately planning to drop but the reason for doing this is that
KeyframeEffectReadOnly.cpp has a *lot* more code than KeyframeEffect.cpp.

In order to simplify code archaeology we take the following approach:

  1. Move code from KeyframeEffect.{h,cpp} to KeyframeEffectReadOnly.{h,cpp}.
  2. Delete KeyframeEffect.{h,cpp}.
  3. Rename KeyframeEffectReadOnly.{h,cpp} to KeyframeEffect.{h,cpp}.

Note that at least steps 2 and 3 must be performed in separate patches as
mercurial does not successfully track renames when the target name already
exists.

MozReview-Commit-ID: LwJoxGJitKR

--HG--
extra : rebase_source : ae437c6e74435b983c7390df301055472fa3c4ff
2018-05-07 10:48:48 +09:00
Hiroyuki Ikezoe
481c14a322 Bug 1459533 - Use GetPrimaryFrame() to get correct nsIFrame for the animation on pseudo elements. r=mattwoodrow
In pseudo element cases mTarget->mElement is the parent element of the pseudo,
thus we inefficiently use the parent frame and walked through parent
continuations.

MozReview-Commit-ID: DsNRXaM346D

--HG--
extra : rebase_source : e62eeff02897ca08e800c1d807f81a0d4cf38dd1
2018-05-08 07:02:23 +09:00
Hiroyuki Ikezoe
8e0dec0d90 Bug 1320608 - Make sure we wait for the next frame in the case where the animation started at the current frame. r=birtles
MozReview-Commit-ID: 2j2yEzPHUJI

--HG--
extra : rebase_source : cd8e8aa1c7181f87cae0100c3a5ae5ce5e498878
2018-05-09 05:54:15 +09:00
Hiroyuki Ikezoe
0a785d3998 Bug 1320608 - Test case for transform animation on table element. r=birtles
MozReview-Commit-ID: v9aNWucikJ

--HG--
extra : rebase_source : 4d7aeeb5427abe0f063412b467ae0c74e14012ca
2018-05-09 05:54:15 +09:00
Hiroyuki Ikezoe
13307bd629 Bug 1320608 - Drop the check for return value of EffectCompositor::GetAnimationElementAndPseudoForFrame. r=birtles
In FindAnimationsForCompositor(), we can ensure
EffectCompositor::GetAnimationElementAndPseudoForFrame doesn't return nullptr
since EffectSet::GetEffectSet(const nsIFrame*) at the top of
FindAnimationsForCompositor() also uses GetAnimationElementAndPseudoForFrame.

MozReview-Commit-ID: CtWdUt40Zyx

--HG--
extra : rebase_source : 7ea1058f4fb740ca35c2ebdc8d2f69d7b634a257
2018-05-09 05:54:15 +09:00
Hiroyuki Ikezoe
3d8cc990a6 Bug 1320608 - Use the primary frame for AnimationInfo::GetGenerationFromFrame. r=birtles
For table element nsDisplayTransform's mFrame is the primary frame not style
frame.

MozReview-Commit-ID: 9BMSpuGE7lC

--HG--
extra : rebase_source : 19edd8978165cfa3904dcabea3e382e9b7c16ee3
2018-05-09 05:53:47 +09:00
Hiroyuki Ikezoe
715ced6dc3 Bug 1320608 - Rename GetAnimationFrame to GetStyleFrame. r=birtles
GetAnimationFrame is bit ambiguous, the name should match what we call it.

MozReview-Commit-ID: GuyhVrUFgiW

--HG--
extra : rebase_source : 1120e34aa3fdd20cf26552fda01d1a473e3ffff0
2018-05-09 05:53:46 +09:00
Olli Pettay
ed65a2bfc8 bug 1457867, store DOMEventTargetHelper objects in global object as a linked list, r=bkelly
--HG--
extra : rebase_source : 415c03249bae1edc4313bcf15f91716a748565f9
2018-05-04 19:25:05 +03:00
Emilio Cobos Álvarez
da45aa5fed Bug 1458927: Fix perspective squared distance computation. r=hiro
MozReview-Commit-ID: YwjTheRonB

--HG--
extra : rebase_source : d3734aad5d37dda1ccaf24f1f84e2f0972e45f5d
2018-05-03 17:43:30 +02:00
Hiroyuki Ikezoe
b9b117f2da Bug 1457107 - Don't throttle visibility change animations if the animation element isn't on out-of-view element. r=birtles
In bug 1237454, we introduced a new change hint that is produced when
visibility property is changed from 'visible' to 'hidden' or from 'hidden'
to 'visible'.  Animations producing this new change hint can be throttled
if the animation element is out-of-view, but can not be throttled in the case
where the element is in-view. In the bug, a test case for a visibility change
animation on out-of-view element was added, but no test for in-view case was
added.

MozReview-Commit-ID: BhiRm13rfRr

--HG--
extra : rebase_source : 264954ff349d5a9c5a00b940b2eaf2045f0952ae
2018-05-03 14:14:11 +09:00
Hiroyuki Ikezoe
b3cda193ed Bug 1450881 - Hold a reference of the target element when we get style for the element. r=birtles 2018-05-02 06:17:41 +09:00
Xidorn Quan
43eb5c8140 Bug 1456364 part 4 - Convert CSS_PROPERTY_* flags to a typed enum flags. r=emilio
MozReview-Commit-ID: 4mLPe5cH80N
2018-04-26 16:24:33 +02:00
Gurzau Raul
d4fd165bfc Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-04-25 12:38:44 +03:00
Emilio Cobos Álvarez
f8233b4454 Bug 1456471: Remove nsCSSParser.h. r=xidorn
MozReview-Commit-ID: 4qa7llzCXeR
2018-04-25 10:38:37 +02:00
Brian Birtles
e0ea50192f Bug 1456688 - Set easing member in result of getComputedTiming(); r=hiro
The test added in this patch fails without the corresponding code changes
(specifically the second gGetComputedTimingTests test fails the comparison of
the 'easing' member).

MozReview-Commit-ID: 9eyXruVrPuN

--HG--
extra : rebase_source : 927f55c0670bf770e03d38eb876202efbb700c1e
2018-04-25 12:25:26 +09:00