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

Issue 190763007: [WIP] Web Animations API: Constructing an Animation from partial keyframes throws a JS exception (Closed)

Created:
6 years, 9 months ago by rjwright
Modified:
6 years, 9 months ago
Reviewers:
dstockwell, shans
CC:
blink-reviews, alancutter (OOO until 2018), Mike Lawther (Google), dstockwell, Timothy Loh, Inactive, darktears, arv+blink, Steve Block, dino_apple.com, watchdog-blink-watchlist_google.com, Eric Willigers
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

[WIP] Web Animations API: Constructing an Animation from partial keyframes throws a JavaScript exception If a list of keyframes includes just one declaration for a particular property it is called a partial keyframe. Web Animations doesn't support Animations with partial keyframes yet. Previously if a user tried to do this it would crash the renderer. There is an assert for it in StyleResolver::applyAnimatedProperties. This change checks for mismatched property declarations in keyframe data after it has been parsed, and throws a JavaScript NotSupportedError exception if it finds any. It has to be done after parsing otherwise declarations with invalid values can interfere.

Patch Set 1 #

Total comments: 3

Patch Set 2 : Check for missing keyframes at 0 and 1 when offsets are specified #

Patch Set 3 : Remove duplicate layout test cases from element-animate-list-of-keyframes #

Patch Set 4 : Add FIXME for keyframes at 0 and 1. #

Total comments: 1

Patch Set 5 : Replace manual checks with check for dependsOnUnderlyingValue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+204 lines, -56 lines) Patch
M LayoutTests/web-animations-api/animation-constructor.html View 1 2 3 4 1 chunk +63 lines, -15 lines 0 comments Download
D LayoutTests/web-animations-api/element-animate-list-of-keyframes-expected.txt View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/animation/Animation.h View 2 chunks +5 lines, -4 lines 0 comments Download
M Source/core/animation/Animation.cpp View 2 chunks +7 lines, -6 lines 0 comments Download
M Source/core/animation/Animation.idl View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/animation/AnimationTest.cpp View 1 2 3 4 10 chunks +96 lines, -13 lines 0 comments Download
M Source/core/animation/EffectInput.h View 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/animation/EffectInput.cpp View 1 2 3 4 2 chunks +6 lines, -2 lines 0 comments Download
M Source/core/animation/ElementAnimation.h View 1 chunk +6 lines, -6 lines 0 comments Download
M Source/core/animation/ElementAnimation.idl View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/animation/KeyframeEffectModel.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/animation/KeyframeEffectModel.cpp View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
rjwright
ptal
6 years, 9 months ago (2014-03-10 05:31:12 UTC) #1
rjwright
I just discovered that because of the version of MutableStylePropertySet::setProperty() that we use, mixing shorthand ...
6 years, 9 months ago (2014-03-10 05:56:35 UTC) #2
rjwright
On 2014/03/10 05:56:35, rjwright wrote: > I just discovered that because of the version of ...
6 years, 9 months ago (2014-03-10 07:09:23 UTC) #3
shans
https://codereview.chromium.org/190763007/diff/1/Source/core/animation/EffectInput.cpp File Source/core/animation/EffectInput.cpp (right): https://codereview.chromium.org/190763007/diff/1/Source/core/animation/EffectInput.cpp#newcode65 Source/core/animation/EffectInput.cpp:65: } This won't pick up cases like: element.animate( [{opacity: ...
6 years, 9 months ago (2014-03-10 23:28:40 UTC) #4
rjwright
https://codereview.chromium.org/190763007/diff/1/Source/core/animation/EffectInput.cpp File Source/core/animation/EffectInput.cpp (right): https://codereview.chromium.org/190763007/diff/1/Source/core/animation/EffectInput.cpp#newcode65 Source/core/animation/EffectInput.cpp:65: } On 2014/03/10 23:28:40, shans wrote: > This won't ...
6 years, 9 months ago (2014-03-10 23:35:36 UTC) #5
rjwright
https://codereview.chromium.org/190763007/diff/1/Source/core/animation/EffectInput.cpp File Source/core/animation/EffectInput.cpp (right): https://codereview.chromium.org/190763007/diff/1/Source/core/animation/EffectInput.cpp#newcode65 Source/core/animation/EffectInput.cpp:65: } On 2014/03/10 23:28:40, shans wrote: > This won't ...
6 years, 9 months ago (2014-03-11 01:48:42 UTC) #6
rjwright
Note also that hasMismatchedKeyframeProperty will absorbed into the body of EffectInput::convert in an immediate follow-up ...
6 years, 9 months ago (2014-03-11 02:22:24 UTC) #7
shans
On 2014/03/11 02:22:24, rjwright wrote: > Note also that hasMismatchedKeyframeProperty will absorbed into the body ...
6 years, 9 months ago (2014-03-11 03:00:28 UTC) #8
rjwright1
Offsets requirements are move complicated than I initially thought. On Tue, Mar 11, 2014 at ...
6 years, 9 months ago (2014-03-11 03:12:22 UTC) #9
dstockwell
https://codereview.chromium.org/190763007/diff/60001/Source/core/animation/EffectInput.cpp File Source/core/animation/EffectInput.cpp (right): https://codereview.chromium.org/190763007/diff/60001/Source/core/animation/EffectInput.cpp#newcode51 Source/core/animation/EffectInput.cpp:51: static bool hasMismatchedKeyframeProperty(Vector<RefPtr<MutableStylePropertySet> > propertySetVector) Instead of doing the ...
6 years, 9 months ago (2014-03-11 03:28:13 UTC) #10
rjwright
On 2014/03/11 03:28:13, dstockwell wrote: > https://codereview.chromium.org/190763007/diff/60001/Source/core/animation/EffectInput.cpp > File Source/core/animation/EffectInput.cpp (right): > > https://codereview.chromium.org/190763007/diff/60001/Source/core/animation/EffectInput.cpp#newcode51 > ...
6 years, 9 months ago (2014-03-11 03:37:40 UTC) #11
rjwright
This is now a WIP. I'm not 100% sure if this correct, as I don't ...
6 years, 9 months ago (2014-03-12 06:25:26 UTC) #12
rjwright
6 years, 9 months ago (2014-03-19 07:40:30 UTC) #13
Moved to https://codereview.chromium.org/196053009 after totally changing the
approach & several rebases.

Powered by Google App Engine
This is Rietveld 408576698