Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Issue 60033004: Don't check all animation/transition properties when comparing RenderStyles (Closed)

Created:
7 years, 1 month ago by Steve Block
Modified:
7 years, 1 month ago
CC:
blink-reviews, rjwright, alancutter (OOO until 2018), Mike Lawther (Google), dstockwell, Timothy Loh, darktears, dino_apple.com, Eric Willigers, mithro-old
Visibility:
Public.

Description

Don'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)
Steve Block
This will be rebased on https://codereview.chromium.org/61033003 once it lands
7 years, 1 month ago (2013-11-06 00:20:33 UTC) #1
mithro-old
On 2013/11/06 00:20:33, Steve Block wrote: > This will be rebased on https://codereview.chromium.org/61033003 once it ...
7 years, 1 month ago (2013-11-06 02:15:57 UTC) #2
Steve Block
> The CL at https://codereview.chromium.org/61033003 has landed, please rebase. Done > Looks like it currently ...
7 years, 1 month ago (2013-11-06 02:23:40 UTC) #3
Steve Block
> > Looks like it currently breaks css3/filters/composited-during-animation.html ? > Investigating ... This relied on ...
7 years, 1 month ago (2013-11-06 04:06:13 UTC) #4
shans
On 2013/11/06 04:06:13, Steve Block wrote: > > > Looks like it currently breaks css3/filters/composited-during-animation.html ...
7 years, 1 month ago (2013-11-06 06:02:08 UTC) #5
Steve Block
> would be interesting to have a test change some of these values partway through ...
7 years, 1 month ago (2013-11-06 12:29:38 UTC) #6
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
7 years, 1 month ago (2013-11-06 23:02:48 UTC) #7
Steve Block
+dstockwell
7 years, 1 month ago (2013-11-06 23:05:25 UTC) #8
dstockwell
lgtm
7 years, 1 month ago (2013-11-07 00:54:09 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/steveblock@chromium.org/60033004/220001
7 years, 1 month ago (2013-11-07 00:59:27 UTC) #10
mithro-old
lgtm
7 years, 1 month ago (2013-11-07 01:34:33 UTC) #11
commit-bot: I haz the power
7 years, 1 month ago (2013-11-07 06:13:17 UTC) #12
Message was sent while issue was closed.
Change committed as 161494

Powered by Google App Engine
This is Rietveld 408576698