DescriptionDon't check all animation/transition properties when comparing RenderStyles
Changes to the timing function, iteration count, delay, duration, direction
and fill mode properties of an animation or transition should never cause an
animation or transition to start. Similarly, when an animation or transition
runs, the values it uses for these properties are snapshotted at the start
of the animation or transition, so it should be unresponsive to changes to
these properties.
This means that we don't need to compare these properties when comparing
RenderStyle objects for the purposes of initiating style recalc.
This patch removes the comparison of these properties from
CSSAnimationData::animationsMatch() and renames the method to
CSSAnimationData::animationsMatchForStyleRecalc(). The only properties that are
still compared are the name, play state, property name and mode, and the isNone
flag. The only (eventual) users of
CSSAnimationData::animationsMatchForStyleRecalc() are
Element::pseudoStyleCacheIsInvalid() and RenderStyle::compare().
This allows TimingFunction::operator==() to be removed.
This patch adds LayoutTests to confirm that changes to the timing properties do
not trigger animations or transitions, or cause them to be updated when already
running. Note that these tests don't directly prove that the timing properties
are not considered when comparing RenderStyles for style recalc, as additional
logic should exist to ignore changes to these properties, even if style recalc
is triggered independently. As a result, both tests pass with the Web
Animations engine, even without this change.
This patch also fixes LayoutTest css3/filters/composited-during-animation.html,
which currently relies on changes to the timing function and duration to start
the animation.
R=shans
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=161494
Patch Set 1 #Patch Set 2 : Rebased #Patch Set 3 : Added a test and fixed an existing bad test #Patch Set 4 : Add a test for updating properties while animation is running #Patch Set 5 : Rebased #Messages
Total messages: 12 (0 generated)
|