This patch adds a version of tests in test_animations.html under the heading,
"css3-animation: 3.8 The 'animation-delay' Property", for animations
that run on the compositor thread.
This patch adds a version of tests in test_animations.html under the heading,
"css3-animation: 3.7 The 'animation-play-state' Property", for animations
that run on the compositor thread.
This patch adds a version of tests in test_animations.html under the heading,
"css3-animation: 3.6 The 'animation-direction' Property, for animations
that run on the compositor thread.
This patch addresses and issue where the OMTA style and computed style were not
comparing equal in one particular case.
In this case AddTransformTranslate in nsStyleAnimation would give us
a translate-y value of 94.331673 in both cases (i.e. when calculating the
animated value on the compositor thread or when fetching computed style).
For the OMTA case, however, after we apply additional layer transformations and
then reverse them (so we can query the CSS value) we'd end up with 94.331642,
a difference of 0.000031. The reversing procedure is only used for testing so
the actual error introduced here by the additional layer transformations is
probably less.
Unfortunately, when we pass 94.331642 this along to MatrixToCSSValue we get back
matrix(1, 0, 0, 1, 94.3316) since it only outputs 6 digits of precision.
On the other hand, on the computed style end we'd pass 94.331673 to
MatrixToCSSValue which gives us matrix(1, 0, 0, 1, 94.3317), so the error swells
from 0.000031 to 0.0001.
Then when we subtract 94.3316 from 94.3317 in Javascript we get
0.00010000000000331966 due to floating-point precision issues which compares
greater than the default tolerance of 0.0001.
This patch simply adjusts the default tolerance to 0.00011 to accommodate
these floating-point differences.
This patch adds a version of tests in test_animations.html under the heading,
"css3-animation: 3.5 The 'animation-iteration-count' Property" for animations
that run on the compositor thread.
These tests surface an issue where in some cases precision errors lead to
discrepencies between the OMTA style and computed style. This is fixed in
a subsequent patch in this series.
This patch adds a version of the tests in test_animations.html under the
heading, "css3-animations: 3.2. The 'animation-name' Property" that tests the
same features when animations are running on the compositor thread.
The test harness code for normalizing transform inputs to a standard form for
comparison fails to detect the case where the input is a string such as
{ tx: "20px" }
instead of:
{ tx: 20 }
When we go to compare matrix components we fail if:
Math.abs(a.comp - b.comp) > tolerance
But if a.comp or b.comp is a string, we'll get NaN on the LHS and
"NaN > tolerance" will return false so we'll skip the failure handling and
continue onto the next component. That means if we have input { tx: "30px" } and
we get "20" as the x-translation component we'll pass the test.
This patch fixes this condition to check for isNaN.
We *could* also just drop a few .map(parseFloat) calls into
convertObjectTo3dMatrix and convertArrayTo3dMatrix to ensure "20px" becomes 20
but there may be situations where that masks bugs (since "20px" and "20em" turn
into the same thing) so for now this minimal fix should be enough.
This patch converts the tests in test_animations.html under the heading,
"css3-animations: 3.1. Timing functions for keyframes" to an equivalent version
for testing animations that run on the compositor thread.
and use this in StreamBuffer::GetAllTracksEnd() to detect when no more tracks
will be added.
--HG--
extra : transplant_source : %B7A-%7EV%94%E1%CE%15%1C%15%7B%84%D5%F1%1D%A2%CF%EC%15