Currently we have:
assert_animation_property_state_equals
assert_animation_property_state_on_compositor
and it's not clear what the difference is. This patch renames the latter to make
it clear it is testing that all properties are running on the compositor.
MozReview-Commit-ID: 3PRm8fse9UI
--HG--
extra : rebase_source : ff89d0e6a5f9e59990ead431200726b492f71e81
extra : histedit_source : c003d1806baf2a97252a734506ac2934e01a4839
Currently these tests are hard to read because the test data is separated from
the test function so it's not clear what each of the fields mean or how to use
it. This patch just brings the test data and test functions alongside
one-another so they are easier to read.
MozReview-Commit-ID: EzFLDG4YiXh
--HG--
extra : rebase_source : 9a6745e908e1794dd92c8d264acc6c61923f4242
extra : histedit_source : 1961454b749bc9cf74d5ae9eef4ac9e4d827179c
Test cases in file_composite.html are matching pair of tests in
web-platform-tests.
MozReview-Commit-ID: ApuvVCHKQ8Y
--HG--
extra : rebase_source : 58342389a3eb1ed2a3c1889b5ce974dbde19c32f
This patch adds a hashtable to store the non-animated base style of each
property in EffectSet class if the following conditions are met.
1) the effect is the lowest priority of the effect
2) the effect is additive or accumulative
The styles are stored as StyleAnimationValue objects since it's handy class to
store a CSS value for different properties.
MozReview-Commit-ID: 1MZV7MnqzfI
If all of animations on an element are paused, finished or zero playback rate,
we don't send those animations to the compositor.
Also in this change, we send zero active duration animations to the compositor
in the same way as normail animations.
MozReview-Commit-ID: CHjv6Buy5fa
To check simulateComputeValuesFailure flag in chrome privilege, we will need
to know the core Web Animations API preference is enabled in chrome privilege.
MozReview-Commit-ID: GYRMc9Od4Bm
Missing keyframe will be handled only if the Web Animatins API is enabled.
Test cases in file_partial_keyframes.html will not throw any exceptions once
we handle missing keyframe because they are run with the Animations API pref,
but still we should run the test cases with disabled the pref. So we are now
going to move the test cases into file_disable_animations_api_code.html.
We can't use KeyframeEffectReadOnly contructor in a new test file since the
constructor is also behind the Web Animations API pref.
MozReview-Commit-ID: 9ApVxJebBUj
When we are composing style for the Animations level of the cascade,
if we have transitions-level animations, we *also* need to compose them if we
have animations-level animations that build on top of them using additive or
accumulative composite modes.
However, we should not build those transitions-level animations unless they will
be built on or overridden by a regular animations-level animation. Otherwise
we will end up with transitions-level animations in the animations-level and
while transitions-level will override the animations-level in the cascade,
once the transition finishes there will be nothing to remove the cached
animations-level animation rule.
MozReview-Commit-ID: LaRabzDSsO5
--HG--
extra : rebase_source : 256efb5779a8cbcc8ae906295b40b160a55641c9
In order to use single_value_to_css() in
Servo_DeclarationBlock_SerializeOneValue(), we need to pass the property name
and a flag for custom properties.
MozReview-Commit-ID: 5HfI2qOmPwP
--HG--
extra : rebase_source : 968468b3c9313c4ec3007ee9883075c8fc4ab769
Only replace addDiv with createDiv in spacing-keyframes-transform.html.
Others are the same.
MozReview-Commit-ID: JNSpyc6WNtP
--HG--
extra : rebase_source : 05af4176e85234e1d89023f1e74012d0e1481230
Factor out BuildProperties to have a better readability of UpdateProperties.
MozReview-Commit-ID: A3cIS65STAx
--HG--
extra : rebase_source : a09d935d6ced8f4a6c7311e69e3840e195c575a1
We don't need to rebuild the animation properties and recalculate the
computed offsets of Keyframes while copy-constructing a new
KeyframeEffect(ReadOnly) object, so avoid calling SetKeyframes()
directly. And we also need a customized copy constructor for AnimationProperty
to avoid copy mIsRunningOnCompositor.
MozReview-Commit-ID: CIF3Ibgc1tM
--HG--
extra : rebase_source : 7bbc8c1666451435982651f11af9c00f37708807
The copy constructors of KeyframeEffectReadOnly and KeyframeEffect are
similar, so we overload ConstructKeyframeEffect<...>(...) for copy
constructors.
MozReview-Commit-ID: 37hClpn9ZUG
--HG--
extra : rebase_source : 48de18c190dd8cbc61e0363e999960f2e823f2ea
This test is skipped on Android, since on Android it takes too long to send
the transition to the compositor. On an Android emulator, it took 5s!
For this test case, 5s duration transition needs busyness on the main thread
more than 5s, it's undesirable.
MozReview-Commit-ID: DIqcwsnLttV
--HG--
extra : rebase_source : 256978c2a58fb483da4c0acac1db0e51fcf45ccd
tree_ordering test can not be moved because the test waits for animationend
event.
createPseudo() were picked from
testing/web-platform/tests/web-animations/testcommon.js .
MozReview-Commit-ID: EZ2sGEgdMFM
--HG--
extra : rebase_source : 1ebf46dd91f42ba75f5711e781d72e77948e6150
All of cleaning up code were dropped. Also some trivial comments were dropped.
Note that test cases can not be rewritten to synchronous test.
* Waiting for events, e.g. transitionend.
* single_transition
* single_animation
* Manipulated by style, e.g. style.animationDuraton = "0.5s".
* single_transition_cancelled_property
* single_transition_cancelled_value
* single_transition_cancelled_noninterpolable
* single_transition_reversed
* multiple_transitions
* single_animation_cancelled_name
* single_animation_cancelled_duration
* single_animation_cancelled_delay
* single_animation_cancelled_fill
* single_animation_cancelled_iteration_count
* single_animation_change_XXX
* coalesce_change_cancel
* Falling into a pending state, e.g. play() or pause().
* finish_from_pause
* finish_from_pause_pending
* play
* play_filling_forwards
* play_after_finish
* pause
* pause_while_pause_pending
* aborted_pause
MozReview-Commit-ID: 5bTzO7GtEHF
--HG--
extra : rebase_source : 905f5144706e20c743030b4bcff428ef124abfff
So that the new subclass of DeclarationBlock could just be
ServoDeclarationBlock.
MozReview-Commit-ID: 55KgfmWmmyU
--HG--
extra : source : 27c55355da341fce112b15d966eb9b2fa2c8834b
We needed this polyfill for <initializer_list> when some of our C++
standard libraries did not support said header. They all do now, so the
polyfill is redundant.
To send animations to compositor in the delay phase we need to
modify Animation::IsPlaying returning true in the delay phase.
Note about background-position-in-delay.html:
After this patch, background-position animation also creates an active layer
from its delay phase.
Also note about test cases in test_animations_omta.html:
After landing bug 1279071, getOMTAStyle() returns the style value only
specified by animations, also in this patch we don't apply any opacity or
transform values in the delay phase, as a result we can't tell animating
value during delay phase on the compositor.
MozReview-Commit-ID: ILYKig3c08d
--HG--
extra : rebase_source : 5715c1f9ec43da3c8374f08cdca82e2ca29fe474
We are going to pass animations to the compositor in before phase but not to
pass when active duration is zero. To distinguish this state we need a new
function to check that the active duration is zero.
MozReview-Commit-ID: 2Lckmt4LQcV
--HG--
extra : rebase_source : aa059b8c75bcea4ff4c5788aac98d1e17a4a5d7b
The check of negative elapsedDuration is basically no longer valid since
animation delay is not factored into start time any more. But still we have
somtimes met negative elapsedDuration sice we use a previous vsync time stamp
for async animations to make the animations more sync. This is not a problem
in most cases but makes two reftests intermitent failure because both of them
used steps(1, start), the steps(1, start) composed different results in the
before phase and in the active phase. To avoid this difference this patch
replace the steps(1, start) with steps(1, end).
Once we incorpolate playbackRate into GetCurrentOrPendingStartTime, we don't
need to call AnimationTimeToTimeStamp for deviding delay by playbackRate since
the time passed to AnimationTimeToTimeStamp does not contain delay any more.
MozReview-Commit-ID: IVE2IFfNgm0
--HG--
extra : rebase_source : 7cb42e57067c21451706bd89284016d996dc8b12
We should run basically tests with subtree true or false option.
MozReview-Commit-ID: 8HDAnKh7Xq
--HG--
extra : rebase_source : 13d1551240bf68b776df5111c512cd13e248a0ea
All of the split out test cases were re-written with synchronous API.
Also, cleanup codes in the end of each test cases, e.g. anim.cancel(), were
dropped because we now create a new MutationObserver and a new element for
each test respectively.
MozReview-Commit-ID: 9Bx0OUOU9On
--HG--
extra : rebase_source : c51b9e850bfdc692344012b9176a17083187ab89
This patch introduces a new functions named HasEffectiveAnimationOfProperty.
This function checks that a given CSS property is overridden by !important
rules.
On the other hand, now KeyframeEffetReadOnly::HasAnimationOfProperty() does
just check that the effect has a given CSS property. This is used to create
a stacking context because we should create a stacking context for opacity or
transform animations even if the property is overridden by !important rules.
Note about no-stacking-context-(opacity|transform)-removing-animation-in-delay.html
Before this patch we don't create any stacking context for animations overridden
by !important rules, but after this patch we do create a stacking context for
such animations. As a result, in the test case we did paint a stacking context
in the first rAF callback and then in the second rAF callback we did clear the
painted stacking context. Unfortunately sometimes the second rAF callback was
called prior to clear the stacking context on the compositor because of
compositor delay. To avoid this situation, we have to wait for MozAfterPaint
instead of rAF callback.
MozReview-Commit-ID: AG1Y0IgoB3U
Also we skip to update the cascade and compose style for orphaned elements if
the animation reqeusted restyle but the target element has been removed from
document before a subsequent tick.
MozReview-Commit-ID: 3I6uyvuSPO5
--HG--
extra : rebase_source : 817b123a4e1b64c89cfbe796073d88410792bf84
There are a few pieces missing before we can do this with Servo. Since this
only enables an optimization for off-screen animations we should skip this
for now so it doesn't block animations from running.
MozReview-Commit-ID: GecHWQZYxpK
--HG--
extra : rebase_source : c0330b104afb4b970569c0cb650315e633b7e796
extra : histedit_source : db91b37d3370c9b766976b42b0701f6e0ec56159
For animation values parsed using the Servo backend that are invalid,
we simply end up with an empty declaration block (and we fill in |mValue|
with the string so we can later serialize it).
MozReview-Commit-ID: 6ruwJGVzRla
--HG--
extra : rebase_source : 83e415febf10cf90631fd7a1b447921822a44bc0
Actually this test case does not pass for now, since we don't throttle
animation properties running on the main thread overridden by important
rules. But after part 6, we don't request restyle layer in the case
when the cascading result of the property which is not running on the
compositor is changed, so this test case is meaningful.
MozReview-Commit-ID: eraPs9WAe9
--HG--
extra : rebase_source : a0d6f6629299fbbad59bcabeae3b8c48b7c7ce1a
This patch also makes composite order lowest to highest, as a result we also
need to replace mWinsInCascade checks with the the properties.
The mWinsInCascade membed itself will be removed in a subsequent patch.
Now we call RequestRestyle(Layer) respectively for transition and animation,
so a test case in test_restyles.html works as expected.
And now lower-priority animations are also sent to the compositor so this patch
fixed some tests in test_running_on_compositor.html and
test_animation_performance_warning.html
MozReview-Commit-ID: BchUsJbmatg
--HG--
extra : rebase_source : ff295aecb08bb672ac5f02e26e37a4ea4f3eb7c0
The result animatons of FindAnimationsForCompositor() should be sorted
by composite order because SampleAnimations() on the compositor expects
the animations are sorted by the order.
MozReview-Commit-ID: 4eI4EldFVcu
--HG--
extra : rebase_source : eabbea6aa54d1637b8baba8b6ac4959a1e6025b6
Use [SetterThrows] for KeyframeEffect.spacing because it throws if the input
string is not conformed to the grammar.
MozReview-Commit-ID: CkAnPu8TnV
--HG--
extra : rebase_source : af0960391684323a25ac0b40da28dcbe5c3c2919
I came across these while working on a different bug that changed the grouping
in the unified build. Adding these as a separate step will hopefully remove a
little noise from the next patch in the series.
MozReview-Commit-ID: Km7wTcVWG9n
--HG--
extra : rebase_source : 0610add67482c1a5aa7c4f576e151ed9437698c0
This reflects the following updates to the spec:
9369384f6c
MozReview-Commit-ID: JYUOZcnPEJQ
--HG--
extra : rebase_source : 88e012f19b875d8e718770772189737e2c17ddaa
After updating a new animation, I think we don't need to request a restyle for
the new animation because:
1. CSS Animation & CSS Transition: we don't need to request a restyle.
2. Animation constructor: we don't need to request a restyle.
2. Animation.effect: we call PostUpdate() after SetEffectNoUpdate() already.
MozReview-Commit-ID: HrUGBrbt7xi
--HG--
extra : rebase_source : 0c2574be26bade3b17a31da361d24333f6409689
We mark the cascade update many times, so it's better to factor it out.
MozReview-Commit-ID: HbE980gOJ9M
--HG--
extra : rebase_source : a76dfc489f378c5bd7e711f296d0599ecf2322c5
The purpose of ResetWinsInCascade() in SetTarget() ensures that
RequestRestyle(Layer) is invoked for the new target in the case when
composite order or CSS cascading or order is changed due to chaging target
element, but RequestRestyle(Layer) will be called right after setting
the new target in SetTarget() explicitly.
MozReview-Commit-ID: 1cFJCAEEroP
--HG--
extra : rebase_source : c3008ef15d0328466f77015020c5148ef2ad07c6
Use SetEffectNoUpdate() for the procedure of setting effect, and let SetEffect()
also calls PostUpdate(), so we can use SetEffectNoUpdate() if we don't want to
call RequestRestyle(RestyleType::layer).
MozReview-Commit-ID: CaWA34UebpH
--HG--
extra : rebase_source : d29f5ddc0b8e069293a4a69f0e821786a2c5a84a
Both Cancel() and SetEffect() need the procedure of "Reset an animation's
pending tasks", so factor it out and then we can reuse it.
MozReview-Commit-ID: C7Q5kF9aPrV
--HG--
extra : rebase_source : b3d98a739d51db91f8c45139e9add651af4adeae
Move the mTiming, mAnimation, and the implementaion of timing into
AnimationEffectReadOnly.
MozReview-Commit-ID: EZhlbphVvCo
--HG--
extra : rebase_source : 4aa4821304671a8dfc6feb047ab20b26ef2d6b11
This is a pre-patch for part 5, which is trying to make our code closer to the
spec. Some methods in KeyframeEffectReadOnly belong to AnimationEffectReadOnly,
so first, use AsKeyframeEffect() to access those keyframe-related methods, and
then add virtual methods for timing-related methods to AnimationEffectReadOnly.
MozReview-Commit-ID: 1srA1f8JYeN
--HG--
extra : rebase_source : 99a06e20a63b9c8b179fa8501690abf01271aaf4
Add mTransitionProperty and mTransitionToValue into CSSTransition, so we can
retrieve the original property and ToValue after setting a different effect.
MozReview-Commit-ID: 6sBGHkPAhGX
--HG--
extra : rebase_source : 2b209bb5cd5513899774025e18fc39d5b8268846
This implements the spec change here: ee1577c959
MozReview-Commit-ID: 8XKaocLbrmL
--HG--
extra : rebase_source : 18c402b0af7c21b8721ca796c054a3f58eb21a72
This implements the spec change in 21de090dac
The spec change refers to a binary 'animation direction' flag. Instead of that,
however, we just pass the playback rate along and use it inside
GetComputedTimingAt since this seems simpler.
Also, this patch moves the implementation of
KeyframeEffectReadOnly::GetComputedTiming from the header file into the .cpp
file. This is because with this change, GetComputedTiming needs to call
mAnimation->PlaybackRate() and so mozilla::dom::Animation needs to be a complete
type. However, simply including Animation.h doesn't work because of a cyclic
dependency between KeyframeEffect.h and Animation.h. We might be able to fix
this later but since yet-to-land bug 1049975 moves this code around a lot, I'd
rather not touch it too much just now.
MozReview-Commit-ID: 1h6XRh4xmfI
The previous patch in this series renamed nsCSSProperty to nsCSSPropertyID.
This patch renames nsCSSPropertySet to nsCSSPropertyIDSet accordingly.
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):
hg stat -c \
| cut -c 3- \
| tr '\n' '\0' \
| xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSPropertySet\b/nsCSSPropertyIDSet/g' -i''
Then:
hg mv layout/style/nsCSSPropertySet.h layout/style/nsCSSPropertyIDSet.h
... and finally, manually renaming nsCSSPropertySet in the include guard in
nsCSSPropertyIDSet.h.
(NOTE: Re-landing this patch on a CLOSED TREE to correctly-address the merge bustage that closed the tree.)
MozReview-Commit-ID: ASUNs7FWbKP
--HG--
rename : layout/style/nsCSSPropertySet.h => layout/style/nsCSSPropertyIDSet.h
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):
hg stat -c \
| cut -c 3- \
| tr '\n' '\0' \
| xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSProperty\b/nsCSSPropertyID/g' -i''
Then:
hg mv layout/style/nsCSSProperty.h layout/style/nsCSSPropertyID.h
... and finally, manually renaming nsCSSProperty in the include guard in
nsCSSProperty.h.
MozReview-Commit-ID: ZV6jyvmLfA
--HG--
rename : layout/style/nsCSSProperty.h => layout/style/nsCSSPropertyID.h
The merge from inbound to central conflicted with the merge from
autoland to central, it appears. Per tree rules, the commit from the
autoland repo wins and the inbound commit gets backed out.
CLOSED TREE
--HG--
extra : amend_source : 927e1cdfa8e55ccbd873d404d905caf6871c8c4f
extra : histedit_source : 07095868c3f767258e1d7d2645193bf4811b13bb%2Ca49ae5a28bf6e67298b6208ee9254c25a2539712
The previous patch in this series renamed nsCSSProperty to nsCSSPropertyID.
This patch renames nsCSSPropertySet to nsCSSPropertyIDSet accordingly.
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):
hg stat -c \
| cut -c 3- \
| tr '\n' '\0' \
| xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSPropertySet\b/nsCSSPropertyIDSet/g' -i''
Then:
hg mv layout/style/nsCSSPropertySet.h layout/style/nsCSSPropertyIDSet.h
... and finally, manually renaming nsCSSPropertySet in the include guard in
nsCSSPropertyIDSet.h.
MozReview-Commit-ID: ASUNs7FWbKP
--HG--
rename : layout/style/nsCSSPropertySet.h => layout/style/nsCSSPropertyIDSet.h
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):
hg stat -c \
| cut -c 3- \
| tr '\n' '\0' \
| xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSProperty\b/nsCSSPropertyID/g' -i''
Then:
hg mv layout/style/nsCSSProperty.h layout/style/nsCSSPropertyID.h
... and finally, manually renaming nsCSSProperty in the include guard in
nsCSSProperty.h.
MozReview-Commit-ID: ZV6jyvmLfA
--HG--
rename : layout/style/nsCSSProperty.h => layout/style/nsCSSPropertyID.h