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

Issue 814083003: Update animation when changes in animation keyframes are detected. (Closed)

Created:
6 years ago by shend
Modified:
5 years, 10 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-css, dglazkov+blink, ed+blinkwatch_opera.com, Eric Willigers, Mike Lawther (Google), rjwright, rwlbuis, shans, Steve Block
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Update animation when changes in animation keyframes are detected. This patch detects changes in the keyframe rules of animations, and updates the animating elements accordingly. Firefox allows keyframes to be changed, but IE doesn't. BUG=399950 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=189311

Patch Set 1 #

Patch Set 2 : Detect changes in timing function #

Patch Set 3 : Add tests for changing timing function #

Total comments: 2

Patch Set 4 : Move change counters to CSSAnimations #

Total comments: 11

Patch Set 5 : Address comments #

Total comments: 6

Patch Set 6 : Force style recalc when creating @keyframe rules #

Patch Set 7 : Address comments and fix up test #

Patch Set 8 : Detect when style changes to a different object #

Total comments: 9

Patch Set 9 : Detect changes in keyText() #

Total comments: 4

Patch Set 10 : Add test for changes in keyframe name #

Patch Set 11 : Address comments #

Total comments: 6

Patch Set 12 : Address comments #

Patch Set 13 : Fix ref pointer crash bug #

Patch Set 14 : Rebase #

Total comments: 6

Patch Set 15 : Rebase again #

Total comments: 19

Patch Set 16 : Rebase and address comments #

Total comments: 10

Patch Set 17 : Separate layout tests #

Patch Set 18 : Address comments #

Total comments: 6

Patch Set 19 : Rebase + Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+448 lines, -81 lines) Patch
A LayoutTests/animations/keyframes-cssom-change-name-updates-animation.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +30 lines, -0 lines 0 comments Download
A LayoutTests/animations/keyframes-cssom-updates-animation.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +66 lines, -0 lines 0 comments Download
A LayoutTests/animations/keyframes-cssom-updates-compositor-animation.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +24 lines, -0 lines 0 comments Download
A LayoutTests/animations/keyframes-style-declaration-updates-animation.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +55 lines, -0 lines 0 comments Download
A LayoutTests/animations/timing-functions-update-animation.html View 1 2 1 chunk +50 lines, -0 lines 0 comments Download
M Source/core/animation/Animation.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/animation/Timing.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/animation/css/CSSAnimationUpdate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 7 chunks +72 lines, -41 lines 0 comments Download
M Source/core/animation/css/CSSAnimations.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +33 lines, -2 lines 0 comments Download
M Source/core/animation/css/CSSAnimations.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 11 chunks +31 lines, -21 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/css/CSSKeyframeRule.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/css/CSSKeyframeRule.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +5 lines, -2 lines 0 comments Download
M Source/core/css/CSSKeyframesRule.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +7 lines, -1 line 0 comments Download
M Source/core/css/CSSKeyframesRule.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +4 lines, -0 lines 0 comments Download
A Source/core/css/KeyframeStyleRuleCSSStyleDeclaration.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +27 lines, -0 lines 0 comments Download
A Source/core/css/KeyframeStyleRuleCSSStyleDeclaration.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +23 lines, -0 lines 0 comments Download
M Source/core/css/PropertySetCSSStyleDeclaration.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +3 lines, -2 lines 0 comments Download
M Source/core/css/PropertySetCSSStyleDeclaration.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +1 line, -1 line 0 comments Download
M Source/core/css/resolver/ScopedStyleResolver.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/resolver/ScopedStyleResolver.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +5 lines, -4 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 45 (4 generated)
shend
Added code to detect changes in keyframes (via appendrule/deleterule). Also modified the way changes to ...
5 years, 12 months ago (2014-12-29 00:08:57 UTC) #2
dstockwell
https://codereview.chromium.org/814083003/diff/40001/Source/core/animation/AnimationNode.h File Source/core/animation/AnimationNode.h (right): https://codereview.chromium.org/814083003/diff/40001/Source/core/animation/AnimationNode.h#newcode172 Source/core/animation/AnimationNode.h:172: unsigned m_styleChangeCounter; This seems specific to CSSAnimations, we should ...
5 years, 12 months ago (2014-12-29 01:59:52 UTC) #3
shend
https://codereview.chromium.org/814083003/diff/40001/Source/core/animation/AnimationNode.h File Source/core/animation/AnimationNode.h (right): https://codereview.chromium.org/814083003/diff/40001/Source/core/animation/AnimationNode.h#newcode172 Source/core/animation/AnimationNode.h:172: unsigned m_styleChangeCounter; On 2014/12/29 01:59:52, dstockwell wrote: > This ...
5 years, 11 months ago (2014-12-29 03:21:37 UTC) #4
dstockwell
https://codereview.chromium.org/814083003/diff/60001/Source/core/animation/css/CSSAnimations.cpp File Source/core/animation/css/CSSAnimations.cpp (right): https://codereview.chromium.org/814083003/diff/60001/Source/core/animation/css/CSSAnimations.cpp#newcode291 Source/core/animation/css/CSSAnimations.cpp:291: if (keyframesRule->styleChangeCounter() > runningAnimation.styleChangeCounter || runningAnimation.specifiedTiming != newTiming) { ...
5 years, 11 months ago (2014-12-29 23:16:34 UTC) #5
shend
https://codereview.chromium.org/814083003/diff/60001/Source/core/animation/css/CSSAnimations.cpp File Source/core/animation/css/CSSAnimations.cpp (right): https://codereview.chromium.org/814083003/diff/60001/Source/core/animation/css/CSSAnimations.cpp#newcode291 Source/core/animation/css/CSSAnimations.cpp:291: if (keyframesRule->styleChangeCounter() > runningAnimation.styleChangeCounter || runningAnimation.specifiedTiming != newTiming) { ...
5 years, 11 months ago (2014-12-30 00:03:40 UTC) #6
dstockwell
https://codereview.chromium.org/814083003/diff/80001/LayoutTests/animations/keyframes-cssom-updates-animation.html File LayoutTests/animations/keyframes-cssom-updates-animation.html (right): https://codereview.chromium.org/814083003/diff/80001/LayoutTests/animations/keyframes-cssom-updates-animation.html#newcode26 LayoutTests/animations/keyframes-cssom-updates-animation.html:26: var rules = document.styleSheets[0].rules; I think we need some ...
5 years, 11 months ago (2014-12-30 00:59:12 UTC) #7
shend
Inserting @keyframes rule by appending <style> tags weren't forcing a style recalc, so animations weren't ...
5 years, 11 months ago (2015-01-02 01:58:29 UTC) #8
shend
Code now keeps track of a pointer to the current keyframes style rule, and updates ...
5 years, 11 months ago (2015-01-05 06:29:55 UTC) #9
dstockwell
https://codereview.chromium.org/814083003/diff/140001/Source/core/css/resolver/ScopedStyleResolver.cpp File Source/core/css/resolver/ScopedStyleResolver.cpp (right): https://codereview.chromium.org/814083003/diff/140001/Source/core/css/resolver/ScopedStyleResolver.cpp#newcode121 Source/core/css/resolver/ScopedStyleResolver.cpp:121: rule->styleChanged(); I think on Friday we discussed that we ...
5 years, 11 months ago (2015-01-05 07:31:18 UTC) #10
shend
Added tests to change the style of an existing keyframe, but it seems to be ...
5 years, 11 months ago (2015-01-06 00:36:18 UTC) #11
dstockwell
https://codereview.chromium.org/814083003/diff/140001/Source/core/css/resolver/ScopedStyleResolver.cpp File Source/core/css/resolver/ScopedStyleResolver.cpp (right): https://codereview.chromium.org/814083003/diff/140001/Source/core/css/resolver/ScopedStyleResolver.cpp#newcode121 Source/core/css/resolver/ScopedStyleResolver.cpp:121: rule->styleChanged(); On 2015/01/06 00:36:17, shend wrote: > On 2015/01/05 ...
5 years, 11 months ago (2015-01-07 00:18:33 UTC) #12
shend
https://codereview.chromium.org/814083003/diff/140001/Source/core/css/resolver/ScopedStyleResolver.cpp File Source/core/css/resolver/ScopedStyleResolver.cpp (right): https://codereview.chromium.org/814083003/diff/140001/Source/core/css/resolver/ScopedStyleResolver.cpp#newcode121 Source/core/css/resolver/ScopedStyleResolver.cpp:121: rule->styleChanged(); On 2015/01/07 00:18:33, dstockwell wrote: > On 2015/01/06 ...
5 years, 11 months ago (2015-01-08 05:05:29 UTC) #13
dstockwell
https://codereview.chromium.org/814083003/diff/140001/Source/core/css/resolver/ScopedStyleResolver.cpp File Source/core/css/resolver/ScopedStyleResolver.cpp (right): https://codereview.chromium.org/814083003/diff/140001/Source/core/css/resolver/ScopedStyleResolver.cpp#newcode121 Source/core/css/resolver/ScopedStyleResolver.cpp:121: rule->styleChanged(); On 2015/01/08 at 05:05:29, shend wrote: > On ...
5 years, 11 months ago (2015-01-08 05:27:24 UTC) #15
Timothy Loh
https://codereview.chromium.org/814083003/diff/200001/Source/core/animation/css/CSSAnimations.cpp File Source/core/animation/css/CSSAnimations.cpp (right): https://codereview.chromium.org/814083003/diff/200001/Source/core/animation/css/CSSAnimations.cpp#newcode293 Source/core/animation/css/CSSAnimations.cpp:293: unsigned styleChangeCounter = keyframesRule ? keyframesRule->styleChangeCounter() : 0; keyframesRule ...
5 years, 11 months ago (2015-01-08 05:28:31 UTC) #16
shend
https://codereview.chromium.org/814083003/diff/200001/Source/core/animation/css/CSSAnimations.cpp File Source/core/animation/css/CSSAnimations.cpp (right): https://codereview.chromium.org/814083003/diff/200001/Source/core/animation/css/CSSAnimations.cpp#newcode293 Source/core/animation/css/CSSAnimations.cpp:293: unsigned styleChangeCounter = keyframesRule ? keyframesRule->styleChangeCounter() : 0; On ...
5 years, 11 months ago (2015-01-08 06:29:48 UTC) #17
shend
On 2015/01/08 06:29:48, shend wrote: > https://codereview.chromium.org/814083003/diff/200001/Source/core/animation/css/CSSAnimations.cpp > File Source/core/animation/css/CSSAnimations.cpp (right): > > https://codereview.chromium.org/814083003/diff/200001/Source/core/animation/css/CSSAnimations.cpp#newcode293 > ...
5 years, 11 months ago (2015-01-13 21:58:28 UTC) #18
Timothy Loh
On 2015/01/13 21:58:28, shend wrote: > PTAL lgtm
5 years, 11 months ago (2015-01-13 23:44:00 UTC) #19
shans
https://codereview.chromium.org/814083003/diff/260001/Source/core/animation/Timing.h File Source/core/animation/Timing.h (right): https://codereview.chromium.org/814083003/diff/260001/Source/core/animation/Timing.h#newcode97 Source/core/animation/Timing.h:97: && *timingFunction == *other.timingFunction; Does this use pointer comparison, ...
5 years, 11 months ago (2015-01-14 00:26:19 UTC) #20
shend
https://codereview.chromium.org/814083003/diff/260001/Source/core/animation/Timing.h File Source/core/animation/Timing.h (right): https://codereview.chromium.org/814083003/diff/260001/Source/core/animation/Timing.h#newcode97 Source/core/animation/Timing.h:97: && *timingFunction == *other.timingFunction; On 2015/01/14 00:26:19, shans wrote: ...
5 years, 11 months ago (2015-01-14 00:42:04 UTC) #21
shans
https://codereview.chromium.org/814083003/diff/260001/Source/core/animation/css/CSSAnimations.h File Source/core/animation/css/CSSAnimations.h (right): https://codereview.chromium.org/814083003/diff/260001/Source/core/animation/css/CSSAnimations.h#newcode86 Source/core/animation/css/CSSAnimations.h:86: updatedAnimation.specifiedTiming = specifiedTiming; On 2015/01/14 00:42:04, shend wrote: > ...
5 years, 11 months ago (2015-01-15 00:29:52 UTC) #22
shend
https://codereview.chromium.org/814083003/diff/260001/Source/core/animation/css/CSSAnimations.h File Source/core/animation/css/CSSAnimations.h (right): https://codereview.chromium.org/814083003/diff/260001/Source/core/animation/css/CSSAnimations.h#newcode86 Source/core/animation/css/CSSAnimations.h:86: updatedAnimation.specifiedTiming = specifiedTiming; On 2015/01/15 00:29:52, shans wrote: > ...
5 years, 11 months ago (2015-01-15 01:51:29 UTC) #23
shend
PTAL
5 years, 11 months ago (2015-01-21 02:49:58 UTC) #24
esprehn
https://codereview.chromium.org/814083003/diff/280001/Source/core/css/CSSKeyframesRule.h File Source/core/css/CSSKeyframesRule.h (right): https://codereview.chromium.org/814083003/diff/280001/Source/core/css/CSSKeyframesRule.h#newcode65 Source/core/css/CSSKeyframesRule.h:65: unsigned styleChangeCounter() const { return m_styleChangeCounter; } This doesn't ...
5 years, 11 months ago (2015-01-21 03:00:47 UTC) #26
shend
On 2015/01/21 03:00:47, esprehn wrote: > https://codereview.chromium.org/814083003/diff/280001/Source/core/css/CSSKeyframesRule.h > File Source/core/css/CSSKeyframesRule.h (right): > > https://codereview.chromium.org/814083003/diff/280001/Source/core/css/CSSKeyframesRule.h#newcode65 > ...
5 years, 11 months ago (2015-01-21 03:25:49 UTC) #27
Timothy Loh
On 2015/01/21 03:25:49, shend wrote: > On 2015/01/21 03:00:47, esprehn wrote: > > > https://codereview.chromium.org/814083003/diff/280001/Source/core/css/CSSKeyframesRule.h ...
5 years, 11 months ago (2015-01-21 05:04:15 UTC) #28
esprehn
On 2015/01/21 at 05:04:15, timloh wrote: > On 2015/01/21 03:25:49, shend wrote: > > On ...
5 years, 11 months ago (2015-01-21 05:34:41 UTC) #29
Timothy Loh
On 2015/01/21 05:34:41, esprehn wrote: > On 2015/01/21 at 05:04:15, timloh wrote: > > On ...
5 years, 11 months ago (2015-01-21 23:23:18 UTC) #30
dstockwell
On 2015/01/21 at 23:23:18, timloh wrote: > On 2015/01/21 05:34:41, esprehn wrote: > > On ...
5 years, 11 months ago (2015-01-23 05:32:21 UTC) #31
esprehn
btw, What does the spec say to do? Not doing it like IE certainly seems ...
5 years, 11 months ago (2015-01-27 21:52:17 UTC) #32
shend
On 2015/01/27 21:52:17, esprehn wrote: > btw, What does the spec say to do? Not ...
5 years, 11 months ago (2015-01-27 22:12:58 UTC) #33
esprehn
On 2015/01/27 at 22:12:58, shend wrote: > On 2015/01/27 21:52:17, esprehn wrote: > > btw, ...
5 years, 11 months ago (2015-01-27 22:16:12 UTC) #34
esprehn
lgtm w/ nits fixed. I might call it animationVersion() instead of styleChangeCounter(). https://codereview.chromium.org/814083003/diff/280001/Source/core/animation/css/CSSAnimationUpdate.h File Source/core/animation/css/CSSAnimationUpdate.h ...
5 years, 10 months ago (2015-01-29 04:23:19 UTC) #35
shend
https://codereview.chromium.org/814083003/diff/280001/Source/core/animation/css/CSSAnimationUpdate.h File Source/core/animation/css/CSSAnimationUpdate.h (right): https://codereview.chromium.org/814083003/diff/280001/Source/core/animation/css/CSSAnimationUpdate.h#newcode85 Source/core/animation/css/CSSAnimationUpdate.h:85: unsigned styleChangeCounter; On 2015/01/29 04:23:19, esprehn wrote: > zero ...
5 years, 10 months ago (2015-01-30 00:03:10 UTC) #36
shend
I changed a lot of code since the last review, could someone please re-review the ...
5 years, 10 months ago (2015-01-30 02:35:15 UTC) #37
Timothy Loh
Didn't look at the rest of it, but... https://codereview.chromium.org/814083003/diff/300001/LayoutTests/animations/keyframes-cssom-updates-animation.html File LayoutTests/animations/keyframes-cssom-updates-animation.html (right): https://codereview.chromium.org/814083003/diff/300001/LayoutTests/animations/keyframes-cssom-updates-animation.html#newcode36 LayoutTests/animations/keyframes-cssom-updates-animation.html:36: test(function() ...
5 years, 10 months ago (2015-01-30 02:43:44 UTC) #38
esprehn
https://codereview.chromium.org/814083003/diff/300001/Source/core/animation/css/CSSAnimationUpdate.h File Source/core/animation/css/CSSAnimationUpdate.h (right): https://codereview.chromium.org/814083003/diff/300001/Source/core/animation/css/CSSAnimationUpdate.h#newcode26 Source/core/animation/css/CSSAnimationUpdate.h:26: NewAnimation newAnimation; Since you're adding a constructor you can ...
5 years, 10 months ago (2015-01-30 02:50:28 UTC) #39
shend
Fixed nits. Any other comments before I commit this? https://codereview.chromium.org/814083003/diff/300001/LayoutTests/animations/keyframes-cssom-updates-animation.html File LayoutTests/animations/keyframes-cssom-updates-animation.html (right): https://codereview.chromium.org/814083003/diff/300001/LayoutTests/animations/keyframes-cssom-updates-animation.html#newcode36 LayoutTests/animations/keyframes-cssom-updates-animation.html:36: ...
5 years, 10 months ago (2015-02-01 23:49:14 UTC) #40
esprehn
lgtm w/ nits. Just fix them and land. :) https://codereview.chromium.org/814083003/diff/340001/Source/core/animation/css/CSSAnimationUpdate.h File Source/core/animation/css/CSSAnimationUpdate.h (right): https://codereview.chromium.org/814083003/diff/340001/Source/core/animation/css/CSSAnimationUpdate.h#newcode23 Source/core/animation/css/CSSAnimationUpdate.h:23: ...
5 years, 10 months ago (2015-02-02 00:11:21 UTC) #41
shend
https://codereview.chromium.org/814083003/diff/340001/Source/core/animation/css/CSSAnimationUpdate.h File Source/core/animation/css/CSSAnimationUpdate.h (right): https://codereview.chromium.org/814083003/diff/340001/Source/core/animation/css/CSSAnimationUpdate.h#newcode23 Source/core/animation/css/CSSAnimationUpdate.h:23: struct NewAnimation { On 2015/02/02 00:11:20, esprehn wrote: > ...
5 years, 10 months ago (2015-02-02 00:53:54 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/814083003/360001
5 years, 10 months ago (2015-02-02 00:54:46 UTC) #44
commit-bot: I haz the power
5 years, 10 months ago (2015-02-02 02:15:53 UTC) #45
Message was sent while issue was closed.
Committed patchset #19 (id:360001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=189311

Powered by Google App Engine
This is Rietveld 408576698