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

Issue 251463003: Web Animations API: Sort keyframes by offset (Closed)

Created:
6 years, 8 months ago by Eric Willigers
Modified:
6 years, 7 months ago
CC:
blink-reviews, shans, rjwright, Mike Lawther (Google), Timothy Loh, darktears, Steve Block, dino_apple.com, Eric Willigers
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Web Animations API: Sort keyframes by offset Due to a recent spec change, we must now sort the keyframes if they are not loosely sorted by offset, and all keyframes have a supplied offset. If they are not loosely sorted, and any do not have a supplied offset, we must throw a DOMException of type InvalidModificationError. https://dvcs.w3.org/hg/FXTF/diff/b5b53c344189/web-animations/index.html BUG=363569

Patch Set 1 #

Total comments: 1

Patch Set 2 : move Keyframe::compareOffsets out of KeyframeEffectModel.cpp #

Total comments: 4

Patch Set 3 : Use simpler values in layout test #

Total comments: 4

Patch Set 4 : Detect null offset #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -10 lines) Patch
M LayoutTests/web-animations-api/element-animate-list-of-keyframes.html View 1 2 3 1 chunk +52 lines, -0 lines 1 comment Download
M Source/core/animation/EffectInput.cpp View 1 2 3 3 chunks +32 lines, -4 lines 2 comments Download
A Source/core/animation/EffectInputTest.cpp View 1 chunk +125 lines, -0 lines 0 comments Download
M Source/core/animation/Keyframe.h View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download
M Source/core/animation/KeyframeEffectModel.cpp View 1 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Eric Willigers
https://codereview.chromium.org/251463003/diff/1/Source/core/animation/ElementAnimation.h File Source/core/animation/ElementAnimation.h (left): https://codereview.chromium.org/251463003/diff/1/Source/core/animation/ElementAnimation.h#oldcode64 Source/core/animation/ElementAnimation.h:64: return animateInternal(element, EffectInput::convert(&element, keyframeDictionaryVector, exceptionState), TimingInput::convert(timingInputDictionary)); The changes in ...
6 years, 8 months ago (2014-04-24 06:54:39 UTC) #1
Eric Willigers
+dstockwell
6 years, 7 months ago (2014-04-28 06:50:01 UTC) #2
alancutter (OOO until 2018)
lgtm https://codereview.chromium.org/251463003/diff/20001/LayoutTests/web-animations-api/element-animate-list-of-keyframes.html File LayoutTests/web-animations-api/element-animate-list-of-keyframes.html (right): https://codereview.chromium.org/251463003/diff/20001/LayoutTests/web-animations-api/element-animate-list-of-keyframes.html#newcode61 LayoutTests/web-animations-api/element-animate-list-of-keyframes.html:61: assert_equals(e1Style.opacity, '0.875'); It's not very easy to tell ...
6 years, 7 months ago (2014-04-28 10:53:45 UTC) #3
Eric Willigers
https://codereview.chromium.org/251463003/diff/20001/LayoutTests/web-animations-api/element-animate-list-of-keyframes.html File LayoutTests/web-animations-api/element-animate-list-of-keyframes.html (right): https://codereview.chromium.org/251463003/diff/20001/LayoutTests/web-animations-api/element-animate-list-of-keyframes.html#newcode61 LayoutTests/web-animations-api/element-animate-list-of-keyframes.html:61: assert_equals(e1Style.opacity, '0.875'); On 2014/04/28 10:53:46, alancutter wrote: > It's ...
6 years, 7 months ago (2014-04-29 00:14:48 UTC) #4
dstockwell
https://codereview.chromium.org/251463003/diff/40001/LayoutTests/web-animations-api/element-animate-list-of-keyframes.html File LayoutTests/web-animations-api/element-animate-list-of-keyframes.html (right): https://codereview.chromium.org/251463003/diff/40001/LayoutTests/web-animations-api/element-animate-list-of-keyframes.html#newcode66 LayoutTests/web-animations-api/element-animate-list-of-keyframes.html:66: {opacity: '0.5'}, Do we have a test where offset ...
6 years, 7 months ago (2014-04-29 03:58:42 UTC) #5
Eric Willigers
https://codereview.chromium.org/251463003/diff/40001/LayoutTests/web-animations-api/element-animate-list-of-keyframes.html File LayoutTests/web-animations-api/element-animate-list-of-keyframes.html (right): https://codereview.chromium.org/251463003/diff/40001/LayoutTests/web-animations-api/element-animate-list-of-keyframes.html#newcode66 LayoutTests/web-animations-api/element-animate-list-of-keyframes.html:66: {opacity: '0.5'}, On 2014/04/29 03:58:43, dstockwell wrote: > Do ...
6 years, 7 months ago (2014-04-29 07:34:44 UTC) #6
alancutter (OOO until 2018)
lgtm new changes with nit. https://codereview.chromium.org/251463003/diff/60001/LayoutTests/web-animations-api/element-animate-list-of-keyframes.html File LayoutTests/web-animations-api/element-animate-list-of-keyframes.html (right): https://codereview.chromium.org/251463003/diff/60001/LayoutTests/web-animations-api/element-animate-list-of-keyframes.html#newcode83 LayoutTests/web-animations-api/element-animate-list-of-keyframes.html:83: player.currentTime = durationValue / ...
6 years, 7 months ago (2014-04-29 07:58:43 UTC) #7
dstockwell
+haraken, please take a look at inline comment https://codereview.chromium.org/251463003/diff/60001/Source/core/animation/EffectInput.cpp File Source/core/animation/EffectInput.cpp (right): https://codereview.chromium.org/251463003/diff/60001/Source/core/animation/EffectInput.cpp#newcode71 Source/core/animation/EffectInput.cpp:71: v8::Local<v8::Value> ...
6 years, 7 months ago (2014-04-29 08:11:47 UTC) #8
haraken
https://codereview.chromium.org/251463003/diff/60001/Source/core/animation/EffectInput.cpp File Source/core/animation/EffectInput.cpp (right): https://codereview.chromium.org/251463003/diff/60001/Source/core/animation/EffectInput.cpp#newcode71 Source/core/animation/EffectInput.cpp:71: v8::Local<v8::Value> v8Value; On 2014/04/29 08:11:47, dstockwell wrote: > v8::Local ...
6 years, 7 months ago (2014-04-29 08:16:19 UTC) #9
dstockwell
On 2014/04/29 08:16:19, haraken wrote: > https://codereview.chromium.org/251463003/diff/60001/Source/core/animation/EffectInput.cpp > File Source/core/animation/EffectInput.cpp (right): > > https://codereview.chromium.org/251463003/diff/60001/Source/core/animation/EffectInput.cpp#newcode71 > ...
6 years, 7 months ago (2014-04-29 08:40:12 UTC) #10
alancutter (OOO until 2018)
6 years, 7 months ago (2014-04-29 09:45:47 UTC) #11
On 2014/04/29 08:40:12, dstockwell wrote:
> On 2014/04/29 08:16:19, haraken wrote:
> >
>
https://codereview.chromium.org/251463003/diff/60001/Source/core/animation/Ef...
> > File Source/core/animation/EffectInput.cpp (right):
> > 
> >
>
https://codereview.chromium.org/251463003/diff/60001/Source/core/animation/Ef...
> > Source/core/animation/EffectInput.cpp:71: v8::Local<v8::Value> v8Value;
> > On 2014/04/29 08:11:47, dstockwell wrote:
> > > v8::Local is not usually used in core/ code, +haraken, is there a better
way
> > to
> > > do this?
> > > 
> > > Basically we want to ignore if the value === null, otherwise coerce to
> double.
> > 
> > Can we use ScriptValue?
> 
> Looks like that could work:
> get as double, if 0, get again as script value then check isNull.
> 
> Although I see "Don't use this in performance-sensitive places". This is
> probably OK, as in the common case the value is not present in the dictionary
at
> all.

Created a fork of this patch while Eric is away to fix these issues:
https://codereview.chromium.org/253093002/

Powered by Google App Engine
This is Rietveld 408576698