There is no spacing mode any more, so rename this function.
MozReview-Commit-ID: 9DIqKmQnuJo
--HG--
extra : rebase_source : 3600be87a699a1a5fe237f8ed75baf03f0b5ae84
When styling with the Servo backend, we should also use the Servo backend to
determine if a property is animatable or not. However, if we do this,
Servo_Property_IsAnimatable will start returning true for the 'display' property
once we mark that as animatable in Servo (for SMIL).
Even if we later fail to actually animate 'display' (due checks added to Servo
in the next patch) we still need to treat 'display' as un-animatable in
KeyframeUtils so that we don't *read* the 'display' property of Keyframe objects
passed to the Animations API, since that is observable.
This patch makes us consult Servo_Property_IsAnimatable when using the Servo
backend and also explicitly treat the 'display' property as not animatable.
MozReview-Commit-ID: 1JllbeJisAS
--HG--
extra : rebase_source : d73b7d9ee0da03bfed68e574b67e10b342c1868d
According to the spec, when we cancel an animation we should "reset an
animation's pending tasks"[1] which has following step:
...
4. Reject animation’s current ready promise with a DOMException named "AbortError".
5. Let animation’s current ready promise be the result of creating a new resolved Promise object.
Since we create the ready promise and, if need resolve it when we create it
(see Animation::GetReady), this patch simply clear the ready promise
when an animation is canceled.
[1] https://w3c.github.io/web-animations/#reset-an-animations-pending-tasks
MozReview-Commit-ID: JxoqeA5dXCO
--HG--
extra : rebase_source : 1c51724f236b3ed464eb6af3c20ccc9aaf5aa3e6
This tests are to confirm either we could get valid value of 'inherit' of
keyframe.
Also, this tests are for clone_XX methods of stylo as well.
MozReview-Commit-ID: J6HZBRZB5am
--HG--
extra : rebase_source : c8c282f3204d94931112fa9811bb5c51b8fe6992
To traverse pseudo elements in animation-only restyle, the pseudo element
itself needs the animation-only dirty bit.
MozReview-Commit-ID: 11RfVqnPXfJ
--HG--
extra : rebase_source : d048c9a053c03bf3fef46fcbfd9cbd5f60204e1d
Add this crashtest for interpolation/accumulation on mismatched transform lists
to make sure it doesn't crash and there is no leak because we use
nsCSSValueSharedList, instead of nsCSSValueList_heap, for Servo backend.
MozReview-Commit-ID: 2VdKSQcK7pj
--HG--
extra : rebase_source : f497e442a34f29fb0aa936c012ad7bc14cac2e7a
In subsequent patches, the servo version of KeyframeUtils::ApplySpacing()
changes fifth argument to const ServoComputedValues*. If we still use nullptr
for the fifth argument in caller side, compilers can't determine whether
nsStyleContext* or const ServoComputedValues* should be used.
MozReview-Commit-ID: 1bE2cA7gRdi
--HG--
extra : rebase_source : 230b9b94bbfdcacf1b35a6c8eb1186e22b331047
Test to confirm valid 'inherit' value of -moz prefixed properties during
animation. This also means to confirm the algorithm of clone_XX methods
of stylo.
NOTE: This file should have only animatable properties that have '-moz' prefix.
In this patch, appends following properties.
* -moz-box-align
* -moz-box-direction
* -moz-box-orient
* -moz-box-pack
* -moz-float-edge
* -moz-orient
* -moz-osx-font-smoothing
* -moz-user-focus
* -moz-user-input
* -moz-user-modify
* -moz-window-dragging
MozReview-Commit-ID: GfBfMkvfgGm
--HG--
extra : rebase_source : f2e220ccc0c6864ad15416a2cda470f64eeb62be
We have already waitForIdle() in testcommon.js.
MozReview-Commit-ID: 64XTU2g8CO7
--HG--
extra : rebase_source : 028e6827f4d67b789b979673ceb5a8bef501dbf7
requestIdleCallback has been enable by default in bug 1314959.
MozReview-Commit-ID: 7rwqdsCdjNb
--HG--
extra : rebase_source : cb60996accfe733714c9b5dff983c2210c4fa98b
Remove the unconditional return from FindAnimationsForCompositor(), so
we can check if there is any property running on compositor.
Also, enable a reftest and fix the mochitest expectation:
1. The expectation numbers of test_animations_omta.html in e10s and non-e10s
are different, so skip non-e10s.
2. We pass all tests in test_animations_omta_start.html with e10s;
however, got 3 test failures with non-e10s, so skip this file with
non-e10s.
MozReview-Commit-ID: IuOyAsUYguU
--HG--
extra : rebase_source : 8f8549063f2d1907e95d0bab450e1b6f851f8c84
We need to request an animation-only restyle to force flush all throttled
animations on main thread when we handle an event with coordinates
(e.g. mouse event).
MozReview-Commit-ID: KkjeQVsLgTl
--HG--
extra : rebase_source : 314408062e719e9f52df9a6726e2f3dad817bbef
We need to retrieve the correct base style for Servo backend, so change
the return value to AnimationValue and update
KeyframeEffectReadOnly::BaseStyle().
MozReview-Commit-ID: 9FL3h1DLoJt
--HG--
extra : rebase_source : 42284c5fe8b8135910cde44b0815eb475ca2f1cc
We need to traverse rule tree to get the important rules, so we will not
override them if they have animations running on compositor.
MozReview-Commit-ID: 67NO2nIcUfq
--HG--
extra : rebase_source : 24a4ea4ca10e00f409d94c81acacb3db72248b3f
We don't use the public UpdateCascadeResults method, so remove it.
MozReview-Commit-ID: A2lWZaHWHTZ
--HG--
extra : rebase_source : 35a1d77fdeba5a1db74d15f523dba78801b0b48e
We need this flag to avoid assertion in PostRestyleForAnimation(), which
may be called from MaybeUpdateCascadeResults() in pre-traversal.
MozReview-Commit-ID: 46AfoIUb9o3
--HG--
extra : rebase_source : 3290d9954be43ffaeb94b501ac346622651c452a
We restyle elements with non-animation restyles even if the animations
are throttled.
MozReview-Commit-ID: Exhd4qVx7su
--HG--
extra : rebase_source : 1632bf949bb60a894372a425fd9173e1b718452d
During pre-traversal of EffectCompositor, we call MaybeUpdateCascadeResult(),
which may add new element into mElementsToRestyle, as a result, we may
iterate a mutated mElementsToRestyle. In this patch, we copy the element
which needs update cascade results into another set and traverse this new set
to call MaybeUpdateCascadeResult(). After that, do normal pre-traversal on
mElementsToRestyle.
MozReview-Commit-ID: 3uo6Ec5JNjp
--HG--
extra : rebase_source : 3cdc3c3147f011074a884d85da2655e0ed4a3730
The type of these two members is intended to be boolean. Fix the typo in this
patch.
MozReview-Commit-ID: HcwvUQztw9J
--HG--
extra : amend_source : 59c29156231c9c93f5939afeda1641da72a50489
FRAME_STATE_BIT of nsFrame and nsINode::mBoolFlags are both full, we need to
find another place to hold MAY_HAVE_OPACITY information.
nsINode::mSlots might be a choice, but since we always use this information in
painting, memory footprint of nsINode will become larger after this change.
So I decide to put this information right in EffectSet. The drawback of storing
this information in EffectSet is, although unnecessary Effect look-up is
prevented, we still need EffectSet property look-up in each time
HasOpacityInternal call, so we need Part 2.
Conceptually, Part 1 and Part 2 are independent.
MozReview-Commit-ID: 6sfBFSHjxQb
--HG--
extra : rebase_source : 394141cec3b44bb352297a0add8f9763d815bddb
This allows us to access metadata using `match` instead of comparison with
atoms, which makes it doable to get the pseudo-element flags in the future.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
MozReview-Commit-ID: KgGjFePmhyS
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
--HG--
extra : rebase_source : 57614aed13d2c088fe129ecf3fabf9869d5a6d50
I've propagated quirks mode information on some places. But we needed to pass
quirks mode to some other FFI functions to be able to handle that information
properly.
MozReview-Commit-ID: JovQWjN3YJx
--HG--
extra : rebase_source : bd25ba4276ae21ff4feb80e56b311202019268a0
We need another flag that represents allow-negative-number for SMIL, so
this enum will also comprise the another parsing mode that allows negative number.
MozReview-Commit-ID: IDFNppjGeB
--HG--
extra : rebase_source : 456f661b33346ff4a756a66c6accf4ab1a5f2f80
The telemetry is recorded once per effect:target pair, and is intended for
comparison with the telemetry added in bug 1349808.
MozReview-Commit-ID: 8JYbAifjmki
--HG--
extra : rebase_source : a5adf4ea9c0836d9ad0ecde5e5869d00eccc2205
The telemetry is recorded once per effect:target pair, and is intended for
comparison with the telemetry added in bug 1349808.
MozReview-Commit-ID: 8JYbAifjmki
--HG--
extra : rebase_source : fa0b615684ca1355f9bbc24b3355e90001db47b5
We can reuse ParseProperty in nsDOMWindowUtils::ComputeAnimationDistance(),
so factor out this function.
MozReview-Commit-ID: FdXGPxOZf84
--HG--
extra : rebase_source : 525bb436fdc1ce4d1241a08b198f9cd572506a86
By passing the startTime as a TimeDuration we are able to represent times in the
distant past (and with the same range as we can represent on the main thread so
that if we do encounter range errors in future, they should not differ between
the main thread and the compositor).
This patch includes a crashtest. I have verified that, without the code changes
included in this patch, this crashtest fails on debug builds on OSX.
MozReview-Commit-ID: EDuKLzfEC0K
--HG--
extra : rebase_source : 1883080fdfac8c33f70698145f21e67cbdfdd4f2
In bug 1223658 we separated out the delay from the start time but we failed to
remove it from this calculation. As a result, when a pending animation begins it
will have the delay applied twice (once here, and once when it is sampled on the
compositor). This will happen until the layer is next updated.
This bug was not exposed by any existing tests since we don't use this code path
when the refresh driver is under test control. Furthermore, the one test that
was supposed to cover this was refactored in such a way that it stopped testing
this code path. That test is restored earlier in this patch series and enabled
in this patch.
MozReview-Commit-ID: B2KR7YaPsMK
--HG--
extra : rebase_source : 6c888252813fbfc01baf5d4bb1728d989ee1586c
Once upon a time[1] a test was added to test_deferred_start.html to test the
code path where we establish the start time to pass to the compositor when
resolving a pending animation.
Later[2], however, we encountered intermittent failures on B2G so we made it
stop waiting on animation.ready and use waitForPaints instead. There were two
problems with this, however.
Firstly, waiting for paints often means that extra paints are processed such
that we end up updating the start time on the layer using a different code path
and masking any potential bugs in the code path under test.
Secondly, when we made this change we replaced:
return animation.ready.then(function() { /* test code */ })
with:
return waitForPaints(function() { /* test code */ })
And sadly that means that 'test code' never runs. Of course, what we meant to
write was:
return waitForPaints().then(function() { /* test code */ })
As a result, when we later broke the code path under test no one noticed.
This patch restores the test so that it tests what it intends to (and currently
fails, at least most of the time).
[1] https://hg.mozilla.org/mozilla-central/rev/79cac8c71159
[2] https://hg.mozilla.org/mozilla-central/rev/986b18fdfdba
[3] https://hg.mozilla.org/mozilla-central/rev/b66b75c2d042101b954e6423438cc07955c2b9bd
MozReview-Commit-ID: 1iMWLQP6zae
--HG--
extra : rebase_source : 2766f25b150af3e98afc6214f59a329798961943
We can early return to call MayHaveAnimations() (and it should be fast) since
we set the flag in EffectSet::GetOrCreateEffectSet(),
MozReview-Commit-ID: 2UfWVVi6nY5
--HG--
extra : rebase_source : 97e98bf1fb9e725a107ed3200b95921375bfb637
We will use this type later in this patch series in nsSMILCSSProperty so this
patch moves it to a separate file so it can be re-used.
MozReview-Commit-ID: 4Z7YbsQ9xz4
--HG--
extra : rebase_source : 0f6f7248d1a4dfc77360829f3a0e6ed263f156db
In the next patch in this series we would like to use this functionality in
nsSMILController as well so this patch moves it to somewhere we can share it.
MozReview-Commit-ID: 1IzWoCCw4aD
--HG--
extra : rebase_source : 9f2b230f774135c0c5bf60ebdff358ce0a6bc087
I have verified that this crashtest fails without the corresponding Servo-side
code changes.
MozReview-Commit-ID: 9obKluN3fgv
--HG--
extra : rebase_source : 71d82eb24ccb9fea1674d08be9b317997df7fe3f
This also happens to fix other bugs, like making display: contents pseudos
animatable, which weren't before.
MozReview-Commit-ID: LhwTPNbFvSZ
--HG--
extra : rebase_source : 785105b08d6bfa15ad257e61b769a263c6810ad0
Animation-only restyle should include both Animation and Transition
cascade levels.
MozReview-Commit-ID: Jo1sb5fGUC0
--HG--
extra : rebase_source : ddd7d796b93f9e7ced912ec4fa2eb79e7ba58784
It's not great that we traverse up the tree looking for the subtree root for
each animating element that is in mElementsToRestyle. An alternative could
be to traverse the entire subtree and build a hash set of the elements
within it, so that each test in the mElementsToRestyle loop can be done
quickly. I suspect that most of the time looking up the tree for
each animation will be quicker, but it does have worse worst case behavior.
MozReview-Commit-ID: FWoQ7fD9YZC
--HG--
extra : rebase_source : 688a19f61e3eda9e84228b6f18913e1f4bb09f13
This patch does the following in addition to a simple move:
* change the type of the pointers from RefPtr to nsCOMPtr
* move it from mozilla::css namespace to mozilla
MozReview-Commit-ID: 72MYq6kWm4s
--HG--
extra : rebase_source : 400fe0d7cc422f22592c302cfd4e457830b77e3e
mBaseStyleValuesForServo is a nsRefPtrHashtable<nsUint32HashKey, RawServoAnimationValue>
In this patch, we use void* instead of exposing nsRefPtrHashtable in FFI
because we just use the hash table as an argument of a C++ function, it means
we don't touch the hash table in Rust at all.
MozReview-Commit-ID: 1wM6NeF2S0t
--HG--
extra : rebase_source : 17908ff84d061e189f21641bf660dc9720b964bc
After this, we will implement additive or accumulative calculation
in this Rust function.
MozReview-Commit-ID: 4xAvLz1oTIZ
--HG--
extra : rebase_source : c0672cb1c894eadaaebec94dce2f0d1c1a77d244
This will be used for animation value composition in Rust.
MozReview-Commit-ID: Lg4dZrQW1WC
--HG--
extra : rebase_source : e03b19aa7907c122f773b2b06df96aee4fe32ae2
In the next patch we want to add a method called
GetUnanimatedStyleContextForElementNoFlush but that's much too long. Instead it
seems better to just drop 'ForElement' from all these methods since it should be
fairly obvious we are getting the style context for an element given that the
first argument is an element.
MozReview-Commit-ID: JQKaEuCKV2F
--HG--
extra : rebase_source : 3ba51f3b00d1ec7bc91102629d9c0abb88992fef
We will obsolete StyleAnimationValue in the future, and can treat
AnimationValue as a wrapper of RawServoAnimationValue to hide the FFIs
at that moment. For now, we still need both types, so it's better to make sure
they are mutually exclusive in AnimationValue. Therefore, let's add some
assertions.
Besides, I think those FFIs might do many things and it seems those methods
are not critical, so let's move them into the cpp file, so we can remove
some dependencies to avoid re-compiling so many files if someone needs
revise ServoBindings.h.
MozReview-Commit-ID: FJ1uTvEQ7NT
--HG--
extra : rebase_source : 8ef99c659f2721c8425364051db19b66536bccc6
Otherwise we hit below assertion in nsCSSValue::DoReset().
MOZ_ASSERT(NS_IsInCompositorThread() || !ServoStyleSet::IsInServoTraversal());
PropertyValuePair.mValue was introduced for computing paced timing in the case
where there is some invalid values in keyframes. Paced timing has been removed
removed from the spec and stylo will not support paced timing. So we don't need
to set the value for stylo.
MozReview-Commit-ID: 3I8QSvF2jL8
--HG--
extra : rebase_source : 42155d7fac85aa7fb068e8a514867e8f1c27ed30
I have verified that this test fails without the fix from the previous patch.
MozReview-Commit-ID: Hx8D72nTb32
--HG--
extra : rebase_source : 48b53f86fbcf92db6a5d340d2348fe23003aab0f
This patch adds a test that when reverse throws an exception we don't report
anything to animation mutation observers. I have verified that this added test
fails without the early return added to Animation::Reverse() earlier in this
patch series.
MozReview-Commit-ID: 64yX4G7iaIt
--HG--
extra : rebase_source : 3f29335303c969a8e2ad5ac2c16aba276036b434
This function is only used in test_animation_observers_sync.html. Putting it in
another file makes test_animation_observers_sync.html harder to follow so until
we actually share it with other files we should be it in the one file.
MozReview-Commit-ID: DJXWH4wFWxZ
--HG--
extra : rebase_source : cf5c93f0bee5b03862ad9162c55e1df97b875a6d
As part of this patch series I'd like to add an animation observer test.
However, the current arrangement of test files is quite confusing. We have:
test_animation_observers.html - Tests that run async only
test_observers_for_sync_api.html - Tests that can be run synchronously
It's not at all obvious that these are related or that one is related to the
other. In this patch we rename the files so that their relationship is more
obvious. In a subsequent patch we'll add comments to further clarify the
distinction.
MozReview-Commit-ID: CSYL8wruWdK
--HG--
rename : dom/animation/test/chrome/test_animation_observers.html => dom/animation/test/chrome/test_animation_observers_async.html
rename : dom/animation/test/chrome/test_observers_for_sync_api.html => dom/animation/test/chrome/test_animation_observers_sync.html
extra : rebase_source : a8bfde42b9996f172f090e95970e355106757d8a
We will use this function for stylo computed values as well.
MozReview-Commit-ID: IxDg4EZARi3
--HG--
extra : rebase_source : dc6445ab0c836393913d64313c8151f31cd7b523
Also it's renamed to EnsureBaseStyle. We didn't use the return value at all.
MozReview-Commit-ID: Cu4rnAP883M
--HG--
extra : rebase_source : 1ced02e7ebd6a3c6c66c45f4a2a0b24e0bce6031
Per bug 1322570 Comment 7, we could drop the GetParentAllowServo() when we
invoke UpdateProperties() from a SquentialTask, so allow it for now.
MozReview-Commit-ID: 52NauGaz4Zv
--HG--
extra : rebase_source : 617c3310a042ca49023ebad1801a2c283e4e212c
nsStyleContext::CalcDifference had an optimization where, when we knew
that the old and new style context have the same rule node, we knew that
the only change hints that would need to be handled are those in the
"not handled for descendants" category, generated due to explicit
'inherit' values on reset properties. This was because any changes due
to differences in inherited properties should only have generated
"handled for descendants" change hints (and thus would already have been
handled on an ancestor).
Before bug 931668, this let us avoid calling CalcDifference on structs
that only would have generated hints that we knew we already would have
handled. However, after bug 931668, we compare all structs anyway so
that we can set the aEqualStructs outparam, so we don't gain anything
from this optimization. We can still return these change hints we know
will not need to be handled, and rely on ElementRestyler::CaptureChange
to filter them out.
MozReview-Commit-ID: Ld1s2Js0i6r
We use Servo css-parser to parse keyframe property-value pairs, so we
should also use it to parse easing for Web Animations.
MozReview-Commit-ID: FsfHQaNT2xO
--HG--
extra : rebase_source : 8eb6489f257839f2c0de943b63cc1c04b44ff7a5
In order to avoid creating a temporary nsTimingFunction in some cases and
calling Init(), add some useful constructors to reduce the redundant code.
MozReview-Commit-ID: I8zmWeKl9aw
--HG--
extra : rebase_source : 50a9adc90c26c16fd1dcd7b70c519794b8d406fd
We use Servo css-parser to parse keyframe property-value pairs, so we
should also use it to parse easing for Web Animations.
MozReview-Commit-ID: FsfHQaNT2xO
--HG--
extra : rebase_source : f0426f90e4698363b0ce0271943b31418458301d
In order to avoid creating a temporary nsTimingFunction in some cases and
calling Init(), add some useful constructors to reduce the redundant code.
MozReview-Commit-ID: I8zmWeKl9aw
--HG--
extra : rebase_source : ef3b73e9e8798b2953f7db6ea5bb43ee12403649
Before this patch, we store each computed values in a hashtable,
nsRefPtrHashtable<nsUint32HashKey, RawServoAnimationValue>, for all
KeyframeEffectReadOnly on an element, and convert the ServoAnimationValues of
the hashtable into an nsTArray<ServoAnimationValue*> and then convert
the ServoAnimationValues of the nsTArray into PropertyDeclarationBlock
in rust. This way was really inefficient.
In this patch, we store the computed values into AnimationValueMap and
convert all AnimationValue in the map into PropertyDeclarationBlock
after EffectCompositor::GetAnimationRule.
MozReview-Commit-ID: EJ2Kl65fVeF
--HG--
extra : rebase_source : e30a9d440dc9855e21b94501b07a3501d31bc345
Later in this patch series we will replace ServoAnimationRule with a hashmap.
At that point, we would like to pass the hashmap to ComposeStyle. In order
to achieve that, this patch templatizes the 'animation rule' parameter of
ComposeStyle in both Animation and KeyframeEffectReadOnly so that it can
represent a hashmap instead.
MozReview-Commit-ID: H5bMxjN3W8n
--HG--
extra : rebase_source : 58cd9ee1cda51970d35c52b39d2cdab12055e24a
The only one caller of GetServoAnimationRule is Gecko_GetAnimationRule.
There is no risk that pres context is destroyed in Gecko_GetAnimationRule.
MozReview-Commit-ID: 52pxbCiCNoJ
--HG--
extra : rebase_source : 8000e267d1d5706c709f807e11396dda3579c4dc
cssPseudoElementBeforeProperty and cssPseudoElementAfterProperty are for
CSSPseudoElement.
MozReview-Commit-ID: 3WETv4QeC5
--HG--
extra : rebase_source : b7e902786ca9ebe7c92a573604e15d868c6067a7
Also removed the function GetPresContext() in KeyframeEffectReadOnly.cpp
and KeyframeEffectReadOnly.h
MozReview-Commit-ID: AJCgxQ05yVQ
--HG--
extra : rebase_source : d85db8bf29079964e4210e5b3a381e8483d92441
We always call TElement::get_animation_rules() for both cascade levels while
there are animations or transitions, so we want to handle the following cases:
1. Have both CascadeLevel::Animations and CascadeLevel::Transitions:
* We use EffectSet::mPropertiesForAnimationsLevel to filter out
CascadeLevel::Transitions because transitions are suppressed when both
are presented.
2. Have CascadeLevel::Animations, but don't have CascadeLevel::Transitions:
* We also use EffectSet::mPropertiesForAnimationsLevel to filter out
the unwanted CascadeLevel::Transitions.
3. Don't Have CascadeLevel::Animations, but have CascadeLevel::Transitions:
* EffectSet::mPropertiesForAnimationsLevel doesn't work for this case.
In Gecko, mElementsToRestyle can help us to filter out the unwanted
CascadeLevel::Animations, However, mElementsToRestyle is cleared in
Pre-Traversal, so now we rely on the cascade ordering of transitions to
override animations. I think we still need to optimize this eventually.
4. No animations:
* EffectSet helps us to check if there is any animations/transitions.
Therefore, we need to call MaybeUpdateCascadeResults(), which updates
mPropertiesForAnimationsLevel, in Pre-Traversal.
MozReview-Commit-ID: IHYw56EX7Ta
--HG--
extra : rebase_source : 4d5eb1335cdce9bf54c9646db1fba72ca3f2c70b
This makes it more obvious that the object is not being modified but a
new object is being returned.
MozReview-Commit-ID: A6dH8f12h5A
--HG--
extra : rebase_source : b2f8de2e685129552c598a4be499d703e1a73b6b
Edited all function calls in KeyFrameEffectReadOnly.cpp and one function call in EffectCompositor.cpp
MozReview-Commit-ID: BzSHLZna4xX
--HG--
extra : rebase_source : ee5a8196ce73e67308974b7fb5be19f61982320b
While we're here, don't re-recompute the default computed values, just grab them
from the device.
MozReview-Commit-ID: GqqnPLIwN2F
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
The restyle request during restyling is a result of creating/updating/removing
CSS animations that will come from a SequentialTask which will be implemented
in a subsequent patch.
MozReview-Commit-ID: JoAqvcN3y51
--HG--
extra : rebase_source : fdff59771b81518509dfd52e73d3f63ddb82390d
Use eCSSUnit_Function to store the frames timing function. Also, add one more
css keyword: frames.
The following changes are included in this:
1. Parser changes.
2. Serialization.
3. Computation in nsRuleNode.
4. Invalid and other values in property_database.js
MozReview-Commit-ID: 887QcXHQ2pU
--HG--
extra : rebase_source : ca0135380ea432cb69c4f36cf502d404e04999e5
We don't need to update the time during composing style, we just need to
update when transform animations are sent to the compositor. The most
recent refresh time of nsRefreshDriver should be the same in either side.
If the time is skewed, that means we skip composing style, if it happened
that's another bug.
MozReview-Commit-ID: Dxtuocf1ml1
--HG--
extra : rebase_source : 93e8fad24948b1c0b89fa7946639154a82f4a3ae
We no longer need separate time for cascade levels respectively since we do
send all type of animations on the same element to the compositor regardless
of cascade level.
MozReview-Commit-ID: 7cGQGE3yHvm
--HG--
extra : rebase_source : 009e0cc510faea2b83760c141da545e87de8aeaf
It's just for transform animations on the compositor.
MozReview-Commit-ID: 288CcG4kko4
--HG--
extra : rebase_source : 943f67beeecd3c05b7ae2c6608b7a725c47f2b23
We convert nsStyleContext* to servo's computed values in UpdateProperties()
since it is called from various places (e.g. SetTarget()) with nsStyleContext*.
MozReview-Commit-ID: KxPjm82Crl
--HG--
extra : rebase_source : 04d3385dad97dad905079e21b7305c70afb23b8a
We have SetKeyframes(nsStyleContext*) for the same reason
of UpdateProperties(nsStyleContext*).
MozReview-Commit-ID: 7WjMU66MzpU
--HG--
extra : rebase_source : b5d60e9153e94cba6bb28184eb961c67ef85398b
We had to implement UpdateProperties(nsStyleContext*) explicitly
since there are some calls of UpdateProperties() with RefPtr<nsStyleContext>.
Without this compiler tries to use template function instead.
MozReview-Commit-ID: 72NgwmJ4kcx
--HG--
extra : rebase_source : 30ac40c8ebc6d5e6bdf4326e6436daa95645ffc7
We'd like to use template to manage functions that have almost the same functionality
both on stylo and gecko instead of branching in each functions because it will be
easier to maintain stylo and gecko for a while.
MozReview-Commit-ID: 25ukMpOeqLj
--HG--
extra : rebase_source : 145b66695f9772f5cb527bbcf15b5a3fc2e34510
The operator bool() will be used in the case where we call
MOZ_ASSERT() for const ref of this struct.
MozReview-Commit-ID: tCtpXmPJvV
--HG--
extra : rebase_source : f878c49ab93d8173f9de99b500efc280db886ea3
Servo_GetComputedKeyframeValues is almost the same as what we do in
KeyframeUtils::GetComputedKeyframeValues() for Gecko. Unlike the function
for Gecko, this function does not allocate each ComputedKeyframeValues element,
the allocation has been done before calling Servo_GetComputedKeyframeValues.
MozReview-Commit-ID: LRbriWoal2l
--HG--
extra : rebase_source : 785bb1bc6a62a2f9764fff09f5047942855e3c25
Even for very small layers we want to avoid doing work on the main
thread.
At the same time, however, increase the minimum active layer size for
animations which come from restyles. These involve the main thread
anyway, so there is less to be gained from using an active
layer. Since switching items between active and inactive can have
large knock-on effects, we want to make sure it really is worth making
the layer active.
MozReview-Commit-ID: 8N6xlVW4Dp3
--HG--
extra : rebase_source : bd9a97899faaf187e5e148126711bb0ff5a29ee6
To avoid using StyleAnimationValue on stylo, we should skip
ApplySpacing, which means We always fall back to distribute spacing on stylo.
MozReview-Commit-ID: 9DNwhOI8saf
--HG--
extra : rebase_source : c535139a8171bcdc874fef6bc1a12045957de9e1
We will need to remove animation from timeline before calling Animation::UpdateTiming() in order to fire the cancel event.
In bug 1264125, we request one more tick after calling Animation::Cancel(), however we won't need to call this request if we apply this changeset.
MozReview-Commit-ID: h0dxUdtgkl
--HG--
extra : rebase_source : ac96209b28fdc781bf3787d348f2ae989e695640
EnsureBaseStyle() requires an already resolved nsStyleContext
and resolves the base style by ResolveStyleByRemovingAnimation().
MozReview-Commit-ID: BHqJiBJspQY
Move the implementation of uncomputing to string into AnimationValue,
and add one more FFI for RawServoAnimationValue.
MozReview-Commit-ID: JFnXnGO3mlp
--HG--
extra : rebase_source : 83c0e084ef4202a5c98c668d68bfe9066196d735
Replace the argument type with AnimationValue.
MozReview-Commit-ID: IeydVOLKTB9
--HG--
extra : rebase_source : 9537e40c9ffa16919a08765daa5d12e020e5d17c
Currently, we have StyleAnimationValue for Gecko and
RawServoAnimationValue for Servo, and use this struct to wrap them to
avoid the duplicated code.
MozReview-Commit-ID: ATDBSCOX2C5
--HG--
extra : rebase_source : 85991ef5e23a445ae6302264508d1c06a46c0e29
For components also referencing it in code, see the blockers of bug 1336311.
MozReview-Commit-ID: 4tUZ24HKBWy
--HG--
extra : rebase_source : ec16149f525b9b7eaca7f96f1369929d21497121
We need to filter zero-length segments (i.e. entries with the same
offsets) before handle missing final keyframes.
MozReview-Commit-ID: DGJPrNRXlmd
--HG--
extra : rebase_source : e5a56fb9b8d41fedf2458aee8ae2d8bd806451b6
1333539-2.html is the test case that crashes without |!aAnimation->GetTimeline()|
check in AddAnimationForProperty().
MozReview-Commit-ID: 8UxYL8o63E1
--HG--
extra : rebase_source : af3247df257bc79e507113e2843854f478675a5b
We should pass these animation tests now:
* 1216842-3.html
* 1216842-4.html
* 1278485-1.html
* 1290535-1.html
* layout/style/crashtest/1290994-1.html
* layout/style/crashtest/1290994-2.html
* layout/style/crashtest/1290994-3.html
And these tests still need to be verified by Bug 1334036.
* 1216842-1.html
* 1216842-2.html
* 1216842-5.html
* 1216842-6.html
MozReview-Commit-ID: 1qLcS9ovsYp
--HG--
extra : rebase_source : 7b013fd62a79352d429e2bf28246a2587a327db5
Make FindAnimationsForCompositor return false because we don't support
OMTA, and use warnings, instead of assertions, because animations sill
work.
We call RequestRestyle(Layer) not only for OMTA but also for
non-compositor-driven animations, so just skip the animation generation part,
and use warnings, instead of assertions.
MozReview-Commit-ID: LNw5aC8jOvh
--HG--
extra : rebase_source : e573c2ec8ef4b32796764e869dc3e1fd58cfa6cb
In Web Animations specification, if the animation effect is in none of the any phase, it define as 'Idle' phase. [1]
But, in the gecko, it defined as 'Null' phase.
So we will need to use 'Idle' phase for consistency.
[1] https://w3c.github.io/web-animations/#idle-phase
MozReview-Commit-ID: FlPpYOqdM4X
--HG--
extra : rebase_source : ec294c84f9c77a42d6128e3d43380b80fc130513
Implement the mapping between EffectCompositor::CascadeLevel in Gecko and
EffectCompositor_CascadeLevel in Servo, so we can pass it as a parameter into
Gecko_GetAnimationRule.
MozReview-Commit-ID: GRedooyGE8c
--HG--
extra : rebase_source : c18d54dabb093242c66d46be8ca03424a2c6ca78
1. Add one new FFI, Gecko_GetAnimationRule, which will try
to update the animation rule and retrieve a ServoAnimationRule
from EffectSet.
2. Add GetServoAnimationRule, which calls Animation::ComposeStyle and updates
mElementsToRestyle.
3. There is no eRestyle_{CSSAnimations|CSSTransitions}, so we use
eRestyle_Self and eRestyle_Subtree for stylo.
MozReview-Commit-ID: 9RpJurPSFMk
--HG--
extra : rebase_source : 6f1246b73a920aee86faeeaccc42b7f51ed2a6c8
nsDOMNavigationTiming is not thread-safe ref-counted, so it's better not to
put it into RefPtr because we might call those functions from servo side.
Actually, nsDOMNavigationTiming is held by the document, and the document
must still live in these functions.
MozReview-Commit-ID: AyZ4k749btm
--HG--
extra : rebase_source : 06c0f3654a32483594b80042ec854d3c09a21d9c
We need to call GetEffectSet() from Servo code, which passes an
immutable reference to GeckoElement, so it's better to make dom::Element
const.
MozReview-Commit-ID: GqQEB7BwkJA
--HG--
extra : rebase_source : 4b025f56949d8327781be26d1607e6d9f4668f2f
1. Call Servo's interpolation from KeyframeEffectReadOnly::ComposeStyle().
2. Store the results into ServoAnimationRule.
MozReview-Commit-ID: LOp2mbXforg
--HG--
extra : rebase_source : eda5e275e81f2413b2a729e8d06663eae496c15c
1. Introduce ServoAnimationRule, which is an equivalent of AnimValuesStyleRule.
2. Wrap ServoAnimationRule and AnimValuesStyleRule into a struct, and
use it as the parameter of Animation::ComposeStyle and
KeyframeEffectReadOnly::ComposeStyle.
3. Uncompute the RawServoAnimationValues in ServoAnimationRule when we
need it.
MozReview-Commit-ID: HahXDYBCAhH
--HG--
extra : rebase_source : cd8c6f3a8409abf97f04af888953ff0e77d98348
Based on the other changesets in this series, we don't expect to be calling
UpdateProperties() and ComposeStyle() from within ComposeStyle() itself.
However, in case there is some scenario where that does still occur, we leave
the mIsComposing check in place and add an equivalent MOZ_DIAGNOSTIC_ASSERT so
that we are alerted if this does occur on debug / Nightly / DevEdition builds,
but handle it gracefully on beta or release builds.
MozReview-Commit-ID: 2cFpyMFR29Q
--HG--
extra : rebase_source : 8d6175b8785dd062bda85eda7f06c01bec42fbee
Test case, 1330190-2.html, is another variant of 1325193-1.html. It's for
animation on a pseudo element, causes timeout without part 3 patch.
MozReview-Commit-ID: KX6FE8mkZY2
--HG--
extra : rebase_source : f5efbae0cc30036a511659eab9b29b5091df7539
Unlike the other one this function does not need an old nsStyleContext.
This function just resolves style without all animation data in the first place.
The existing ResolveStyleWithoutAnimation is renamed to
ResolveStyleByRemovingAnimation.
MozReview-Commit-ID: 1RmCQNw0MmW
--HG--
extra : rebase_source : eaf55ecac77f6bb803b1f9508444bf34106d6da3
The StyleAnimationValue for filter and shadow has no mCSSValueList in case of
initial style.
MozReview-Commit-ID: JigQQBbx77x
--HG--
extra : rebase_source : b2bb513424a7d089c8dfb6b880dd7c7239280efb
window.requestIdleCallback can not be used right after enabling its pref in the
same window object. We need to open a new window after enabling the pref.
Also, setting layout.css.devPixelsPerPx in the new windows seems to make
test_session_scroll_position.html failure on Android, so in this patch
setting layout.css.devPixelsPerPx is set before opening the new window.
"general.useragent.locale" too.
This patca moves waitForIdleCallback from testcommon.js for preventing from
being used in other tests unintentionally.
MozReview-Commit-ID: Erm2BPnikvB
--HG--
rename : dom/animation/test/chrome/test_animation_performance_warning.html => dom/animation/test/chrome/file_animation_performance_warning.html
extra : rebase_source : 69ccc65e1c16c3a3320d45608e9b14f1507b2e95
This patch also fixes expected computed offset values in frame at 0.5 offset for
add composite.
MozReview-Commit-ID: 8PNp237NoV4
--HG--
extra : rebase_source : 7bdf83741198fb81c6721cad1764e6464033c240
Handling missing keyframe is behind the pref value regardless whether the
script runs on chrome privilege or not. So the pref has to be set explicitly.
MozReview-Commit-ID: 8f83wgGDF4a
--HG--
extra : rebase_source : ac6cfff90680a080194c3c7f92b3636f84cea3b9
We have added a test case in bug 1197620 that finished animation with
fill:forwards on hidden elements restarts when the element gets visible, but
it did not catch this bug. We should have added a case without fill:forwards.
MozReview-Commit-ID: 5lfJkO3i9ME
--HG--
extra : rebase_source : f3c1d28bd8e58b28f17ec927dae7be1372d9c18e
Before this patch we skipped KeyframeEffectReadOnly::ComposeStyle() for
animations that are not in effect.
After this patch we call KeyframeEffectReadOnly::ComposeStyle() even if the
animation is not in-effect state in order to prepare the base style for
properties that can be run on the compositor because the in-effect animation
will be sent to the compositor and might be composed onto the base style on the
compositor after the animation gets out of its delay phase.
MozReview-Commit-ID: FuAZv4jqVMJ
--HG--
extra : rebase_source : 9ef2f078e5ee18735fb8cd3086f20774fe8b1fd0
KeyframeEffectReadOnly::ComposeStyle() might call nsStyleSet::ResolveStyleFor(),
and KeyframeEffectReadOnly::ComposeStyle() itself is called from
nsStyleSet::ResolveStyleFor(). So we have to carefully avoid nested calls of ComposeStyle.
MozReview-Commit-ID: IRM99bGUFLa
--HG--
extra : rebase_source : 05dfab033b738bae92706588708bd7b7a29ec7de
Note that the default values of the prefs are chosen so as to preserve
existing behaviour.
The patch also updates a user-visible warning message, which was
already out of date as of bug 1274991.
MozReview-Commit-ID: AqBBoIucShT
--HG--
extra : rebase_source : 010aa55255d49e4875cb6870f309649a9ca762d5
Currently this function is used when an nsIFrame is generated by reframing. In
reframing, we call EffectCompositor::UpdateEffectProperties, as a result, we
have to clear the base style that we resolved once. So, for such cases, we need
to re-resolve the base style with the style context that is associated with the
nsIFrame.
MozReview-Commit-ID: F90OuF44SPI
--HG--
extra : rebase_source : ef163681f49b11887d4ea546d28a9fd217251d97
Note that the default values of the prefs are chosen so as to preserve
existing behaviour.
The patch also updates a user-visible warning message, which was
already out of date as of bug 1274991.
MozReview-Commit-ID: AqBBoIucShT
--HG--
extra : rebase_source : 9750899e35829dc5388f575dd56c2c888ec6ea99
The approach here is to lazily check if we have such animations. This allows
animations to be modified after being added to the pending animation tracker
(but not after HasPlayPendingGeometricAnimations is called since we cache the
result at that point) and avoids poor performance when calling
RemovePlayPending.
MozReview-Commit-ID: LRLpCRnzvw
--HG--
extra : rebase_source : 59d2fea0458f833a97a3b32413930f9970c7eddb
extra : histedit_source : afbdb4148c21638160c3d2a3d57db71b07180862
Note that in this patch, the mSyncWithGeometricAnimations member is never set
to true since no one calls NotifyGeometricAnimationsStartingThisFrame yet.
MozReview-Commit-ID: GSTQmfkSdoy
--HG--
extra : rebase_source : 1304cdf678095f2eeaa32588b92c0531e8c64fcd
extra : histedit_source : bc25fc10a2451121a2b9fec247db3f92965e9b5b
This should be easier to read and provide us a convenient place to check for
other cases where we need to synchronize with the main thread (such as the
change introduced in this bug where we synchronize with other animations
started at the same time).
MozReview-Commit-ID: 8iuA7P4ycwM
--HG--
extra : rebase_source : 60a706d51897a0522794cd140734ad7158f4ccd6
extra : histedit_source : cbd0849fcb9077afaf3d2cd3f168201ddb2bf7a4
This patch adds a new performance warning type for the case when we start
a transform animation at the same time as an animation that includes a
geometric property. In that case we run the transform animation on the main
thread so that it is synchronized with the geometric animation (which we can
only run on the main thread).
This differs from CompositorAnimationWarningTransformWithGeometricProperties
in that this applies across different elements whilst the existing warning
only covers the case when the same animation animates both transform and
geometric properties.
MozReview-Commit-ID: EcOMo4VDAYY
--HG--
extra : rebase_source : b4bbc3e4ffa69d0d741fe6d67aba0349b9325b3e
extra : histedit_source : 9fd1b33e8776e270241cde40f1905e74fdfcb630
If margin or padding is being animated then we should synchronize with transform
animations.
Originally I included the border-*-width properties in this set. However
I removed them because:
1. Generally animations of border-width are more subtle and it won't be
noticeable if they are not synchronized with transform animations.
2. If authors animate the border shorthand (e.g. border: 1px blue -> 1px black)
we will end up interpolating each of the longhands (including the widths
despite there being no change) and yet such an animation does not really need
to be synchronized with transform animations. Until we add code to workaround
that it seems best to ignore border properties.
I have verified that the tests added in this patch fail without the code changes
in this patch.
MozReview-Commit-ID: AJiDAvTpFuN
--HG--
extra : rebase_source : 58462ab48acc0b1298915d0d3572915b6973ac82
extra : histedit_source : d293cfc68ff59483b4f9543a7a63b140d627a4fa
We would like to use this method in the next patch.
MozReview-Commit-ID: CSdwlVInyds
--HG--
extra : rebase_source : 5e9af4f0ffacaaf08ecee4e6018bed1ee4a74047
extra : histedit_source : b73144f07097982236038c3efb391f6b7d00e5ed
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