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

Issue 26382004: Web Animations CSS: Implement CSS Transitions backed on Web Animations model (Closed)

Created:
7 years, 2 months ago by Timothy Loh
Modified:
7 years, 2 months ago
Reviewers:
dstockwell, Steve Block
CC:
blink-reviews, shans, rjwright, alancutter (OOO until 2018), Mike Lawther (Google), dglazkov+blink, dstockwell, Timothy Loh, apavlov+blink_chromium.org, darktears, Steve Block, dino_apple.com, Eric Willigers
Base URL:
https://chromium.googlesource.com/chromium/blink@master
Visibility:
Public.

Description

Web Animations CSS: Implement CSS Transitions backed on Web Animations model This patch implements CSS Transitions on the Web Animations model. The class CSSAnimations is extended to keep track of running transitions and the CSSAnimationUpdate object is re-used for the transitions update. The update calculation happens before applying animations (with important properties applied), which should have the same behaviour as what is specced (once animations block transitions; see below). This patch *doesn't* fix the various cascade problems in the existing implementation. This mostly matches existing behaviour in starting/running transitions, but there a a couple of changes. The most notable change between the existing implementation and the new is that (as per the Web Animations model) properties that use the default animation will change at 50% instead of 0%. This patch itself also changes behaviour by following the spec and not starting transitions where delay <= -duration (this will be tested once the virtual test suite is turned on). A few other things are left to future patches: - Animations are supposed to block transitions from starting and applying values. - Transitions end up geting added to the default animation stack, which means that we'll also apply them in the animation pass. - The timeline only gets serviced when animations/transitions/rAF are running, so the start time of transitions is going to be wrong if nothing is currently running. - The virtual test suite is blocked on the previous issue. - Reversing transitions is not in the existing implementation, but fairly straightforward to add. - This appears somewhat slower than the existing implementation and we'd need to be at least as fast if we want to switch over to this one later. - We should use the MatchedPropetiesCache for transitions (and animations) where possible. BUG=303430 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=159554

Patch Set 1 #

Patch Set 2 : fix logic for elapsedTime in event #

Total comments: 56

Patch Set 3 : fixed style comments #

Patch Set 4 : addressed some comments #

Patch Set 5 : store animatablevalues explicitly #

Total comments: 10

Patch Set 6 : rename things #

Patch Set 7 : added comment for fill mode ; rebased #

Total comments: 12

Patch Set 8 : rebased ; reviewer comments #

Patch Set 9 : update testexpectations and friends #

Unified diffs Side-by-side diffs Delta from patch set Stats (+284 lines, -71 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
D LayoutTests/virtual/web-animations-css/animations/animation-controller-drt-api-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -4 lines 0 comments Download
D LayoutTests/virtual/web-animations-css/animations/change-one-anim-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -4 lines 0 comments Download
M Source/core/animation/ActiveAnimations.h View 1 chunk +3 lines, -6 lines 0 comments Download
M Source/core/animation/Animation.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/animation/Player.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/animation/css/CSSAnimations.h View 1 2 3 4 5 5 chunks +69 lines, -8 lines 0 comments Download
M Source/core/animation/css/CSSAnimations.cpp View 1 2 3 4 5 6 7 11 chunks +199 lines, -23 lines 0 comments Download
M Source/core/css/resolver/StyleAdjuster.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -4 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.h View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 5 6 7 4 chunks +8 lines, -19 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Timothy Loh
7 years, 2 months ago (2013-10-08 03:49:38 UTC) #1
dstockwell
https://codereview.chromium.org/26382004/diff/6001/Source/core/animation/css/CSSAnimations.cpp File Source/core/animation/css/CSSAnimations.cpp (left): https://codereview.chromium.org/26382004/diff/6001/Source/core/animation/css/CSSAnimations.cpp#oldcode152 Source/core/animation/css/CSSAnimations.cpp:152: return (display != NONE && animations && animations->size()) || ...
7 years, 2 months ago (2013-10-08 21:02:59 UTC) #2
Steve Block
https://codereview.chromium.org/26382004/diff/6001/Source/core/animation/ActiveAnimations.h File Source/core/animation/ActiveAnimations.h (right): https://codereview.chromium.org/26382004/diff/6001/Source/core/animation/ActiveAnimations.h#newcode50 Source/core/animation/ActiveAnimations.h:50: CSSAnimations* cssAnimations() { return &m_cssAnimations; } It sounds like ...
7 years, 2 months ago (2013-10-09 00:57:11 UTC) #3
Timothy Loh
Addressed doug's simpler style comments.. https://codereview.chromium.org/26382004/diff/6001/Source/core/animation/css/CSSAnimations.cpp File Source/core/animation/css/CSSAnimations.cpp (left): https://codereview.chromium.org/26382004/diff/6001/Source/core/animation/css/CSSAnimations.cpp#oldcode152 Source/core/animation/css/CSSAnimations.cpp:152: return (display != NONE ...
7 years, 2 months ago (2013-10-09 01:33:06 UTC) #4
Timothy Loh
I discussed with Doug about how/where we want to be applying the values to the ...
7 years, 2 months ago (2013-10-09 07:39:23 UTC) #5
dstockwell
https://codereview.chromium.org/26382004/diff/6001/Source/core/animation/css/CSSAnimations.h File Source/core/animation/css/CSSAnimations.h (right): https://codereview.chromium.org/26382004/diff/6001/Source/core/animation/css/CSSAnimations.h#newcode80 Source/core/animation/css/CSSAnimations.h:80: void endTransition(CSSPropertyID id) { m_endedTransitions.add(id); } On 2013/10/09 01:33:07, ...
7 years, 2 months ago (2013-10-09 21:03:51 UTC) #6
Timothy Loh
https://codereview.chromium.org/26382004/diff/6001/Source/core/animation/css/CSSAnimations.h File Source/core/animation/css/CSSAnimations.h (right): https://codereview.chromium.org/26382004/diff/6001/Source/core/animation/css/CSSAnimations.h#newcode80 Source/core/animation/css/CSSAnimations.h:80: void endTransition(CSSPropertyID id) { m_endedTransitions.add(id); } On 2013/10/09 21:03:51, ...
7 years, 2 months ago (2013-10-10 02:10:19 UTC) #7
Steve Block
lgtm https://codereview.chromium.org/26382004/diff/50001/Source/core/animation/css/CSSAnimations.cpp File Source/core/animation/css/CSSAnimations.cpp (right): https://codereview.chromium.org/26382004/diff/50001/Source/core/animation/css/CSSAnimations.cpp#newcode145 Source/core/animation/css/CSSAnimations.cpp:145: styleChange.add(id, CandidateTransition(from, to, anim)); You should call release() ...
7 years, 2 months ago (2013-10-13 23:58:20 UTC) #8
dstockwell
lgtm Just a couple of naming nits. https://codereview.chromium.org/26382004/diff/50001/Source/core/animation/css/CSSAnimations.cpp File Source/core/animation/css/CSSAnimations.cpp (right): https://codereview.chromium.org/26382004/diff/50001/Source/core/animation/css/CSSAnimations.cpp#newcode137 Source/core/animation/css/CSSAnimations.cpp:137: void updateIfPropertyChanged(const ...
7 years, 2 months ago (2013-10-14 00:05:21 UTC) #9
Timothy Loh
https://codereview.chromium.org/26382004/diff/50001/Source/core/animation/css/CSSAnimations.cpp File Source/core/animation/css/CSSAnimations.cpp (right): https://codereview.chromium.org/26382004/diff/50001/Source/core/animation/css/CSSAnimations.cpp#newcode137 Source/core/animation/css/CSSAnimations.cpp:137: void updateIfPropertyChanged(const CSSAnimationData* anim, CSSPropertyID id, const RenderStyle* oldStyle, ...
7 years, 2 months ago (2013-10-14 00:32:27 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/timloh@chromium.org/26382004/63001
7 years, 2 months ago (2013-10-14 00:32:46 UTC) #11
commit-bot: I haz the power
Retried try job too often on linux_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink_rel&number=7983
7 years, 2 months ago (2013-10-14 01:42:15 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/timloh@chromium.org/26382004/80001
7 years, 2 months ago (2013-10-14 02:32:53 UTC) #13
commit-bot: I haz the power
7 years, 2 months ago (2013-10-14 03:46:06 UTC) #14
Message was sent while issue was closed.
Change committed as 159554

Powered by Google App Engine
This is Rietveld 408576698