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

966 Коммитов

Автор SHA1 Сообщение Дата
Hiroyuki Ikezoe eec4931934 Bug 1166500 - Part 3: Add KeyframeEffectReadOnly::CanIgnoreIfNotVisible(). r=dbaron 2016-05-24 12:57:42 +09:00
Hiroyuki Ikezoe caa5bb7b54 Bug 1166500 - Part 2: Calculate cumulative change hint. r=dbaron
In order to raise an assertion in CanIgnoreIfNotVisible() which will be
introduced in part 3 when the cumulative hint is not properly, we should skip
the calculation when mProperties is empty.
2016-05-24 12:57:42 +09:00
Hiroyuki Ikezoe ad26dd6ea3 Bug 1166500 - Part 1: Store change hints between from and to for each animation segment. r=dbaron
BuildSegmentsFromValueEntries now needs base nsStyleContext to calculate
the change hints.
If the change hint is not set correctly, we will check it in
CanIgnoreIfNotVisible() introduced in a subsequent patch (part 3).
2016-05-24 12:57:42 +09:00
Hiroyuki Ikezoe 570b519733 Bug 1247800 - Run restyle test for opacity animations in visbility:hidden elements on Android. r=birtles
MozReview-Commit-ID: 5BFWiWelgx1

--HG--
extra : rebase_source : 8f3abba674ec176e71fe8d974a16d18755b18742
2016-05-23 14:57:26 +09:00
Mantaroh Yoshinaga 15ce3c0751 Bug 1096776 part 2 - Modify animation in order to support null timeline. r=birtles
MozReview-Commit-ID: 5iKUtNuqKeX

--HG--
extra : rebase_source : 1c228c136140e1b08355a467578ba6d2ea9c850e
2016-05-23 08:23:14 +09:00
Hiroyuki Ikezoe f2fedee579 Bug 1267251 - Change message IDs for animation warnings. r=birtles,pbro
MozReview-Commit-ID: Fb93m5xt1Ey

--HG--
extra : rebase_source : 4c345a6ec8003df4665fe1318695e4ed820bba31
2016-05-19 13:06:27 +09:00
Ryo Kato 34b9895d54 Bug 1272204 - Rewrite tests in test_animation_performance_warning.html to use setKeyframes r=hiro
* Some tests in gAnimationsTests are moved to gAnimationWithGeometricKeyframeTests.
* `expected.withoutGeometric` represents expected values where 'width' is *not* applied.
* `expected.withGeometric` represents exptected values where 'width' is applied.

MozReview-Commit-ID: 6PJttztMGxI

--HG--
extra : amend_source : 5592317764ff5a9a3db44e7be9073ff426370224
2016-05-17 15:08:29 +09:00
Mantaroh Yoshinaga 340fd8c155 Bug 1134163 - Part4. Add tests of getComputedStyle with seeking. r=birtles
MozReview-Commit-ID: 364RmM8QNWQ
2016-05-18 14:14:15 +09:00
Brian Birtles 5d0853aef8 Backed out changeset 551e75373ed1 (Bug 1134163) for introducing a new intermittent failure on a CLOSED TREE
--HG--
extra : amend_source : d2df25809dafadf63769bb904939d31c03afa0bb
2016-05-18 12:53:26 +09:00
Mantaroh Yoshinaga a98b4f8acf Bug 1134163 - Part4. Add tests of getComputedStyle with seeking. r=birtles
MozReview-Commit-ID: 6JcjLnjJkOI

--HG--
extra : rebase_source : 21c935f55d85a468787769dfe2b83cff320d22ce
2016-05-16 15:29:09 +09:00
Mantaroh Yoshinaga 6e75ea71ce Bug 1134163 - Part3. Modify the currentTime and startTime tests. r=birtles
I modified several tests which related animationstart event delay.

animation-starttime and animation-currenttime tests:
 - Moved the getComputedStyle tests to test/style.
 - Removed the animation.playState tests. This tests contained by playState tests of web-platform-tests.
 - Lining common function. (e.g. calculating current/start time. etc)

MozReview-Commit-ID: 9kD9ZR1KxGv

--HG--
extra : rebase_source : 26e37568769fd4e939ebbde36d8b4af5ad4d2658
2016-05-16 15:29:09 +09:00
Brian Birtles b7858fac74 Bug 1264822 part 4 - Ignore shorthand properties when all their subproperties are not-animatable; r=hiro
This patch also includes a tweak to not-animatable.html to match the order in
which properties are enumerated on the object. This test was always in error but
we never noticed since the test failed before reaching the test in question.

Making the test dependent on the order in which object properties is enumerated
is not good but we will remove this test in the next patch. In this patch we
just make sure it passes.

MozReview-Commit-ID: AKXdHj4nUMv

--HG--
extra : rebase_source : 64270ae9d9cf68cdf534baaf198583fb1974025c
2016-05-17 14:09:11 +09:00
Hiroyuki Ikezoe 00e2f46aeb Bug 1268385 - Clear isRunningOnCompositor for script animations if associated nsIFrame is destroyed. r=birtles
MozReview-Commit-ID: 3tTkDtxkHcT

--HG--
extra : rebase_source : 388f548cb30f5384cceb620a595dd10b5fd22e4e
2016-05-16 16:25:46 +09:00
Chris Peterson 8a9e2d2bd4 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
Brian Birtles e05007f59e Bug 1268858 part 5 - Add tests that getProperties() returns the correct result for CSS variables; r=heycam
MozReview-Commit-ID: D0t1CFaa7DZ
2016-05-13 11:56:10 +09:00
Brian Birtles f85abe7efb Bug 1268858 part 4 - Add tests that getKeyframes() returns the correct result when CSS variables are used; r=heycam
MozReview-Commit-ID: BZrd3FAhrrf
2016-05-13 11:56:10 +09:00
Brian Birtles 16e027ce5c Bug 1268858 part 3 - Make CSS Animations store computed values; r=heycam
This allows us to represent values specified using CSS variable references in
a predictable fashion.

MozReview-Commit-ID: D9KUUhCxPW4
2016-05-13 11:56:10 +09:00
Brian Birtles 4dafc82388 Bug 1268858 part 2 - Distinguish between valid and invalid token stream values in keyframe value handling; r=heycam
In order to support CSS variable references in animation properties we need to
handle token stream values. However, we already use token stream values for two
other purposes:

* To store shorthand property values
* To store invalid longhand property values

The shorthand property value case is already handled correctly, however for
longhand values we need to distinguish between valid token streams (e.g.
values that contain variable references) and invalid values stored as token
streams.

This patch makes us do that by looking at the mPropertyID member of the
nsCSSValueTokenStream object which will be eCSSProperty_UNKNOWN for an invalid
value but will be set to something sensible for a valid token stream.


MozReview-Commit-ID: AXUaO5dopBC
2016-05-13 11:56:10 +09:00
Brian Birtles 90fb66a530 Bug 1271904 - Rename KeyframeEffectReadOnly.getFrames() and KeyframeEffect.setFrames() to getKeyframes()/setKeyframes(); r=hiro, r=smaug
MozReview-Commit-ID: GwLLY39l1KE

--HG--
rename : dom/animation/test/css-animations/file_keyframeeffect-getframes.html => dom/animation/test/css-animations/file_keyframeeffect-getkeyframes.html
rename : dom/animation/test/css-animations/test_keyframeeffect-getframes.html => dom/animation/test/css-animations/test_keyframeeffect-getkeyframes.html
rename : dom/animation/test/css-transitions/file_keyframeeffect-getframes.html => dom/animation/test/css-transitions/file_keyframeeffect-getkeyframes.html
rename : dom/animation/test/css-transitions/test_keyframeeffect-getframes.html => dom/animation/test/css-transitions/test_keyframeeffect-getkeyframes.html
rename : testing/web-platform/meta/web-animations/keyframe-effect/setFrames.html.ini => testing/web-platform/meta/web-animations/keyframe-effect/setKeyframes.html.ini
rename : testing/web-platform/tests/web-animations/keyframe-effect/setFrames.html => testing/web-platform/tests/web-animations/keyframe-effect/setKeyframes.html
2016-05-13 09:40:52 +09:00
Brian Birtles e518a8a1ed Bug 1263488 - Make AnimValuesStyleRule re-use PropertyStyleAnimationValuePair; r=hiro
Rather than defining the same type redundantly but with a name that overlaps
with a struct in KeyframeEffect.h (that has a different type).

MozReview-Commit-ID: 3MbvXWL8XlL
2016-05-11 16:43:32 +09:00
Wes Kocher 729942fffa Merge inbound to central, a=merge CLOSED TREE 2016-05-10 15:20:22 -07:00
Mantaroh Yoshinaga ce9c375596 Bug 1271515 - Remove unnecessary #include from Animation.cpp. r=birtles
MozReview-Commit-ID: GMPuMboBUJu

--HG--
extra : transplant_source : %B6Lf.LK12Fr%D9%9A%86%E3%08%40%C6P%D5L
2016-05-10 12:24:35 +09:00
Xidorn Quan fa7ba2cb82 Bug 1269975 part 1 - Move nsCSSProps::EnabledState to a top level enum class mozilla::CSSEnabledState. r=heycam
MozReview-Commit-ID: 3KH5cqDFzUI

--HG--
extra : rebase_source : 3c8355f7807982152a16a913b31cbcdd6ef78030
extra : source : 73e89d25a34ca5587f306b848b0b801342f9432f
2016-05-10 18:44:05 +10:00
Ryan VanderMeulen f514ed495c Backed out 4 changesets (bug 1269975) for bustage.
Backed out changeset a55ecedea260 (bug 1269975)
Backed out changeset 5321545b938c (bug 1269975)
Backed out changeset 7e4a2ee61ef3 (bug 1269975)
Backed out changeset d181f8e7e4c3 (bug 1269975)
2016-05-10 00:08:54 -04:00
Xidorn Quan 30a6d76b26 Bug 1269975 part 1 - Move nsCSSProps::EnabledState to a top level enum class mozilla::CSSEnabledState. r=heycam
MozReview-Commit-ID: 3KH5cqDFzUI

--HG--
extra : source : 73e89d25a34ca5587f306b848b0b801342f9432f
2016-05-10 13:36:25 +10:00
Hiroyuki Ikezoe 8fd021fbd4 Bug 1235002 - Skip requesting a restyle when mProperties is empty. r=birtles
The test case here does not check whether requesting restyles for empty
properties are skipped or not.  It just checks that whether restyles happen or
not because there is no way to check each request for restyles yet.

MozReview-Commit-ID: I5XMYfCTYU8

--HG--
extra : rebase_source : 893aaaf2c47e05f37bce9913df4f14e3021f215a
2016-05-09 12:33:52 +09:00
Hiroyuki Ikezoe 74cc42f261 Bug 1258904 - Part 5: Remove redundant tests for animation performance warnings. r=birtles
There were two places run gAnimationsTests in
test_animation_performance_warning.html.

MozReview-Commit-ID: zrD5eMiDsy

--HG--
extra : rebase_source : 250f826daed4440725c0a28fdb1fcd84fd299402
2016-05-07 17:37:58 +09:00
Hiroyuki Ikezoe 4030f03992 Bug 1258904 - Part 4: Set performance warning for small content. r=birtles
MozReview-Commit-ID: 7GyGkPog1Bo

--HG--
extra : rebase_source : c296a35c433af547fe4dd800ec8c8abd3bdba339
2016-05-07 17:37:58 +09:00
Hiroyuki Ikezoe eee73ed64c Bug 1258904 - Part 3: Factor out ToLocalizedStringForKey. r=birtles
This function will be used for the warning of small content as well.
MozReview-Commit-ID: EiUF9CgWGDA

--HG--
extra : rebase_source : 3b6daa713d889f5c51507d4c1f6fd6c51f1e7fb9
2016-05-07 17:37:57 +09:00
Kyle Huey 941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Hiroyuki Ikezoe 3e6aae0a2d Bug 1267937 - Part 1: Clear mProgressOnLastCompose once we are not in effect. r=birtles
--HG--
extra : amend_source : 2b1b5d22fdb559c940629fe4536369d95ca29306
2016-04-30 07:08:10 +09:00
Carsten "Tomcat" Book ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey 48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Boris Chiou c9cda033c2 Bug 1067769 - Part 15: Test for setting the target while running on the compositor. r=birtles
MozReview-Commit-ID: 7xHwFk4sFKn

--HG--
extra : rebase_source : 6c6f94413599326e05ff0c838e15eb231d801a67
2016-04-28 23:22:44 +08:00
Boris Chiou b64b7ea3fc Bug 1067769 - Part 14: Test for our animation mutation observer. r=birtles
MozReview-Commit-ID: IQItWcNBscr

--HG--
extra : rebase_source : 218ac06dcb2b9d75d4078c66aa0f112678d42ba0
2016-04-28 23:22:44 +08:00
Boris Chiou 44367b12f2 Bug 1067769 - Part 12: Use Maybe<OwningAnimationTarget> in KeyframeEffect(ReadOnly) constructors. r=birtles
MozReview-Commit-ID: Euv76D6sIFX

--HG--
extra : rebase_source : 7ef6e5d70104942b21671e2143c107e678f400a7
2016-04-28 23:22:44 +08:00
Boris Chiou 43960e1a63 Bug 1067769 - Part 11: Implement animation mutation observer while setting the target. r=birtles
MozReview-Commit-ID: EjgbslUwPKw

--HG--
extra : rebase_source : a93b08d48769c1e73fccb420553b41d06fbc8e16
2016-04-28 23:22:43 +08:00
Boris Chiou 6b5b1483f8 Bug 1067769 - Part 10: Implement SetTarget(). r=birtles
MozReview-Commit-ID: GW3Ujn5cbY3

--HG--
extra : rebase_source : ffc006c67d5b0dd712c4d7d3f938c37b8167ad58
2016-04-28 23:22:43 +08:00
Boris Chiou cba7a5b73d Bug 1067769 - Part 9: Wrap RequestRestyle and UnregisterTarget. r=birtles
We will need to request a restyle and unregister the current target in
SetTarget(), and there are many duplicate code segments for them now, so wrap
them for reusing the code.

MozReview-Commit-ID: 33XoNspZme3

--HG--
extra : rebase_source : 881aa13d79ccc75872a6cc48d0a1da71cfdff2ae
2016-04-28 23:22:43 +08:00
Boris Chiou 0937d3158e Bug 1067769 - Part 8: Add ConvertTarget function. r=birtles
Use ConvertTarget() to convert Nullabe<ElementOrCSSPseudoElement> into
Maybe<OwningAnimationTarget>, so SetTarget() can use it as well. The return type
of ConvertTarget is not Maybe<NonOwningAnimationTarget> because we need to
compare the return type with KeyframeEffectReadOnly::mTarget, so using the same
type would be easier to implement.

MozReview-Commit-ID: GskbydOMoo0

--HG--
extra : rebase_source : d1a8fe2d8fe89e4ffdb79844ab5581a9af3b2ce5
2016-04-28 23:22:43 +08:00
Boris Chiou d423a8f2b2 Bug 1067769 - Part 7: Define OwningAnimationTarget and use it. r=birtles
1. Define OwningAnimationTarget.
2. Replace the KeyframeEffectReadOnly::mTarget/mPseudoType members with
   a Maybe<OwningAnimationTarget> mTarget member.

MozReview-Commit-ID: 65qOoNyDRSy

--HG--
extra : rebase_source : b938dbc00c918861d4141128fad8e30f61668e40
2016-04-28 23:22:43 +08:00
Boris Chiou 22e871661b Bug 1067769 - Part 6: Rename NonOwningAnimationTarget.h to AnimationTarget.h. r=birtles
MozReview-Commit-ID: ErAaPe6ttjc

--HG--
rename : dom/animation/NonOwningAnimationTarget.h => dom/animation/AnimationTarget.h
extra : rebase_source : 79b52ece67f16bd32ac8c07d698a9aae076fe5fe
2016-04-28 23:22:43 +08:00
Boris Chiou 57a8894260 Bug 1067769 - Part 5: Support setting KeyframeEffect.target webidl interface. r=smaug
MozReview-Commit-ID: 9494jdI97MT

--HG--
extra : rebase_source : 4c8fa7bfb6502c78a96e1af1e2a6d98d7708d7dd
2016-04-28 23:22:43 +08:00
Boris Chiou 6679d6416c Bug 1067769 - Part 3: Test for KeyframeEffectReadOnly with null target. r=birtles
MozReview-Commit-ID: DQ5k6W1bgUC

--HG--
extra : rebase_source : 44b919cb3e227a3aa6b2d0adce582d4e8338b8f9
2016-04-28 23:22:42 +08:00
Boris Chiou ea72ffdf23 Bug 1067769 - Part 2: Support nullable target in KeyframeEffect(ReadOnly) constructor. r=birtles
We set a null target only from Web Animations API, so make sure
KeyframeEffectReadOnly::ConstructKeyframeEffect() can handle null target
properly.

MozReview-Commit-ID: D6PoV7PGFj3

--HG--
extra : rebase_source : 4ba2d616d6b2cdfe7985ced29e4454e818d076b8
2016-04-28 23:22:42 +08:00
Boris Chiou ce16585e39 Bug 1067769 - Part 1: Avoid doing RequestRestyle and mutation batch for null target. r=birtles
We don't need to restyle if mTarget is nullptr, so skip it. For
nsAutoAnimationMutationBatch, we also skip it if mTarget is nullptr.

AnimationColletion, nsAnimationManager and nsTransitionManger are for
CSS Animations and CSS Transtions, so the effect should have an effective
target. Therefore, I think we don't have to revise them for
nsAutoAnimationMutationBatch.

MozReview-Commit-ID: Egzr1QVEa0v

--HG--
extra : rebase_source : 2f9125f71f67a3d50f2126fed4d1b459d938de22
2016-04-28 23:22:42 +08:00
Nathan Froyd 5672bb749c Bug 1259733 - use forward declarations for nsIDocument in a few places; r=dholbert
This is sufficient for nsCSSFrameConstructor.h's needs, and the
corresponding C++ file already includes nsIDocument.h.
2016-04-27 14:48:36 -04:00
Hiroyuki Ikezoe 68ab4bd520 Bug 1267547 - Test to check script animations keep running on display:none element but does not cause restyles. r=birtles
Currently isRunningOnCompositor flag is not cleared when 'display:none'
is set to the target element.
We need to fix it at some point.

MozReview-Commit-ID: CjtWUyT9CP9

--HG--
extra : rebase_source : c1da5ed5e79f9a7f78d920943dabad719cb7abc7
2016-04-27 17:17:00 +09:00
Brian Birtles 5b507cd9d6 Bug 1267893 part 4 - Make setting the start time set 'did seek' to true; r=hiro
Based on changes to the spec: 8bf2b102de

MozReview-Commit-ID: GXllrLuyh8

--HG--
extra : rebase_source : cc979b43e46632aefdd3262299f4d810b13f6015
2016-04-27 11:34:05 +09:00
Brian Birtles a9c3d15f51 Bug 1255683 - Rewrite some animation performance string to refer to compositor animations instead of 'Async animations', r=helenvholmes, r=hiro
MozReview-Commit-ID: G1p8uCK8sS6
2016-04-22 18:02:35 +09:00
Ryo Kato ed3e9e9db3 Bug 1244591 - Part 1: Implement KeyframeEffect.setFrames r=birtles,smaug
WebIDL referes to KeyframeEffect::SetFrames(), which is derived from
KeyframeEffectReadOnly::SetFrames() in terms of implementation.

In addition, make KeyframeEffectReadOnly::ConstructKeyframeEffect call
KeyframeEffectReadOnly::SetFrames() to simplify the code.

MozReview-Commit-ID: 7ASbtoN7Tnp

--HG--
extra : rebase_source : c398ff7154c4533255f56c7ca13314e440eb6258
2016-04-09 15:33:34 +09:00
Brian Birtles 14ae45c97e Bug 1245000 part 4 - Enable the Animation constructor when Element.animate is enabled; r=bz
This also makes the constructor slightly more presentable with regards to its
current limitations.
2016-04-22 13:41:59 +09:00
Brian Birtles e82da4fa99 Bug 1265611 - Add tests that we ignore disabled properties when creating animations from the Web Animations API; r=heycam
MozReview-Commit-ID: 81XkkwtyJLt
2016-04-21 17:05:47 +09:00
Brian Birtles 1e1f683439 Bug 1266257 - Revise timing model calculations to use fraction-based approach; r=hiro
As per updates to Web Animations spec:

  https://github.com/w3c/web-animations/compare/10fc97366041%5E...b9a721e6536ae27c37df1e3948b013c6a52d5f4c

MozReview-Commit-ID: 5NHnF56aETJ
2016-04-21 14:51:36 +09:00
Mantaroh Yoshinaga 5abe552c97 Bug 1260084 - Part3.Remove unnecessary css animation mochitest. r=birtles
MozReview-Commit-ID: JgplbS9F57L

--HG--
extra : transplant_source : _%A3K%E65%1A%10%D1%2B%A6%B6%E7%8F%2B%13%A8%B9%21f%9B
2016-04-20 08:26:43 +09:00
Mantaroh Yoshinaga 690b92aa89 Bug 1260084 - Part1.Use promise_test instead of async_test. r=birtles
MozReview-Commit-ID: 9yrccghlUVb

--HG--
extra : transplant_source : %F4%92%D8Z%13%0D%27B%A8%0C%D1%A7%81%8A%E7%CF%C7%99u%BE
2016-04-20 08:21:17 +09:00
Mantaroh Yoshinaga 1a3a4d293d Bug 1259285 - Part1 - Move CSS/Web Animations-specific visibility handling. r=birtles
MozReview-Commit-ID: 5ZYUhvI1cqV

--HG--
extra : transplant_source : %85%01%5C%91%EB%C2%F9%F5a%82%5C%FCZKz%F7%2B%27%F7%9C
2016-04-20 09:05:29 +09:00
Carsten "Tomcat" Book 26acbcad12 Backed out changeset b72de5c5ac33 (bug 1260084) for test failures in reverse.html 2016-04-19 12:36:20 +02:00
Carsten "Tomcat" Book 88c03ed11b Backed out changeset 545b4ff9a8e0 (bug 1260084) 2016-04-19 12:35:58 +02:00
Mantaroh Yoshinaga 003affd9cf Bug 1260084 - Part3 - Remove unnecessary css animation mochitest. r=birtles
MozReview-Commit-ID: 7R5VEyvYxvl

--HG--
extra : transplant_source : %18%60%F0%ED%B1%9E%1D%5B%13%1E%2C%20%F5%00%89.%89Lb%88
2016-04-18 13:15:38 +09:00
Mantaroh Yoshinaga bbb2c948a8 Bug 1260084 - Part1 -Use promise_test instead of async_test. r=birtles
MozReview-Commit-ID: 5GXF1frOdvf

--HG--
extra : transplant_source : %83i%8F%8A%01es%C6%F6%9B%84%98%81v%8Ac%E6%FA/i
2016-04-18 12:53:40 +09:00
ABE Hiroki (hATrayflood) 259010e082 Bug 1244637 - implement AnimationEffectTiming fill. r=hiro
MozReview-Commit-ID: 46kYkxy06Sk

--HG--
extra : rebase_source : b85e4c1d7dfada490a43e18fd6f012553f9045f0
2016-04-10 11:35:52 +09:00
Daisuke Akatsuka 0250695f7d Bug 1244643 - Part 2: Append tests for easing. r=hiro
MozReview-Commit-ID: 3RYWjsViwJZ

--HG--
extra : rebase_source : fd62be7ed619ab846d04691ac2c0a64701e71ff4
2016-04-15 20:55:25 +09:00
Daisuke Akatsuka f9df5acae8 Bug 1244643 - Part 1: Implement AnimationEffectTiming easing. r=hiro
MozReview-Commit-ID: 14H3t787wRy

--HG--
extra : rebase_source : 6ce0e427680becca50d4feeeac6bbcb5f9bbfb30
2016-04-14 09:08:08 +09:00
Hiroyuki Ikezoe c96975eec9 Bug 1263063 - Part 6: Use TimingParams::EndTime() instead of re-calculation ComputedTiming each time. r=dholbert
MozReview-Commit-ID: 9pT06LXoU4V

--HG--
extra : rebase_source : acf75c64ca884eebe86e23f81e56ab1824484cfa
2016-04-14 19:39:44 +09:00
Hiroyuki Ikezoe 1b7f619907 Bug 1263063 - Part 5: Introduce TimingParams::EndTime(). r=dholbert
MozReview-Commit-ID: 6dpnb65vndl

--HG--
extra : rebase_source : b4c0046b893bf78ebec91d3308fcbfccf48a79d1
2016-04-14 19:39:42 +09:00
Hiroyuki Ikezoe ffc5ef3515 Bug 1263063 - Part 4: Move ActiveDuration() into TimingParams. r=dholbert
MozReview-Commit-ID: 4HS8vTJYtDe

--HG--
extra : rebase_source : 5ccdc1aa1ffe0c33a0d334cf2a4736877481cd28
2016-04-14 19:39:39 +09:00
Hiroyuki Ikezoe 6846fc920e Bug 1263063 - Part 3: Change logic in KeyFrameEffect to assume that TimingParams' iteration-count has already been validated as nonnegative & finite. r=dholbert
MozReview-Commit-ID: 9mbBHvyjNZg

--HG--
extra : rebase_source : 8e371d2349095ab924ca0be241eccf28e092bdb7
2016-04-14 19:36:03 +09:00
Hiroyuki Ikezoe 99b87b0281 Bug 1263063 - Part 1: Remove unnecessary clamping of TimingParams::mIterationStart, since it's guaranteed to be nonnegative. r=dholbert
MozReview-Commit-ID: ApQVt39jasa

--HG--
extra : rebase_source : e247683aa727f7e331fc4a559032f7c636ea834c
2016-04-14 19:35:59 +09:00
Brian Birtles 20fffd9955 Bug 1247004 part 2 - Don't throw if easing is the string "function (a){return a}"; r=heycam
MozReview-Commit-ID: CgwsJQKB1qj
2016-04-15 15:26:27 +09:00
Brian Birtles ed5ce2394b Bug 1247004 part 1 - Drop orphaned declaration AnimationUtils::ParseEasing; r=heycam
MozReview-Commit-ID: 6FSXOXeXomG
2016-04-15 15:26:27 +09:00
Boris Chiou 1decf4e780 Bug 1249564 - Part 2: Cycle collect AnimationEffectTimingReadOnly. r=birtles
Add KeyframeEffectReadOnly::mTiming into the list of cycle collection to
avoid any possible memory leak.

MozReview-Commit-ID: C5mFQ7TsqC7

--HG--
extra : rebase_source : 8ee1e58d69a3becb0b8566fa3529154bb66d3064
2016-04-13 18:20:46 +08:00
Boris Chiou c5c62dc083 Bug 1249564 - Part 1: Assign the parent object of AnimationEffectTiming(ReadOnly). r=birtles,bz
Use the current document as the parent object of
AnimationEffectTiming(ReadOnly).

MozReview-Commit-ID: JfPLk95hsJ1

--HG--
extra : rebase_source : ee068d0eb8e26f4c1e83b87049be8060fcd27813
2016-04-10 13:51:32 +08:00
Brian Birtles 1bf99cf79f Bug 1260983 - Allow creating animations with a target element not bound to a document; r=heycam
MozReview-Commit-ID: HHqHWikZ3zp
2016-04-01 09:32:26 +09:00
Brian Birtles 344398e8f8 Bug 1260983 - Update animation properties when the style context changes; r=heycam
MozReview-Commit-ID: L4ugcD7BxNX
2016-04-01 09:31:51 +09:00
Brian Birtles 1a98da1bd9 Bug 1260976 - Remove the old AnimationProperty-based GetFrames; r=heycam
MozReview-Commit-ID: FoEf7DymVDm
2016-04-01 09:29:31 +09:00
Brian Birtles 9552e36446 Bug 1260655 - Drop some no-longer-needed code for setting up CSS animations using AnimationProperty objects; r=heycam
MozReview-Commit-ID: JDzvQIxlsX6
2016-03-30 13:01:20 +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 871add346f Bug 1260655 - Add a copy constructor and copy assignment operator to Keyframe; r=heycam
It turns out that std::stable_sort on Mac and Android use this.

Bug 1263500 tracks doing something more efficient on those platforms.

MozReview-Commit-ID: 3tGbnoW67QP
2016-03-31 16:26:52 +09:00
Brian Birtles 56ab406ea8 Bug 1260655 - Add an assignment operator to Keyframe that takes an rvalue reference; r=heycam
This is needed in order to use std::stable_sort with this type since some
implementations of std::stable_sort require this (as opposed to simply a move
constructor).

MozReview-Commit-ID: 5QmcIxkC4aB
2016-03-29 11:29:20 +09:00
Brian Birtles 87d20ddd2f Bug 1260655 - Return the stored Keyframe objects from GetFrames, when available ; r=heycam
Before switching CSS animations over to using KeyframeEffectReadOnly::SetFrames
we update the getFrames() API to return the set frame objects (when available)
so that we can test that we are setting the correct frames.

MozReview-Commit-ID: 4SpBRM7Ykyv
2016-03-30 08:59:08 +09:00
Brian Birtles bdacb97d48 Bug 1260655 - Add KeyframeEffectReadOnly::SetFrames; r=heycam
Earlier in this patch series we divided keyframe processing into two stages:

  (1) Turning javascript objects into an array of Keyframe objects
  (2) Calculating AnimationProperty arrays from the Keyframe objects

This patch creates a SetFrames method so that CSS animations and
CSS transitions can skip (1) and pass the frames constructed from CSS syntax
into (2).

It also adds the following additional processing:

a. Notifying animation mutation observers when the set of frames has changed.

   This is currently performed by nsAnimationManager but ultimately we should
   encapsulate this logic inside the effect itself. Furthermore, it will be
   needed when we implement effect.setFrames() (i.e. the Javascript-facing
   wrapper for this method).

b. Preserving the mWinsInCascade and mIsRunningOnCompositor state on properties
   when updating them.

   This is currently performed by:

      bool KeyframeEffectReadOnly::UpdateProperties(
          const InfallibleTArray<AnimationProperty>& aProperties)

   which is what nsAnimationManager currently uses. We will ultimately remove
   the above method and here we are just moving this code to the new version
   of UpdateProperties.

c. Requesting a restyle when the set of AnimationProperty objects has changed.

   Again, this is currently performed by the existing UpdateProperties method
   so we are just moving it here. This behavior will also be required when
   we implement effect.setFrames() and when we call UpdateProperties from
   elsewhere in restyling code.

   This is bug 1235002 but we fix it here and leave that bug to just do further
   cleanup work (e.g. re-instating the check for an empty property set before
   requesting a restyle in NotifyAnimationTimingUpdated).

d. Marking the cascade as needing an update when the set of AnimationProperty
   objects has changed.

   This is in preparation for calling UpdateProperties from elsewhere in
   restyling (e.g. when the nsStyleContext is updated).


MozReview-Commit-ID: 2ll26lsWZTm
2016-03-30 08:59:08 +09:00
Brian Birtles 99a1a632e3 Bug 1260572 - Use 50% switch behavior if StyleAnimationValue::Interpolate fails; r=heycam
In KeyframeEffectReadOnly::ComposeStyle we call StyleAnimationValue::Interpolate
but assume that it always passes. That was true when that code was only used for
CSS animations and CSS transitions since they check that their animation values
can be interpolated before setting up segments.

However, when we set up animations using the Web Animations API we don't perform
that check so it is possible for this call to fail.

In that case, we could just bail, but, according to CSS Transitions we should
apply a 50% switch in this case:

  https://drafts.csswg.org/css-transitions/#step-types

(In Web Animations, specifying this is an open issue. See:
https://w3c.github.io/web-animations/#specific-animation-behaviors).

Bug 1064937 tracks doing this in general (we'll likely need to mark various
properties as being no longer unanimatable but instead as supporting discrete
animation) but we can start to introduce it now.

Later in bug 1245748, CSS animations and transitions will likely start using
the same code path as the Web Animations API for setting up keyframes.
As a result, unless we take care to add checks that the values we set are
interpolable, the 50% switch behavior will begin to apply to CSS animations and
transitions too at that point.

Some concerns have been raised about possible web compatibility issues around
the 50% switch behavior (see [1] and [2]). For CSS animations, Chrome already
supports this behavior so it should be ok at least for CSS animations.
When we switch CSS transitions over to the same code path, however, we will need
to be careful to add checks that the transition endpoints are interpolable
(we can investigate introducing this behavior to transitions as a separate bug
that can be easily backed out / preffed off).

Regarding the naming of the test added here, going forward we would like to
restructure the tests under web-platform-tests to better match the structure of
the Web Animations since that seems to be the convention there.

However, this doesn't *quite* match the structure of the spec since there are
upcoming changes to the spec in this area (e.g. renaming animation behaviors to
animation types). However, it should be close enough that we don't have to move
it around too much in future.

[1] https://drafts.csswg.org/css-transitions/#step-types
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1064937#c0

MozReview-Commit-ID: KcxILrckJg9
2016-03-30 08:59:08 +09:00
Brian Birtles a9d4b99d8d Bug 1260572 - Replace AnimValuesStyleRule::AddEmptyValue with an overload of AddValue that takes an rvalue reference; r=heycam
In the next patch in this series, we would like to update the error handling of
the call to StyleAnimationValue::Interpolate in
KeyframeEffectReadOnly::ComposeStyle. Using AnimValuesStyleRule::AddEmptyValue
there, however, makes handling the error case difficult because we need a means
of clearing the allocated StyleAnimationValue.

However, simply using AnimationValuesStyleRule::AddValue means we will end up
doing needless allocations for StyleAnimationValue objects (the copy
constructor for which can result in performing potentially expensive heap
allocations, such as when lists are deep-copied).

Instead, we add a Move constructor to StyleAnimationValue and add an overload
of AnimValuesStyleRule::AddValue that takes an rvalue reference. This
provides a more consistent interface to AnimValuesStyleRule and avoids the
unnecessary allocations from copying StyleAnimationValue objects.

MozReview-Commit-ID: CaP1uPAgNnm
2016-03-30 08:59:01 +09:00
Ryo Kato 39e1d58e52 Bug 1255682 - Remove unnecessary t.step_func() from a chrome test r=hiro
In promise chains, we don't have to use t.step_func. However, when there
are callbacks in promise chains, assertions in the callbacks need wrapped
in either t.step or t.step_func.

If we use t.step_func, a variable scope might be divided. This can be a
problem when an assertion uses local-scope variable (e.g. the callback
in MutationObserver uses an assertion which take `changedAnimation`).

Therefore, t.step is helpful in this case.

(There no t.step_func we should remove in web-platform tests.)

MozReview-Commit-ID: IiSizgCQjpG

--HG--
extra : rebase_source : bfe314c20763d0ea26127dd561c64388d6431bf3
2016-04-03 16:20:20 +09:00
Mantaroh Yoshinaga ce5de9f521 Bug 1259344 - Use promise_test instead of async_test in css-animation mochi tests. r=birtles 2016-04-04 16:39:00 +02:00
Mantaroh Yoshinaga bbda165351 Bug 1259344 - Move play()/cancel()/playstate tests to web platform tests. r=birtles 2016-04-04 21:57:00 +02:00
Chris Manchester f7a1b3fb60 Bug 1242051 - Add inter-directory test support file dependencies to ini manifests. r=gps
Previously, every test and support file would be synced to the objdir
when running any test. Now that only those support files and tests requested
are synced, we note support files required beyond those in a test's
directory in ini manifests.

MozReview-Commit-ID: EmlDz9d4lqt
2016-04-04 14:56:52 -07:00
Daisuke Akatsuka 586de6eae6 Bug 1244633 - Part 2: append tests for delay. r=birtles
MozReview-Commit-ID: 7jldzmXrqfj
2016-04-02 18:33:54 +09:00
Daisuke Akatsuka 8493af39ec Bug 1244633 - Part 1: implement AnimationEffectTiming delay. r=birtles
MozReview-Commit-ID: atZbBx3dTd
2016-04-02 18:25:02 +09:00
Daisuke Akatsuka 6c89bdf21b Bug 1248532 - Part 1: steps-start does not produce correct value at the beginning of the interval. r=birtles
MozReview-Commit-ID: F9b1HCfEqU6

--HG--
extra : transplant_source : %22xJ1%EBa%D6%7D%87%03%B84%2A5%CA9%93N%8A%16
2016-04-01 14:00:57 +09:00
Mantaroh Yoshinaga 0c861db219 Bug 1258972 - Move finish and playbackrate mochitest to web platform tests. r=birtles. 2016-03-31 18:30:00 +02:00
Daisuke Akatsuka fe1ca49a35 Bug 1260933 - Part 2: For invalid duration values, print the invalid value. r=birtles
MozReview-Commit-ID: 1vg3M3yY19Z

--HG--
extra : rebase_source : 6b994da55078bce5f5db788f8fce483da883ac41
2016-03-31 19:20:59 +09:00
Daisuke Akatsuka 7c788ee98a Bug 1260933 - Part 1: For invalid easing values, print the invalid value. r=birtles
MozReview-Commit-ID: HJEjvGyUnCN

--HG--
extra : rebase_source : e640bcf99d1cf05cad9fe937db92ef80794cb6d6
2016-03-31 19:20:42 +09:00
Hiroyuki Ikezoe c6555da9ca Bug 1256503 - Part 3: Introduce addDivAndAnimate function checking animation duration is longer than 100s to avoid intermittent test failures. r=dholbert
MozReview-Commit-ID: 2zIKFNPBjoK

--HG--
extra : rebase_source : 518f973863484e7f1b2947962b569956b170ced4
2016-04-01 06:03:30 +09:00
Hiroyuki Ikezoe d15dbe558c Bug 1256503 - Part 2: Increase some test animation durations to be at least 100 seconds. r=dholbert
In some of these cases, this increase isn't strictly necessary, because we only
check state immediately after creating the animation, before it could have
completed (regardless of its duration). Still: we should consistently use long
durations for any animations that aren't expected to complete during the test
run, because short durations might accidentally get copypasted into new tests
where they might cause intermittent failures.

MozReview-Commit-ID: 8wSRqHMI12L

--HG--
extra : rebase_source : 12e6a054dce047351b06e064bcedd9cdec58150f
2016-04-01 06:03:25 +09:00
Hiroyuki Ikezoe 75228bfa24 Bug 1256503 - Part 1: Use MS_PER_SEC instead of human-misreadable digits in animation tests. r=dholbert
MozReview-Commit-ID: CtMF84ExBLa

--HG--
extra : rebase_source : 116e9a14d5fb77c6d24ccb1e3dcdf69a7d4ce2d0
2016-04-01 06:03:21 +09:00
Ryo Kato b3baf9a794 Bug 1260353 - Remove unnecessary method AnimValuesStyleRule::AddPropertiesToSet() r=hiro
MozReview-Commit-ID: 3rRvYLNCvXE

--HG--
extra : rebase_source : 9997d72733affd869a09a382820d349f5493b732
2016-03-29 16:12:33 +09:00
Hiroyuki Ikezoe 4be774af37 Bug 1255710 - Part 2: Enable tests for 'transform-style: preserve-3d'. r=birtles
MozReview-Commit-ID: HzmFJErruwp

--HG--
extra : rebase_source : 6a821c2060ee63a4d3ccce70fb88f981274bb17d
2016-03-29 12:50:50 +09:00
Hiroyuki Ikezoe eff0b8badf Bug 1255710 - Part 1: Remove all unnecessary t.step_func. r=birtles
MozReview-Commit-ID: BNBRYLpHjLy

--HG--
extra : rebase_source : 329e448a109052eb450ce17a018c3c27e39d655e
2016-03-29 12:50:35 +09:00
Hiroyuki Ikezoe 156cb0a8ca Bug 1255710 - Part 0: Rename test_animation_property_state.html to test_animation_performance_warning.html. r=birtles
MozReview-Commit-ID: EZxWc2uRVX2

--HG--
rename : dom/animation/test/chrome/test_animation_property_state.html => dom/animation/test/chrome/test_animation_performance_warning.html
extra : rebase_source : 8d0113f359237a7df102f1e3430b8eca28823142
2016-03-29 12:50:23 +09:00
Ryo Kato 7218d5dee1 Bug 1244642 - Implement AnimationEffectTiming.direction r=hiro
MozReview-Commit-ID: I8t011JVGBb

--HG--
extra : rebase_source : 15baf67ea204d55e047405c7cd9c20cfdaa12bce
2016-03-26 16:20:25 +09:00
Rob McAuley e11d308ed2 Bug 1259898: use range-based for loop in AnimValuesStyleRule.h r=birtles
MozReview-Commit-ID: HlJ291yiVEp

--HG--
extra : rebase_source : b153563ffce9cf94e5196fc33b9f582b03371525
2016-03-26 16:50:05 +09:00
emi suzuki 7655f66912 Bug 1259883 - Enable a test for player finishing behavior in file_animation-starttime.html r=hiro
MozReview-Commit-ID: 1GPW9UsEK5E

--HG--
extra : rebase_source : 75a8ec293c5a8a380403f60efc263b92723dff78
2016-03-26 17:00:51 +09:00
Rob McAuley 4acbe0650b Bug 1244640 - implement AnimationEffectTiming iterations r=hiro
MozReview-Commit-ID: Iwq6vleUERo

--HG--
extra : rebase_source : 8eef9f68a8956db547f98ab253927cf01a3ecf50
2016-03-26 14:41:37 +09:00
Hiroyuki Ikezoe e3a804fcb1 Bug 1259878 - remove unnecessary isSome(). r=birtles
MozReview-Commit-ID: 3Xh2D5TOTSg

--HG--
extra : rebase_source : 95715a192eb67afc6f02ca4e8895dae705d64462
2016-03-26 10:52:08 +09:00
Eddy Bruel 3e2cb55980 Bug 1229769 - We should be able to use DOM promises in the worker debugger;r=khuey 2016-03-24 16:12:00 +01:00
Brian Birtles ded9534a6c Bug 1245748 - Add a Move constructor to Keyframe; r=heycam
I have confirmed that by adding this, we end up calling SwapElements() on the
mPropertyValues member when we build up the nsTArray<Keyframe> result in
GetKeyframeListFromPropertyIndexedKeyframe. Without this explicit move
constructor (i.e. with only the default move constructor) the copy-constructor
for mPropertyValues is called.

MozReview-Commit-ID: 6IWkP97RFUr

--HG--
extra : rebase_source : 4ac4b6545337810a3047f2cfb1dac86074116cfb
2016-03-24 10:39:29 +09:00
Brian Birtles 119a18fee3 Bug 1245748 - Remove no-longer-needed code for directly setting up properties in KeyframeEffect(ReadOnly) constructor; r=heycam
MozReview-Commit-ID: 4V3LMByas9Q

--HG--
extra : rebase_source : c2c687cd39b8287e7e9cb2a4edd12c86a056a0de
2016-03-22 16:36:45 +09:00
Brian Birtles 81c73a9b4b Bug 1245748 - Use Keyframe-based utility functions when constructing KeyframeEffect(ReadOnly); r=heycam
MozReview-Commit-ID: 72vLatkFqMq

--HG--
extra : rebase_source : 5b40afe6e12b3bcb3a57ed294fc582bf7e40ba18
2016-03-22 16:35:53 +09:00
Brian Birtles 1cf303b56f Bug 1245748 - Add ApplyDistributeSpacing for Keyframe objects; r=heycam
MozReview-Commit-ID: 8KNERsl8tea

--HG--
extra : rebase_source : e48ca76aea6e93722f285bf59a8696d6a102bf99
2016-03-22 16:35:53 +09:00
Brian Birtles 93bd57b41f Bug 1245748 - Add GetAnimationPropertiesFromKeyframes; r=heycam
MozReview-Commit-ID: GUnogloqViS

--HG--
extra : rebase_source : ba999c9f9bf18683b7942dfefe0c0242124af474
2016-03-22 16:34:14 +09:00
Brian Birtles 56612fa76d Bug 1245748 - Add PropertyPriorityIterator; r=heycam
MozReview-Commit-ID: JjBWcyEG3f6

--HG--
extra : rebase_source : f3f4de1b665078112205883cb1885931b84ff6ee
2016-03-22 16:33:16 +09:00
Brian Birtles 7e9749fed0 Bug 1245748 - Split PropertyPriorityComparator into a separate (reusable) class; r=heycam
MozReview-Commit-ID: Gq5VylZoS2q

--HG--
extra : rebase_source : c47b937ef63df3dbabfe4dded9de42372c5403f6
2016-03-22 16:33:11 +09:00
Brian Birtles b411ad9926 Bug 1245748 - Add nsStyleContext parameter to StyleAnimationValue::ComputeValue(s); r=heycam
StyleAnimationValue::ComputeValue(s) will automatically look up the style
context of the supplied element. This is mostly fine, but when we start using
this method in scenarios where we are building the initial style context
(as happens later in this patch series) it can easily land us in a situation
where we iterate indefinitely.

It would be better, instead, to just explicitly pass in the style context we
want to use, as we already do for StyleAnimationValue::ExtractComputedValue.

MozReview-Commit-ID: ZoVBlBRRBI

--HG--
extra : rebase_source : 9012cc2e405fc887f070fbfaa2f9853289882862
2016-03-22 16:31:09 +09:00
Brian Birtles 67707b72eb Bug 1245748 - Add KeyframeUtils::GetKeyframesFromObject; r=heycam
MozReview-Commit-ID: 2cl8NIMApSy

--HG--
extra : rebase_source : f0cafad483afcf36efa86f6fa137bbffd068bcb5
2016-03-22 16:25:38 +09:00
Brian Birtles 9ccb67c08b Bug 1245748 - Move keyframe handling code to a separate KeyframeUtils class; r=heycam
MozReview-Commit-ID: 2r27vCLcOhs

--HG--
extra : rebase_source : 6ba24ece944543e250728cf2b18370c277e746d0
2016-03-22 16:20:37 +09:00
Brian Birtles fa75146d8b Bug 1245748 - Add missing includes to TimingParams.{cpp,h}; r=heycam
Once we tweak moz.build in the next patch, the grouping in the unified build
will change and expose these missing includes so we fix them here, first.

MozReview-Commit-ID: GebEEociwTo

--HG--
extra : rebase_source : 18158fdf8a3c1a1dcf446118371cad1a15fd4daf
2016-03-22 16:20:31 +09:00
Brian Birtles 22923130f6 Bug 1245748 - Define the Keyframe type for storing specified keyframes; r=heycam
MozReview-Commit-ID: rejtrG0U1A

--HG--
extra : rebase_source : 24815326a6dfc8c71eda559703f791a204185ea2
2016-03-22 16:19:43 +09:00
Brian Birtles 84a59825cc Bug 1245748 - Update handling of 'composite' dictionary members to match changes to the spec; r=heycam, r=bz
Specifically, for the 'composite' member on keyframes, we now indicate "use the
composite value specified on the effect" using a missing/undefined 'composite'
member as opposed to a null value.

MozReview-Commit-ID: ZH45GvCTlP

--HG--
extra : rebase_source : 5acf081fb844f81280765a87ec019b7847ca1885
2016-03-22 16:18:22 +09:00
Brian Birtles e8806251b8 Bug 1245748 - Rename Keyframe-related IDL types to match changes to Web Animations spec; r=heycam, r=bz
In particular, the spec no longer has Keyframe and PropertyIndexedKeyframes
types but rather deals with objects. The algorithms for processing these
objects, however, define various Base* types:

  https://w3c.github.io/web-animations/#dictdef-basepropertyindexedkeyframe
  https://w3c.github.io/web-animations/#dictdef-basekeyframe
  https://w3c.github.io/web-animations/#dictdef-basecomputedkeyframe

MozReview-Commit-ID: 3RqoEO66kJ

--HG--
rename : dom/webidl/Keyframe.webidl => dom/webidl/BaseKeyframeTypes.webidl
extra : rebase_source : 35a586584934170c5427138a85d167258cb34993
2016-03-22 16:16:39 +09:00
Brian Birtles 2459ec4912 Bug 1245748 - Move ComputedTiming to a separate file; r=heycam
Before we begin re-arranging KeyframeEffect.h we move ComputedTiming aside
since putting it in a separate file should make navigating the source
easier.

MozReview-Commit-ID: L5GTFAo00sh

--HG--
extra : rebase_source : e88b6ea092c459afa90831de8469697454e00c5a
2016-03-22 08:11:05 +09:00
Daisuke Akatsuka 07d9c95713 Bug 1254761 - Part 3: Add tests for AnimationFilter. r=birtles
--HG--
extra : rebase_source : 188cd7bc49e9c143540b874945ab6a3bbfbf79bf
2016-03-22 09:33:09 +09:00
Daisuke Akatsuka c89239f3ad Bug 1254761 - Part 1: Implement getAnimations({ subtree: true }). r=smaug
--HG--
extra : rebase_source : 3079ffea84919cb6b43dce8c28b256edddce4746
2016-03-22 09:33:02 +09:00
Daisuke Akatsuka 9602fa95af Bug 1256560 - Implement AnimationEffectTiming WebIDL. r=birtles, r=smaug
--HG--
extra : rebase_source : ca188cf8fec37819e90310ca21b9250ac4fe0e0e
2016-03-22 16:43:00 -04:00
Brian Birtles 1fa3fa89d4 Bug 1257753 - Extend length of script animation in test to avoid intermittent failures; r=hiro
MozReview-Commit-ID: DHuWqOGWHqw
2016-03-23 09:40:31 +09:00
Daisuke Akatsuka f479d03a6b Bug 1253470 - Part 4: Produce console warnings for invalid easing. r=birtles 2016-03-18 16:28:22 +09:00
Daisuke Akatsuka 621421f7eb Bug 1253470 - Part 3: Produce console warnings for invalid iterations. r=birtles 2016-03-18 10:14:49 +09:00
Daisuke Akatsuka 473e0fa56c Bug 1253470 - Part 2: Produce console warnings for invalid iterationStart. r=birtles 2016-03-18 10:11:07 +09:00
Daisuke Akatsuka a152d59824 Bug 1253470 - Part 1: Produce console warnings for invalid duration. r=birtles 2016-03-18 10:07:10 +09:00
Boris Chiou 93875ba2dd Bug 1249219 - Part 7: Test. r=birtles
Add tests in test_animation_observers.html, so we can test elements and pseudo
elements together by setting subtree.

--HG--
extra : rebase_source : 1841d5db93657a07772bc73ce99cb6ab2a43a737
2016-03-21 16:49:50 +08:00
Boris Chiou 956b429475 Bug 1249219 - Part 6: Support pseudo elements in Animation Mutation Observer. r=heycam
We use the parent element of a pseudo element as the subject to be notified.

Usage:
We record animations targeting to pseudo elements by setting subtree attribute
to true.

MutationObserver(Node, { subtree: ture });

So all the animations targeting to the pseudo elements whose parentElement is
the first argument will be recorded.

--HG--
extra : rebase_source : 3dc87802b65c74c3e5f2ed4504652ba14465fc02
2016-03-21 16:49:50 +08:00
Boris Chiou 0fab3e5678 Bug 1249219 - Part 4: Use NonOwningAnimationTarget as the returned value of some animation target getters. r=birtles
Use NonOwningAnimationTarget as the returned type of
1. KeyframeEffectReadOnly::GetTarget()
2. nsNodeUtils::GetTargetForAnimation(...)

--HG--
extra : rebase_source : 3b0e117528035329fdf4bdbee127f095b710805a
2016-03-21 16:49:50 +08:00
Boris Chiou efe45f15d3 Bug 1249219 - Part 3: Replace Pair<Element*, CSSPseudoElementType> with NonOwningAnimationTarget. r=birtles
--HG--
extra : rebase_source : 35e69a293cdb7a25ce579dbb453289ed3521e7e2
2016-03-21 16:49:50 +08:00
Boris Chiou 4f53d19ab1 Bug 1249219 - Part 2: Remove struct PseudoElementHashKey. r=birtles
We use NonOwningAnimationTarget as the hash key.

--HG--
extra : rebase_source : a31127e1be91fb4c6e9eb4070986ef7423b2f4dd
2016-03-21 16:49:50 +08:00
Boris Chiou 02817311d0 Bug 1249219 - Part 1: Define NonOwningAnimationTarget. r=birtles
NonOwningAnimationTarget is a struct made of two members:
1. mozilla::dom::Element*
2. mozilla::CSSPseudoElementType

--HG--
extra : rebase_source : df7ecf192c14f1973b064ffe8a31618df2e6955d
2016-03-21 16:49:49 +08:00
Brian Birtles d13c3ccf41 Bug 1254419 - Throw if we fail to allocate memory for a values array in getProperties(); r=bz
MozReview-Commit-ID: BmDC51qWXcu

--HG--
extra : rebase_source : 77e7656dc92c834980a83eaeb18c3fc87de16e80
extra : histedit_source : 900c1c301e1fed8a8744244c6d8a14ee1b27e9b9
2016-03-17 12:47:14 +08:00
Brian Birtles 936358e5da Bug 1254419 - Make always-set members of AnimationProperty(Value)Details required; r=bz
At the same time we also make the 'warning' member of AnimationPropertyDetails
no longer nullable and simply use the absence of the member to indicate "no
warning" (which is what we were already doing -- we were never actually setting
it to null).

MozReview-Commit-ID: HdRDbqhCdmw

--HG--
extra : rebase_source : 0282bd9f0e213aa0e1ed1f5b25d58b10fb3dbc0b
extra : histedit_source : 7d1f81dc57e2a55ab0ed6c4919a25b87819d9d58
2016-03-17 10:13:50 +08:00
Brian Birtles d77e2ed28e Bug 1254419 - Add tests for getProperties(); r=heycam
MozReview-Commit-ID: LrQf2t1L5TG

--HG--
extra : rebase_source : 57e31c2bd1bf9684c5bbff12ac89ec7870d1389e
2016-03-15 21:44:52 +08:00
Brian Birtles 85fb62f571 Bug 1254419 - Fill in values sequence in getProperties(); r=heycam
MozReview-Commit-ID: 1qMmy14R4DG

--HG--
extra : rebase_source : 258cb800de10b29250efd9daa77c8ac95864a640
2016-03-15 21:42:14 +08:00
Brian Birtles eeca04ee3b Bug 1254419 - Return animation property information from getProperties() even if the property is overridden; r=hiro
I think the reason we originally didn't do this is that the
"isRunningOnCompositor" status might be misleading for animations that are
being overridden. That is, there are some animations we don't send to the
compositor because they are being overridden by another animation (e.g. a
CSS animation touching the 'transform' animation will cause a CSS transition
on the same property not to run, despite the fact that transitions apply
higher in the cascade). This is not merely a performance optimization but means
we don't have to do the cascade on the compositor.

In the future, once we introduce additive animation, we won't be able to handle
this so simply since it an animation will be able to be partially overridden.
Instead, consumers of this API will need to look at the 'composite' member of
the various animation values to see if an animation is being fully or partially
overridden.

As a result, this API really should return all running animations, even if they
are currently being overridden.

MozReview-Commit-ID: DwmbXdCqF32

--HG--
extra : rebase_source : 14e5412015b6c2c7ec6b7e105d414a89fc746c77
2016-03-13 19:22:35 +08:00
Brian Birtles 6dcebb234a Bug 1254419 - Rename getPropertyState() to getProperties(); r=heycam, r=bz
We are now extending this API to include more than just metadata about each
animated property but also the property values themselves.

Note that we can't use the name AnimationProperty for the dictionary since
we already use that name internally and [BinaryName] doesn't seem to apply to
dictionaries.

MozReview-Commit-ID: AcXeN4fsgTz

--HG--
extra : rebase_source : 714fdf85484775244daad6aaa288b1ec73ad6793
2016-03-13 19:10:10 +08:00
Brian Birtles 55ce436b8a Bug 1254419 - Move GetPropertyState alongside GetFrames; r=hiro
This better matches the order in the WebIDL and, once we rename
GetPropertyState to GetProperties it will make sense for GetFrames and
GetProperties to be side-by-side.

MozReview-Commit-ID: 67s9WGksPFv

--HG--
extra : rebase_source : f38ea60c0fec2f063126a0aa73422230189afbf5
2016-03-15 21:18:50 +08:00
Brian Birtles 9f1ba68aef Bug 1254419 - Fix zero-length segment handling; r=heycam
Later in this patch series when we convert tests from web-platform tests to
mochitest-chrome tests, some of the test cases that use zero-length segments
(overlapping keyframes at certain offsets) would trigger failed assertions
in KeyframeEffectReadOnly::ComposeStyle. This is because this method was
originally written with CSS animations in mind where segments cannot be
zero-length. Furthermore, when these same tests cases are run as
web-platform-tests, the failed assertions are not visible.

This patch adjusts the handling of segments to allow zero-length segments and
adds a test to check that the handling matches that defined in Web Animations
which is summarized in the following informative note,

  "this procedure permits overlapping keyframes. The behavior is that at the
  point of overlap the output value jumps to the value of the last defined
  keyframe at that offset. For overlapping frames at 0 or 1, the output value
  for iteration progress values less than 0 or greater than or equal to 1 is the
  value of the first keyframe or the last keyframe in keyframes
  respectively."[1]

[1] https://w3c.github.io/web-animations/#the-effect-value-of-a-keyframe-animation-effect

MozReview-Commit-ID: JdyYbGZtbot

--HG--
extra : rebase_source : 00502ec8aec423196376e29bf4b70ef0ff178e29
2016-03-15 21:13:46 +08:00
Hiroyuki Ikezoe 4e06af5a13 Bug 1218620 - Part 2: Skip all 'preserve-3d' tests which breaks other compositor frames. r=birtles
MozReview-Commit-ID: 85dk5yOYizZ

--HG--
extra : rebase_source : a2cc3fa74b4bc967b58129458ab084e2a56acc74
2016-03-14 13:08:11 +09:00
Hiroyuki Ikezoe 45a7f9a679 Bug 1218620 - Allow opacity animation running on compositor even if the frame has any restricted transforms. r=birtles
The type name has been changed and re-ordered.

MozReview-Commit-ID: 78jrJ6a9Pro

--HG--
extra : rebase_source : f47e6bf27d8e48d10b3af123308c2ab89e71d8e1
2016-03-14 09:07:48 +09:00
Brian Birtles 107642839f Bug 1246320 part 5 - Simplify KeyframeEffect(ReadOnly) Constructor overloads further; r=hiro
As well as generally simplifying the different KeyframeEffect(ReadOnly)
constructor methods, this patch also means we will use the realm document for
parsing timing functions in all cases. Although this currently doesn't have
any impact (the current set of timing functions are expected to be parsed
identically regardless of the document used) it may become significant if, in
future, it becomes possible to register hooks with certain documents for
parsing CSS properties as part of the houdini efforts.

MozReview-Commit-ID: 4gAZi1G1uAD

--HG--
extra : rebase_source : f619592a02ddcbe56835344ec1fb3023219cd2d3
2016-03-12 22:14:10 +09:00
Brian Birtles 6846d9e23b Bug 1246320 part 4 - Pass a document to TimingParams; r=hiro
MozReview-Commit-ID: 9Sh8eWHdDD6

--HG--
extra : rebase_source : 2dc0da7076b8acaaca257583f3780266ae62b430
2016-03-11 17:27:34 +09:00
Brian Birtles 036f647012 Bug 1246320 part 3 - Rework KeyframeEffect(ReadOnly) constructor helpers; r=hiro
Once we update TimingParams to take a document, we will need to get an
appropriate document within the various constructor methods. This complicates
these methods and suggests they should be pushed into the .cpp file where
we can hide the complexity more easily and templatize the type of the options
argument so that we can share the document-fetching code.

By moving all uses of the declared template methods to the .cpp file we
can drop the explicit instantiations.

(We still need to declare the templated methods in the header file since
these methods need to be protected methods of KeyframeEffectReadOnly in
order to construct a KeyframeEffectReadOnly since its constructor is
protected.)

MozReview-Commit-ID: 8KrCWrWIb7X

--HG--
extra : rebase_source : c5b550b271cc68ceeb60a25243268a17b3ab7f65
2016-03-11 17:27:16 +09:00
Brian Birtles 3edb5638a1 Bug 1246320 part 2 - Pass document to ParseEasing; r=hiro
MozReview-Commit-ID: KWW53htO0Jj

--HG--
extra : rebase_source : 85aaa0a66cae7623fa06ebf31e0b8481ee05bbde
2016-03-11 17:21:03 +09:00
Brian Birtles 56844c08b6 Bug 1246320 part 1 - Add AnimationUtils::GetCurrentRealmDocument; r=bz
Adds a utility function for getting the document on the global associated with
a JSContext. We will need this in various situations where we want to use
the CSS parser (which requires various bits of state we pull off a document)
to parse a timing function but might not have a target element.

Strictly speaking we currently always have a target element but in future we
expect to support creating KeyframeEffects without an associated target
element. Also, we will need this for some situations in bug 1245748 where we
need to parse CSS properties on keyframe objects when we may not have a
target element.

MozReview-Commit-ID: Klku1LFoRGp

--HG--
extra : rebase_source : f2aa06aafb8fa9b212791a3e602a168f5170fcd9
2016-03-11 17:20:17 +09:00
Brian Birtles 2c723064d6 Bug 1246320 part 0 - Whitespace fixes; r=whitespace-only
MozReview-Commit-ID: CpULkfcd21R

--HG--
extra : rebase_source : 5f14fceea5fbbe64dc4076fd283125a4b51b28e9
2016-03-11 17:15:23 +09:00
Daisuke Akatsuka 07b681672e Bug 1244638 - Part 3: Rename method from NotifyTimingUpdate to PostSpecifiedTimingUpdated. r=birtles
MozReview-Commit-ID: H0fBTwqiZiS

--HG--
extra : rebase_source : 7e26f38006faff26b0f1fbf66a1062b9b12d1ac4
2016-03-11 15:40:32 +09:00
Daisuke Akatsuka b4e46e7179 Bug 1244638 - Part 2: Throw TypeError if iterationStart is NaN, negative value or Infinity. r=birtles, r=smaug
MozReview-Commit-ID: A8zSm6TgwOP

--HG--
extra : rebase_source : 50e88537430cf6cfc5552350a818128f0ff7756f
2016-03-11 18:04:39 +09:00
Daisuke Akatsuka 46e09dcc48 Bug 1244638 - Part 1:implement AnimationEffectTiming iterationStart. r=birtles, r=smaug
MozReview-Commit-ID: K9UfNViDMHz

--HG--
extra : rebase_source : 6d521503b0c80b285c7a9bfc0226f17e5648c482
2016-03-11 17:22:32 +09:00
Boris Chiou 6f9f86f788 Bug 1254418 - Part 2: Test getAnimations for generated-content elements. r=birtles 2016-03-10 22:16:00 -05:00
Ryo Motozawa f7a0ff2a51 Bug 1254881 - Fix animation duration in dom/animation/test/chrome/test_running_on_compositor.html. r=hiro
MozReview-Commit-ID: Dd42HicB0Ci

--HG--
extra : rebase_source : 0141baba051fd9a2c39ce18296799d921b518122
2016-03-09 01:08:00 -05:00
Hiroyuki Ikezoe 0e6b05c3b8 Bug 1254840 - Use longer animation duration to avoid intermittent failures on slow platforms. r=dholbert
MozReview-Commit-ID: FXrO0yI7Irt

--HG--
extra : rebase_source : dc9a4b629d9cb34821e0ba2ae2108454a9781805
2016-03-10 09:36:04 +09:00
Daisuke Akatsuka 2d2c72ccbf Bug 1237173 - Part3: Throw TypeError if duration is NaN, negative value or not 'auto' string. r=birtles, r=smaug 2016-03-09 14:01:45 +09:00
Daisuke Akatsuka cb51780a6e Bug 1237173 - Part2: Change type of duration to Maybe<StickyTimeDuration>. r=birtles 2016-03-09 14:14:20 +09:00
Daisuke Akatsuka 642702e0bb Bug 1237173 - Part1: Move TimingParam struct to a new file. r=birtles 2016-03-07 14:11:11 +09:00
Ryo Motozawa 2c887f4afc Bug 1244635 - Part2 Add enddelay tests in dom/animation/test/chrome r=hiro
MozReview-Commit-ID: Kylwd6UJcXH

--HG--
extra : rebase_source : 0da2ed9e152e2e57a42f044be896e39e3f701bd3
2016-03-08 10:31:28 +09:00
Ryo Motozawa ec7074d1bf Bug 1244635 - Part1 Add enddelay implementation in dom/animation/AnimationEffectTiming.cpp r=bz,hiro
MozReview-Commit-ID: 7t1fm0zB3V

--HG--
extra : rebase_source : 812ea17b0b51142ff88194b0bb0d06435ddc574d
2016-03-08 10:31:10 +09:00
Jonathan Watt a73bd8c354 Bug 1253094, part 1 - Stop using DebugOnly for class/struct members in dom/. r=baku
MozReview-Commit-ID: ErWZs9oV4WS
2016-02-26 15:52:06 +00:00
Boris Chiou ce5add21a7 Bug 1241784 - Part 2: Implement CSSPseudoElement.animate(). r=birtles 2016-03-04 00:54:00 +01:00
Hiroyuki Ikezoe 9cacbd5b2d Bug 1196114 - Part 5: Store performce warning information as enum type. r=birtles
Each warning message is generated only when getPropertyState() is called.

MozReview-Commit-ID: C03ZSvPv9ff

--HG--
extra : rebase_source : 5932957f8f0b171c7b100b1c22e70513959c819e
2016-03-04 17:54:25 +09:00
Hiroyuki Ikezoe 53fd8ccffb Bug 1196114 - Part 4: Localize messages for animation performance warnings. r=birtles
MozReview-Commit-ID: LPSHU2T3oP4

--HG--
extra : rebase_source : 898e11b02edd3f80452c8c2714b8364288a3fe75
2016-03-04 15:48:50 +09:00
Hiroyuki Ikezoe d7ac86e556 Bug 1196114 - Part 3: Set AnimationPerformanceWarning messages. r=birtles
Those message will be modified in part 4 (localization).

MozReview-Commit-ID: 6TMUxemVLcu

--HG--
extra : rebase_source : 65ef1879b3e606ae6dc279981b1e995c7b2cd40b
2016-03-04 15:07:04 +09:00
Hiroyuki Ikezoe e3df4388fc Bug 1196114 - Part 2: Add AnimationPropertyStatus interface and KeyframeEffectReadOnly.runningStatus(). r=birtles,smaug
MozReview-Commit-ID: CPz3DtWxKll

--HG--
extra : rebase_source : 5a210456997789ace942e60c3688f9600df3281c
2016-03-04 06:36:41 +09:00
Hiroyuki Ikezoe 3534158709 Bug 1196114 - Part 1: Add SetPerformanceWarning. r=birtles
MozReview-Commit-ID: 8NqvuOjKfZM

--HG--
extra : rebase_source : 07c0a1500171569de0471b96f22bd79c38165e02
2016-03-04 06:36:36 +09:00
Jonathan Watt 1c0c9bcf8a Bug 763784 - Make VectorImage::GetAnimated check for CSS animations. r=dholbert 2016-02-22 13:05:20 +00:00
Daisuke Akatsuka 0b1a2c1ae5 Bug 1248338 - Implement iterationStart; r=birtles 2016-03-02 16:23:34 +09:00
Ryo Motozawa d88bc0fdce Bug 1244641 - Part 4: Add duration tests in dom/animation/test/chrome. r=hiro
MozReview-Commit-ID: H2XbCfrzn8o

--HG--
extra : transplant_source : %CA%3C%A6%87%C7g%27%27z%E2%3D%09%3F4H%F2%21%D4H%1A
2016-02-27 06:39:58 +09:00
Ryo Motozawa 961d6c8802 Bug 1244641 - Part 3: Notify animation mutation observers from AnimationEffectTiming::SetDuration. r=hiro
MozReview-Commit-ID: LxssvTBRbRF

--HG--
extra : transplant_source : %F3i%CC%DB%04%FB%08%7C%E9%D3%A1%B39%DD%B34%14%F9%91%D7
2016-02-27 06:39:49 +09:00
Ryo Motozawa 48a1f4e4f0 Bug 1244641 - Part 2: Add duration implementation in dom/animation/AnimationEffectTiming.cpp. r=hiro, r=smaug
MozReview-Commit-ID: K5wmKo1U2JP

--HG--
extra : transplant_source : %FD%F3y%D6%ED%E7%B0%1Cc%A9%CD2%B8%BFcH%A4%B5%D0%8F
2016-02-27 06:39:39 +09:00
Ryo Motozawa ec3f99ba71 Bug 1244641 - Part 1: Let AnimationEffectTiming have an effect. r=hiro
MozReview-Commit-ID: REfKyGs4HK

--HG--
extra : transplant_source : %1D%BF%B3%7EU%C1%AEp%FC%E7%97%9Ds%1C%C1.%DAS%12%EF
2016-02-27 06:39:30 +09:00
Boris Chiou f7bc255d47 Bug 1234403 - Part 5: Test for CSSPseudoElement.getAnimations. r=birtles 2016-02-24 19:12:00 +01:00
Boris Chiou 0a915f46c1 Bug 1234403 - Part 4: Test for the animation order returned by document.getAnimations(). r=birtles 2016-02-24 03:13:00 +01:00
Boris Chiou 72df62cbf6 Bug 1234403 - Part 3: Test for the CSSPseudoElement objects returned by effect.target. r=birtles 2016-02-24 03:12:00 +01:00
Boris Chiou 1c9da6a517 Bug 1234403 - Part 1: Implement CSSPseudoElement.getAnimations. r=birtles 2016-02-18 02:21:00 +01:00
Brian Birtles d06f85599d Bug 1239945 part 1 - Drop a number of animation manager/collection-related methods that are unused (and in some cases undefined); r=dholbert 2016-02-24 13:41:16 +09:00
Hiroyuki Ikezoe 606ae12164 Bug 1242872 - Part 6: Trigger a layer update explicitly when copying animation properties. r=birtles
MozReview-Commit-ID: AWL43ypqLPT
2016-02-19 09:16:15 +09:00
Hiroyuki Ikezoe e80b4bb7b2 Bug 1242872 - Part 5: Change CopyPropertiesFrom to UpdateProperties. r=birtles
Once we don't create any temporary effect, we do not need to pass
the effect to CopyPropertiesFrom.

MozReview-Commit-ID: HczU5IU6Ggp
2016-02-19 09:16:15 +09:00
Cameron McCormack 89cac5abd1 Bug 1248864 - Part 3: Use RestyleManagerHandle instead of concrete restyle manager class. r=dholbert 2016-02-24 18:01:12 +11:00
Cameron McCormack 736a5f47e7 Bug 1248864 - Part 1: Move RestyleManager.h to EXPORTS.mozilla. r=dholbert 2016-02-24 18:01:12 +11:00
Hiroyuki Ikezoe 4e9c9820e9 Bug 1249431 - Need preferences for crash tests using Web Animation APIs. r=birtles
MozReview-Commit-ID: 5ybJUTgy7bW

--HG--
extra : transplant_source : k%7B%3Cz%7C%C8%AE%A8%C4rsks%15f%16%1C%9E%D6%D1
2016-02-19 07:46:42 +09:00
Boris Chiou 54f794359b Bug 1249230 - Prepend an extra colon to the pseudo type string. r=birtles 2016-02-18 19:35:00 +01:00
Boris Chiou 5c37ed6ba0 Bug 1244049 - Part 4: Define CSSPseudoElementTypeBase. r=dbaron
In order to convert CSSPseudoElementType into its underlying type easier,
we define CSSPseudoElementTypeBase. However, keep using uint8_t directly for
forward declarations.
2016-02-18 19:18:00 +01:00
Hiroyuki Ikezoe c5b7bd9a33 Bug 1216842 - Part 12: Extrapolate bezier function outside [0,1]. r=birtles
We use the tangent at the each boundary points as same as Chrome does.
2016-02-18 14:22:00 +01:00
Hiroyuki Ikezoe 10fdacf755 Bug 1216842 - Part 11: Clamp values of step functions outside [0, 1]. r=birtles 2016-02-18 14:21:00 +01:00
Hiroyuki Ikezoe bff8c71b2a Bug 1216842 - Part 10: Remove the limit of the computed timing progress. r=birtles
Now we produce computed timing progress outside [0,1] range.
We use the last segment to calculate animation values if the value is greater than 1.
We use the first segment to calculate animation values if the value is lesser than 0.
2016-02-18 14:20:00 +01:00
Brian Birtles 1a43924a8a Bug 1249212 part 7 - Calculate the endTime in GetComputedTimingAt; r=boris
Currently endTime is calculated when getComputedTiming() is called. As a
result, the value returned there doesn't necessarily reflect what we are using
in the model. It would be more simple, consistent and useful if we simply
calculate this as part of GetComputedTimingAt and use it both internally and in
the result to getComputedTiming().
2016-02-19 08:37:32 +09:00
Brian Birtles 54a06996e5 Bug 1249212 part 5 - Remove max() clamping from endTime calculation; r=boris
Based on discussion at: https://github.com/w3c/web-animations/issues/86
2016-02-19 08:37:32 +09:00
Brian Birtles 7f5b1d41f0 Bug 1249212 part 3 - Fix active duration calculation when iteration duration is infinity; r=boris
With the added tests in part 4 we crash without this change because we end up
trying to multiply an infinite iteration duration by a zero iteration count
which trips an assertion in StickyTimeDuration. Hence we fix this behavior
before adding the tests.
2016-02-19 08:37:31 +09:00
Boris Chiou e436478f26 Bug 1244049 - Part 2: Replace nsCSSPseudoElements::Type with CSSPseudoElementType. r=dbaron
Also, try to use forward declaraions for CSSPseudoElementType;

--HG--
extra : rebase_source : c00eb9753e8f618a33aa711538ac45c0132b353c
2016-02-17 21:37:00 +01:00
Boris Chiou 185a769719 Bug 1244049 - Part 1: Define scoped enum for CSSPseudoElement type. r=dbaron
--HG--
extra : rebase_source : e53dd269e47fa97eb259ebd9295d012eacbdb612
2016-02-16 23:07:00 +01:00
Juan Gomez 8ea937311f Bug 1248581 - Fix build bustage on WakeLock.h and CSSPseudoElement.h. r=khuey
--HG--
extra : rebase_source : 1f6ac7072abea2a610443caee467e7ba191218ae
2016-02-16 15:08:00 +01:00
Martin Thomson ebd25ddf94 Bug 1248105 - Move CSSPseudoElement::GetParentObject out of header, r=boris
MozReview-Commit-ID: 5vZQlv8q0df

--HG--
extra : rebase_source : 57a9ab8a5e579b8533e74ab8e6c6ec8d77ef4ea7
2016-02-15 11:51:34 +11:00
Ryo Motozawa cc127029f8 Bug 1244586 part 1 - Add KeyframeEffect constructor in dom/webidl/KeyframeEffect.webidl. r=smaug,birtles 2016-02-15 09:34:47 +09:00
Ryo Motozawa e54a74b405 Bug 1226047 - Add AnimationEffectTiming interface in dom/webidl/AnimationEffectTiming.webidl. r=smaug,birtles 2016-02-15 09:34:47 +09:00
Ryo Motozawa c49b9b29db Bug 1211783 - Add KeyframeEffect interface to dom/webidl/KeyframeEffect.webidl. r=smaug,birtles 2016-02-15 09:34:47 +09:00
Chris Peterson f6442f17d6 Bug 1247531 - Annotate intentional switch fallthrough to suppress -Wimplicit-fallthrough warning in dom/animations/. r=dholbert
dom/animation/AnimationUtils.cpp:73:9: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
2016-02-10 23:04:28 -08:00
Boris Chiou bce920d78f Bug 1174575 - Part 6: Implement KeyframeEffectReadOnly Constructor for CSSPseudoElement. r=birtles
Let KeyframeEffectReadOnly::Constructor support both Element and
CSSPseudoElement as the target.
2016-02-09 05:05:00 +01:00
Boris Chiou 8627ee5709 Bug 1174575 - Part 5: Support pseudo-element type in StyleAnimation. r=birtles
Add one more argument, nsCSSPseudoElement::Type, for
StyleAnimation::ComputeValue and StyleAnimation::ComputeValues
2016-02-09 05:04:00 +01:00
Boris Chiou 2a5bfa8330 Bug 1174575 - Part 4: Support CSSPseudoElement for TimingParams. r=birtles 2016-02-05 19:11:00 +01:00
Boris Chiou 84a4a3fe03 Bug 1174575 - Part 3: Implement KeyframeEffectReadOnly::GetTarget(). r=birtles
Implement GetTarget() and functions of CSSPseudoElement.
We use a strong reference from CSSPseudoElement to Element and a non-owning
reference from Element to CSSPseudoElement.
2016-02-01 23:59:00 +01:00
Boris Chiou 2f694d7e1e Bug 1174575 - Part 2: Replace Element in KeyframeEffectReadOnly WebIDL. r=birtles, r=smaug
Use (Element or CSSPseudoElement)? as the first arguement of constructor and
the type of target.
2016-02-05 19:01:00 +01:00
Boris Chiou 8098462872 Bug 1174575 - Part 1: Define CSSPseudoElement interface. r=birtles, r=smaug
Create CSSPseudoElement.webidl, CSSPseudoElement.h, and CSSPseudoElement.cpp.
2016-02-01 23:49:00 +01:00
L. David Baron 4cc8e3dd91 Bug 1245075 patch 2 - Fix EffectSet::GetEffectSet(nsIFrame*) and EffectCompositor::GetAnimationElementAndPseudoForFrame to only return effects when the frame is the style frame for its content. r=birtles
This means that we won't associate animations with additional frames.
In this case, this fixes associating off-main-thread animations with a
table outer frame, when they should have been associated only with the
table frame.

Locally, the test fails without the patch (with opacity in the test
being 0.36 instead of the expected 0.6), and passes with the patch.
(Opacity 0.36 gives a color of rgb(163,163,255), whereas 0.6 gives
rgb(102,102,255).)

--HG--
extra : commitid : 7wtkIDLDHBF
2016-02-07 08:43:49 -08:00
Matt Woodrow 7cd754d8cf Bug 1229317 - Allow preserve-3d and opacity to be combined on the root element of a preserve-3d chain. r=roc 2016-02-07 23:51:11 +13:00
Hiroyuki Ikezoe 8a841d093a Bug 1241692 - Part 2: We should observe stylings only for animations. r=dholbert
We don't need observe restylings other than animations.  If those restylings
happen, it's just noise for this test.  We should drop them.

--HG--
extra : transplant_source : 9%0B%0B%B7O%E5R%86%D4%7F%29%90q%DDQ0%0B%FAuJ
2016-02-06 20:38:24 +09:00
Hiroyuki Ikezoe f8177694cb Bug 1241692 - Part 1: Ensure that element which is added in each test is removed before subsequent test is processed. r=dholbert
Before this fix, sometimes an element which was removed in a prior test
would still visible when subsequent test starts.
We should wait for paints to complete after the element has been removed.

--HG--
extra : transplant_source : %C7%7F%03%0F%DA%05A%C1%CE%F0m%DA1%C5%1D%FA%06%FA%FE%CA
2016-02-06 20:38:12 +09:00
Cameron McCormack 02cfaf41a1 Bug 1244595 - Don't check whether shorthands are non-animatable when parsing JS keyframe objects. r=birtles 2016-02-05 08:56:11 +11:00
Hiroyuki Ikezoe c35622c465 Bug 1239889 part 2 - Test for an animation target without a current document; r=birtles 2016-02-05 14:11:04 +11:00
Brian Birtles 73e4706ab3 Bug 1239889 part 1 - Throw if the animation target does not have a current document; r=heycam
This is just a temporary measure to avoid a failed assertion / crash until we
fix bug 1245748.
2016-02-05 14:11:04 +11:00
Birunthan Mohanathas d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Hiroyuki Ikezoe f03d398a98 Bug 1244080 - Part 1: Test that setting duration in the middle of the animation causes only once a restyling. r=bbirtles 2016-02-01 00:46:00 +01:00
Hiroyuki Ikezoe 05a9e1b0ad Bug 1244080 - Part 0: Remove unnecessary argument for remove(). r=bbirtles 2016-02-01 00:46:00 +01:00
Hiroyuki Ikezoe 1f0f8d7a93 Bug 1216842 - Part 8: Calculate transformed progress using animation effect's timing function. r=cam
http://w3c.github.io/web-animations/#calculating-the-transformed-time
2016-01-29 14:48:00 +01:00
Hiroyuki Ikezoe 15210ae758 Bug 1216842 - Part 6: Make mTimingFunction in OrderedKeyframeValueEntry const Maybe<>*. r=cam 2016-01-29 14:47:00 +01:00
Hiroyuki Ikezoe c3619f4a48 Bug 1216842 - Part 5: Store ComputedTimingFunction in TimingParams. r=cam
The reason why we use Maybe<> to store the function is that CSS
animations/transitions do not have the function property.
2016-01-29 14:45:00 +01:00
Hiroyuki Ikezoe 03409db313 Bug 1216842 - Part 4: Move ParseEasing into AnimationUtils. r=cam
ParseEasing will be also used in AnimationEffectTimingReadOnly class.
2016-01-27 02:08:00 +01:00
Hiroyuki Ikezoe ba1bb81b2e Bug 1216842 - Part 3: Change ComputedTimingFunction* to Maybe<ComputedTimingFunction>. r=cam
Nothing() represents linear function, i.e. skip calculation.
ParseEasing is changed to return a Maybe<ComputedTimingFunction>,
if timing function is linear function, ParseEasing returns Nothing().
2016-01-29 14:44:00 +01:00
Hiroyuki Ikezoe 409715935c Bug 1216842 - Part 2: Add LayerAnimationUtils. r=cam
This is also for compositor side.
we need a new class to share the function which converts TimingFunction
to ComputedTimingFunction for either keyframe's timing function or keyframe
effect's timing function.
2016-01-29 14:44:00 +01:00
Phil Ringnalda d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Brian Birtles ef5aaf9e4c Bug 1096773 part 4 - Add tests for Animatable.animate(); r=bz 2016-01-29 12:37:52 +11:00
Brian Birtles 5358a5c81e Bug 1096773 part 3 - Implement Animatable.animate(); r=bz 2016-01-29 12:37:52 +11:00
Brian Birtles 5dbcb5013b Bug 1096773 part 2 - Add a KeyframeEffectReadOnly constructor that takes a TimingParams argument; r=boris
This will allow us to re-use the constructor from Animatable.animate() since the
existing type, UnrestrictedDoubleOrKeyframeEffectOptions, is not compatible with
UnrestrictedDoubleOrKeyframeAnimationOptions (introduced in the next patch in
this series), as used by Animatable.animate()
2016-01-29 12:37:52 +11:00
Brian Birtles d9fb138530 Bug 1096773 part 1 - Make the frames argument to the KeyframeEffectReadOnly constructor NOT optional; r=bz
This is to line up with the spec as discussed in:

  https://bugzilla.mozilla.org/show_bug.cgi?id=1096773#c6
2016-01-29 12:37:52 +11:00
Hiroyuki Ikezoe 2e4a107162 Bug 1235286 - Part 3: Comment out some compositor animations tests. r=birtles
In current our implemantation, animations which can run on compositor
in invisible element can not run on compositor on all desktop platforms.
*BUT* both on Android and B2G the animations still run on compositor somehow.

And one more thing.  Animations can run on compositor in elements which are
scrolled out in the parent element *RUN* on compositor as well.

mochitest does not allow us to disable each test on specific platforms respectively.
One we have mozinfo in mochitest (bug 1150818), we can skip the tests on specific platforms.
2016-01-20 02:31:00 +01:00
Hiroyuki Ikezoe 7d7693b812 Bug 1235286 - Part 2: Tests for animation optimizations. r=birtles
--HG--
extra : transplant_source : %05%087%F1%8En%C5V%F5%D9ds%7D%C8%5CsB%02%87%EC
2015-12-25 19:37:34 +09:00
Hiroyuki Ikezoe cf03d3bfaf Bug 1235286 - Part 1: Add an argument to waitForAnimationFrames to run a task in each requestAnimationFrame callback. r=birtles
--HG--
extra : transplant_source : %AF%A0%20%B8%D7%3A%7F%C2_y%0A%82%88w%5E%95%8D%17%EA%EF
2016-01-08 09:49:04 +09:00
Hiroyuki Ikezoe 33ce2fba3e Bug 1240646 - Do not unthrottle animations if RestyleType::Throttled is specified. r=bbirtles 2016-01-18 20:54:00 +01:00
Brian Birtles b47411b097 Bug 1240228 - Don't update an effect's timing when tweaking its animation's hold time; r=heycam
In some circumstances when composing style, we tweak the time of the animation
before telling the effect to compose style. This is to avoid visual flicker in
certain situations where the main thread progress is being synchronized with an
animation running on the compositor.

In the past, effects would store their latest sample time locally so when
tweaking the animation time, we would need to call UpdateEffect() after tweaking
the time, and then again after restoring it as otherwise the style composed by
the effect would not reflect the adjusted time.

Now, however, effect's always query their animation for the time so this is no
longer necessary. Furthermore, the actions triggered by UpdateEffect are not
desirable in this case because they can, amongst other things, cause the
associated EffectSet to be destroyed and recreated.

Specifically, Animation::UpdateEffect() calls
KeyframeEffectReadOnly::NotifyAnimationTimingUpdated() which:

  * Calls UpdateTargetRegistration which can trigger EffectSet
    destruction/creation which is undesirable in this case because we intend to
    restore whatever changes we make to the Animation's state and deleting and
    recreating the EffectSet will cause any pointers to it to dangle.

  * Cause us to possibly reset the "is running on compositor" status.
    This too is undesirable since we intend to restore the state of the
    Animation immediately after tweaking the hold time so we don't want to
    act as if any state has changed.

  * Similarly for marking the cascade as possibly needing an update or
    requesting a restyle.

In summary, all the actions performed by NotifyAnimationTimingUpdated are
unnecessary and undesirable in this situation where we are temporarily tweaking
an Animation's current time only to restore it immediately afterwards since the
actions are all involved with recognizing actual changes in state.
2016-01-19 08:05:08 +09:00
Brian Birtles 54283ba569 Bug 1226091 - Use MayHaveAnimations flag for animations on pseudo elements too; r=smaug 2016-01-18 13:40:12 +09:00
Hiroyuki Ikezoe 54e83307e3 Bug 1096774 - Part 2: Fix crash if animation has no timeline. r=birtles 2016-01-14 19:27:00 -05:00
Hiroyuki Ikezoe 4c0263a3ed Bug 1096774 - Part 1: Implement Animation Constructor. r=birtles, r=smaug 2016-01-16 19:02:00 -05:00
Brian Birtles 6fb8992111 Bug 1235112 - Move animation style rule processors to EffectCompositor; r=heycam 2016-01-15 15:15:47 +09:00
Brian Birtles b324d8ff0d Bug 1237467 part 4 - Delete the EffectSet when it becomes empty; r=heycam 2016-01-15 15:15:47 +09:00
Brian Birtles a44af735dd Bug 1237467 part 3 - Add debug methods to determine if an EffectSet is currently being enumerated; r=heycam 2016-01-15 15:15:47 +09:00
Brian Birtles 15169cd872 Bug 1237467 part 2 - Clear mProgressOnLastCompose when the effect is no longer relevant; r=heycam 2016-01-15 15:15:47 +09:00
Brian Birtles a22e719c48 Bug 1237467 part 1 - No longer mark element as needing an animation restyle if we go to restyle it and it no longer has an effect set; r=heycam 2016-01-15 15:15:47 +09:00
Boris Chiou 86a80f4228 Bug 1214536 - Part 8: Add an operator=() for TimingParams. r=birtles
Overload TimingParams::operator=() for AnimationEffectTimingProperties objects,
so we can assign an AnimationEffectTimingProperties/KeyframeEffectOption object
to a TimingParams object.

We also keep the uninitialized state of KeyframeEffectOptions::mDuration while
converting a KeyframeEffectOptions object into a TimingParams object.
2016-01-13 18:42:00 +01:00
Boris Chiou deee95a0d8 Bug 1214536 - Part 7: Rename AnimationTiming as TimingParams. r=birtles, r=smaug
1. struct AnimationTiming -> struct TimingParams
2. AnimationEffectReadOnly::TimingAsObject() -> AnimationEffectReadOnly::Timing()
3. KeyframeEffectReadOnly::Timing() -> KeyframeEffectReadOnly::SpecifiedTiming()
2016-01-13 18:41:00 +01:00
Boris Chiou d03ac9c993 Bug 1214536 - Part 6: Revise AnimationTiming::operator==. r=birtles 2016-01-13 18:38:00 +01:00
Boris Chiou fa79443f12 Bug 1214536 - Part 5: Add AnimationEffectTimingReadOnly interface. r=birtles, r=smaug
1. Add AnimationEffectTimingReadOnly.webidl.
2. Add AnimationEffectTimingReadOnly cpp files.
3. Use AnimationEffectTimingReadOnly as KeyframeEffectReadOnly::mTiming.

--HG--
extra : rebase_source : 0e9c112b70ae56f2bcdf162374388857518fc124
extra : amend_source : 0aebf0e9daac77542d913e4ad6a07c75e21a93b5
2016-01-13 18:37:00 +01:00
Boris Chiou 71cff999e0 Bug 1214536 - Part 4: Use OwingUnrestrictedDoubleOrString for duration. r=birtles
We store the original value of duration in AnimationTiming, and add
computed duration in ComputedTiming, so both the Timing model and
AnimationEffectTimingReadOnly can get what they want.

By the way, replace mIterationDuration with mDuration.

--HG--
extra : rebase_source : f8e1fd648572e6d7b1cbecc2ac1888a2f74bbc7e
2016-01-13 18:36:00 +01:00
Boris Chiou 76f7e5a44e Bug 1214536 - Part 3: Store the original value of fill. r=birtles
FillMode could be 'auto', and we should treat it as 'none' in the timing model.
However, AnimationEffectTimingReadOnly should get its original value.

By the way, replace mFillMode with mFill.

--HG--
extra : rebase_source : 5a397dd7fbb22ac76fe96003d82d097e398852c7
2016-01-13 18:36:00 +01:00
Boris Chiou 44cb5bee0a Bug 1214536 - Part 1: Use unrestricted double for iterations. r=birtles
We want to store the original value from KeyframeEffectOptions whose
iterations is unrestricted double. Therefore, we can get the original value
of iterations by AnimationEffectTimingReadOnly.

By the way, replace mIterationCount with mIterations.

--HG--
extra : rebase_source : da2953056031079c41273ed977545dc926e1b83c
2016-01-10 18:41:00 +01:00