The added test passes locally on Linux with OMT compositing and OMT
animations enabled. However, it also passes without the patch because
the calls to FlushAnimations and FlushTransitions from
PresShell::FlushPendingNotifications cover up the damage done by bugs in
the animation-only style flush.
Unfortunately due to lack of global history on B2G and not running OMT
animations tests on any other platforms, the new test won't actually run
in automation right now.
This affects the correctness of transitions that take over from a
running animation. (In the current code this can happen on a single
element; once the cascading changes in bug 960465 are complete it can
only happen via inheritance.)
This version of the patch changes to do the test using opacity rather
than transform, since testing using transforms encountered issues
related to bug 1031688: the presence of phantom transitions due to the
interaction of the computed value rules for transforms distinguishing
between values that the interpolation rules consider identical. (These
problems only appear after patch 24 in this bug changes the coalescing
order between a parent with animations and a child with transitions so
that the parent is handled before the child, instead of transitions
being handled before animations.)
The final two added tests fail without the patch and pass with the patch.
(With the opacity version, the third to last test also fails without the
patch, probably due to the value not having yet been sent to the layer.
This was not an issue pre-patch with the original test using transform,
though. I haven't tested that this happened with patch 0, though, so it
might have been the issue patch 0 fixes.)
This removes each test element when we're done with it so that each
successive test element isn't 100px lower. This is required to keep the
third test element (added in the next patch) onscreen when running tests
on the B2G emulator (other than when running a single test at a time).
This, in turn, is required to get animations in that test properly
shipped to the compositor thread, which is required for the test to
pass.
I think this has become needed due to changes in the configuration of
the VMs on which we're running tests.
--HG--
extra : transplant_source : %83%CE%27M%CF2%0E%A9%0B%B4%9E%BC%AB%E45g%C9J%D4%17
When animation-name does not match a keyframes rule, we should not dispatch
animation events as per:
"Any animation for which both a valid keyframe rule and a non-zero duration
are defined will run and generate events; this includes animations with empty
keyframe rules."
http://dev.w3.org/csswg/css-animations/#events
Since bug 1004377, however, we started dispatching events in this case because
we no longer ignore animations whose set of keyframes is empty.
This patch checks for a matching keyframes rule in BuildAnimations and if one is
not found, no corresponding animation is generated.
The -*- file variable lines -*- establish per-file settings that Emacs will
pick up. This patch makes the following changes to those lines (and touches
nothing else):
- Never set the buffer's mode.
Years ago, Emacs did not have a good JavaScript mode, so it made sense
to use Java or C++ mode in .js files. However, Emacs has had js-mode for
years now; it's perfectly serviceable, and is available and enabled by
default in all major Emacs packagings.
Selecting a mode in the -*- file variable line -*- is almost always the
wrong thing to do anyway. It overrides Emacs's default choice, which is
(now) reasonable; and even worse, it overrides settings the user might
have made in their '.emacs' file for that file extension. It's only
useful when there's something specific about that particular file that
makes a particular mode appropriate.
- Correctly propagate settings that establish the correct indentation
level for this file: c-basic-offset and js2-basic-offset should be
js-indent-level. Whatever value they're given should be preserved;
different parts of our tree use different indentation styles.
- We don't use tabs in Mozilla JS code. Always set indent-tabs-mode: nil.
Remove tab-width: settings, at least in files that don't contain tab
characters.
- Remove js2-mode settings that belong in the user's .emacs file, like
js2-skip-preprocessor-directives.
This patch adds a test for transitions with a delay that run on the compositor.
Currently animations (including transitions) are not sent to the compositor
until they reach the end of their delay phase introducing the possibility that
the behavior might differ for animations with or without delays.
This patch adds a simple test for a transition with a delay. It also fixes an
existing bug in the opacity test. Also, it moves the step where the "transition"
property is removed to the end of the test sequence rather than the end of the
opacity test (which previously happened to occur at the end of the test
sequence).
This patch removes the check that skipped queueing events for animations
without keyframes since the spec indicates such animations should dispatch
events.
There is a further correctness fix here for the case where a keyframes rule
is modified using the CSSOM so that it becomes empty. Previously when we
came to create the new animation rules we would end up setting
ElementAnimations::mNeedRefreshes to false since we check if the keyframes
rule is empty and if it is we would skip all further processing (including
setting mNeedsRefreshes).
That means that:
(a) We may end up unregistering from the refresh observer so we would never
dispatch the end event for such an animation.
(b) If the animation was running on the compositor we may never remove it from
the compositor or may not do it in a timely fashion.
To fix both these problems, this patch removes the check for an empty keyframes
rule so that mNeedsRefreshes is set in this case.
This patch adjusts the tests for transform transitions that run on the
compositor to handle transitions that begin with a non-invertible transform.
In this case the first sample at the start of the animation won't create
a layer because in nsDisplayTransform::BuildLayer
/ FrameLayerBuilder::BuildContainerLayerFor we'll skip creating the layer once
we notice the equivalent matrix is singular.
In this patch we detect that case and force an extra sample betwee 0 and 200s at
100s. This means the layer will be created at t=100s and be available for
querying at the next sample.
Similar issues could occur, for example, if the transforms at both t=0s
and t=100s are not invertible but currently that doesn't occur. We can add
handling for that if and when it becomes necessary.
This patch takes the existing tests for transitions running on the compositor
and makes them re-use the same test utility methods as used for testing CSS
Animations that run on the compositor. This means these tests now also check
that the transition is in fact running on the compositor when it is expected to.
It seems the big_omta_round_error is no longer needed so I've removed that.
The test that begins with "skew(45deg, 45deg)" currently fails so it is skipped
here. This is addressed in the next patch in the series.
This patch simply re-arranges the order of arguments to omta_is_approx so that
the delta sits along side the values being compared.
This, I think, makes more sense and also is more consistent when converting
tests from test_animations.html to test_animations_omta.html since the
"RunningOn" parameter is consistently inserted in the second-to-last position
just before the description for both omta_is and omta_is_approx.
This patch removes the line from new_div that forced a style flush. This was
very confusing because:
* It behaved differently to new_div in test_animations.html so copying tests
over was more complex (particularly when registering for events is involved).
* It meant after setting up initial style using new_div you could just call
waitForPaints but if you updated style using elem.style you'd need to call
waitForPaintsFlushed.
In adjusting test_animations_omta.html we are able to simplify the tests
somewhat. This patch also adds a few additional checks that waiting to update
the compositor does not produce different results.
This patch moves some test utility methods from test_animations_omta.html to
animation_utils.js. It also renames addAsyncTest to addAsyncAnimTest and
likewise for a few other methods.