Commit Graph

751 Commits

Author SHA1 Message Date
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