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

Issue 1942703002: Fix handling of multiple keyframes at same offset (Closed)

Created:
4 years, 7 months ago by suzyh_UTC10 (ex-contributor)
Modified:
4 years, 7 months ago
CC:
darktears, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-w3ctests_chromium.org, chromium-reviews, Eric Willigers, rjwright, shans, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix handling of multiple keyframes at same offset When multiple keyframes have the same offset, we cannot always ignore all but the last-specified keyframe. In particular, if iteration progress is negative (e.g. due to easing), the first keyframe with offset 0 is used. See spec: https://w3c.github.io/web-animations/#the-effect-value-of-a-keyframe-animation-effect This patch fixes our implementation in order to pass the W3C web-animations/keyframe-effect/keyframe-handling.html test. It involves (a) not removing as redundant those end keyframes that have the same offset as their neighbours, (b) allowing interpolations with the same offset at both ends, and (c) using the same keyframe as both endpoints in interpolations where the offset is the same for both ends. BUG=600248 Committed: https://crrev.com/aa5bd02c9b5ffebfbd942512534b7e10aba8a821 Cr-Commit-Position: refs/heads/master@{#391464}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Remove unneeded 0<offset<1 case for equal offsets #

Total comments: 3

Patch Set 3 : Rewrite loop over keyframes #

Total comments: 6

Patch Set 4 : Response to review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -20 lines) Patch
D third_party/WebKit/LayoutTests/imported/web-platform-tests/web-animations/keyframe-effect/keyframe-handling-expected.txt View 1 chunk +0 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/animation/InterpolationEffect.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp View 1 2 3 2 chunks +33 lines, -12 lines 0 comments Download

Messages

Total messages: 27 (7 generated)
suzyh_UTC10 (ex-contributor)
4 years, 7 months ago (2016-05-02 07:18:31 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1942703002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1942703002/1
4 years, 7 months ago (2016-05-02 07:18:57 UTC) #4
alancutter (OOO until 2018)
https://codereview.chromium.org/1942703002/diff/1/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp File third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp (right): https://codereview.chromium.org/1942703002/diff/1/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp#newcode218 third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp:218: } else { Can this be "else if (offset ...
4 years, 7 months ago (2016-05-02 07:35:35 UTC) #5
suzyh_UTC10 (ex-contributor)
https://codereview.chromium.org/1942703002/diff/1/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp File third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp (right): https://codereview.chromium.org/1942703002/diff/1/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp#newcode218 third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp:218: } else { On 2016/05/02 at 07:35:35, alancutter wrote: ...
4 years, 7 months ago (2016-05-02 08:34:10 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-02 08:38:59 UTC) #8
alancutter (OOO until 2018)
On 2016/05/02 at 08:34:10, suzyh wrote: > https://codereview.chromium.org/1942703002/diff/1/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp > File third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp (right): > > https://codereview.chromium.org/1942703002/diff/1/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp#newcode218 ...
4 years, 7 months ago (2016-05-03 01:29:00 UTC) #9
suzyh_UTC10 (ex-contributor)
On 2016/05/03 at 01:29:00, alancutter wrote: > On 2016/05/02 at 08:34:10, suzyh wrote: > > ...
4 years, 7 months ago (2016-05-04 01:24:13 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1942703002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1942703002/20001
4 years, 7 months ago (2016-05-04 01:25:12 UTC) #12
alancutter (OOO until 2018)
lgtm
4 years, 7 months ago (2016-05-04 01:30:33 UTC) #13
alancutter (OOO until 2018)
https://codereview.chromium.org/1942703002/diff/20001/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp File third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp (right): https://codereview.chromium.org/1942703002/diff/20001/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp#newcode217 third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp:217: // - 0 < offset < 1, never used ...
4 years, 7 months ago (2016-05-04 01:32:31 UTC) #14
alancutter (OOO until 2018)
https://codereview.chromium.org/1942703002/diff/20001/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp File third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp (right): https://codereview.chromium.org/1942703002/diff/20001/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp#newcode217 third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp:217: // - 0 < offset < 1, never used ...
4 years, 7 months ago (2016-05-04 01:35:32 UTC) #15
suzyh_UTC10 (ex-contributor)
https://codereview.chromium.org/1942703002/diff/20001/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp File third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp (right): https://codereview.chromium.org/1942703002/diff/20001/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp#newcode217 third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp:217: // - 0 < offset < 1, never used ...
4 years, 7 months ago (2016-05-04 01:41:00 UTC) #16
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-04 02:34:17 UTC) #18
suzyh_UTC10 (ex-contributor)
On 2016/05/04 at 01:41:00, suzyh wrote: > https://codereview.chromium.org/1942703002/diff/20001/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp > File third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp (right): > > https://codereview.chromium.org/1942703002/diff/20001/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp#newcode217 ...
4 years, 7 months ago (2016-05-04 05:22:56 UTC) #19
alancutter (OOO until 2018)
I think this is a good improvement. I'm happy to see those ternaries go, this ...
4 years, 7 months ago (2016-05-04 07:00:04 UTC) #20
suzyh_UTC10 (ex-contributor)
https://codereview.chromium.org/1942703002/diff/40001/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp File third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp (right): https://codereview.chromium.org/1942703002/diff/40001/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp#newcode210 third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp:210: size_t startKeyframe = i; On 2016/05/04 at 07:00:03, alancutter ...
4 years, 7 months ago (2016-05-04 07:15:32 UTC) #21
alancutter (OOO until 2018)
lgtm
4 years, 7 months ago (2016-05-04 07:16:21 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1942703002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1942703002/60001
4 years, 7 months ago (2016-05-04 07:18:53 UTC) #24
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 7 months ago (2016-05-04 09:01:00 UTC) #25
commit-bot: I haz the power
4 years, 7 months ago (2016-05-04 09:02:29 UTC) #27
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/aa5bd02c9b5ffebfbd942512534b7e10aba8a821
Cr-Commit-Position: refs/heads/master@{#391464}

Powered by Google App Engine
This is Rietveld 408576698