calc() serialization in stylo changed to align to the spec more closely (modulo percentage order).
See the linked issue.
MozReview-Commit-ID: GyzZvdumMSe
In Servo, the max value for 'translate' is different from normal float since
is using Au ( AppUnit ). The value which we introduced as MAX_AU_PX
( 1.78957e+7 ) in this test is calculated by following mechanis.
1. Like this time, if the value is larger than max float, stored into specified
value as infinity by parsing.
2. Then, when converts to the computed value Au from the specified value
(infinity), ABSOLUTE_LENGTH_MAX (1 << 30) = 1073741824 stores into the Au.
[1]
3. Finally, when get the PX value, returns the value which devided by
AU_PER_PX ( 60 ). This value is 1.78957e+7.
[1] to_au_round() method
https://searchfox.org/mozilla-central/source/servo/components/style/values/specified/length.rs#249
MozReview-Commit-ID: BVfDhOKXaWw
--HG--
extra : rebase_source : e55be1f42d9198c35bb8f29882ff19ec9de8f2fa
The serialization of the value in getKeyframes() on both Gecko and Servo is
different, especially 'initial', 'inherit' and 'unset' on discrete animation.
Gecko returns those value as is, but Servo returns computed value.
We are understanding computed value (Servo) is right, so we change expected
values for them. Also, we skip them if this test is running on Gecko.
MozReview-Commit-ID: 4GFpCpec0eP
--HG--
extra : rebase_source : 8bb9fc670fb7ffd56935cdfb4f038be334782de7
Since we made -moz-appearance animatable, append to the moz prefixed properties
test.
MozReview-Commit-ID: 9tdouU1umEB
--HG--
extra : rebase_source : 79e9639360461452249ce54ff538294f25b6cd4f
From the official link for -moz-force-broken-image:
A value of 1 means that the broken image icon is even shown if the image has
an alt attribute. A value of 0 only displays the alt attribute.
It's really ambiguous how we handle other values. Actually stylo's parser
rejects other values. We should use the valid values for this test.
MozReview-Commit-ID: CzmIvsmauke
--HG--
extra : rebase_source : a6387e07b3578cf811bd17f772d791ec73bfa1e7
Unlike Gecko, Stylo currently invokes a needless RequestRestyle(Standard)
for this test case (bug 1388560). For this reason, the check right after
re-attaching the orphaned element passes accidentally.
MozReview-Commit-ID: JUG1dgMUQEX
--HG--
extra : rebase_source : a86d72a41c160edc30f83d82179ebe1226b842de
Actually we have a chance to run styling process when we attach an orphaned
element to a document in this test setup. Precisely, we can process a restyle
between rAF callbacks and Promise.then() callback for waitForAnimationFrames().
So if we call RequestRestyle(Layer) when we attach the element to the document
(bug 1388557), the animation starts restyling in the first frame. *BUT* this
behavior will also change once our micro tasks handling becomes the HTML spec
compliance (bug 1193394). When the micro tasks handling changes, we should also
fix a bunch of test cases and test utilities in bug 1388557.
MozReview-Commit-ID: GyH1ofGhXOP
--HG--
extra : rebase_source : 3536c315960150960fd43286b205c03c584d53ca
DOMWindowUtils.isStyledByServo checks not only the preference value but also
STYLO_FORCE_ENABLED value. This is important especially when we run test on
our CI. On our CI, the preference value is false but just STYLO_FORCE_ENABLED
is set.
MozReview-Commit-ID: FKEd5LFwcxf
--HG--
extra : rebase_source : 1ffd8a68a8339babed14f441bf2d69c9ffd9e3ee
It has been able to pass on stylo since bug 1376248.
MozReview-Commit-ID: 142ptKlqrHe
--HG--
extra : rebase_source : 3bb601122b1593d87a520d3585cc84c0868d6ac8
This test fails without the first patch in this series.
MozReview-Commit-ID: A22aFPnklqj
--HG--
extra : rebase_source : c3a4e1f1dea0444895a3b60c45814c219ff65ac6
Before this refactoring, getComputedStyle could have side effects, and left the
style data in the element, so we could never arrive there without data.
There are a few crashtests that caught this, but this was already broken if you
called animate() on an element deep in a display: none subtree.
MozReview-Commit-ID: 1AvOvhAyOP3
--HG--
extra : rebase_source : 0a920df8809961f784026a14a624d8eafb4cc79f
The previous patch takes the approach that we should simply not add elements in
documents without a pres shell to EffectCompositor's set of elements to restyle.
However, there exists a case where we might have an element in a displayed
document, then we might tickle it so that it requests an animation restyle, and
then move it to a document without a browsing context. In that case we should
skip the element when we next do animation restyles.
However, even if we successfully skip the element in the document without a pres
shell, we need to make sure it eventually gets removed from the set of elements
to restyle rather than simply remaining there forever. For that reason this
patch makes us unconditionally clear the set of elements to restyle whenever we
do a full restyle from the root.
This patch also adds a test case to trigger the scenario outlined in the first
paragraph above. I have confirmed that without the code changes in this patch,
if we simply assert that target.mElement has an associated pres shell in
getNeededRestyleTarget, then that assertion will fail when running this test
case.
MozReview-Commit-ID: ED2X5g39hYZ
--HG--
extra : rebase_source : 06fecc98c25c739d26123bddf1fd0908cf4410e6
extra : source : 12c7a036215a901bf6804c0e9aacd2a9fc20f932
Update the various animation restyle tests to check the new animation only data
inside the restyle marker.
MozReview-Commit-ID: HEe8x45IhHj
--HG--
extra : rebase_source : fdaa5855e94d68ce2a70d00fde11582c9a538f45
Since we implement following properties animatable, append to test.
* -moz-border-bottom-colors
* -moz-border-left-colors
* -moz-border-right-colors
* -moz-border-top-colors
MozReview-Commit-ID: E3zWaDcRdtE
--HG--
extra : rebase_source : 27301a4bc354f14cf3f90e8c8271be6022d99721
For this test case, we can't use global '::before' and '::after' selectors
since it changes visiting order for the pseudo elements on updating styles
and leads to different results of observed records.
MozReview-Commit-ID: 4e4eZTmr0gJ
--HG--
extra : rebase_source : f966aef3145e317a81262eaf67f402a80af3a90c
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
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
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
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
I have verified that this crashtest fails without the corresponding Servo-side
code changes.
MozReview-Commit-ID: 9obKluN3fgv
--HG--
extra : rebase_source : 71d82eb24ccb9fea1674d08be9b317997df7fe3f
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
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
For components also referencing it in code, see the blockers of bug 1336311.
MozReview-Commit-ID: 4tUZ24HKBWy
--HG--
extra : rebase_source : ec16149f525b9b7eaca7f96f1369929d21497121