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

Unified Diff: third_party/WebKit/Source/core/animation/ElementAnimation.h

Issue 1851003002: Throw TypeError if easing string is invalid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/ElementAnimation.h
diff --git a/third_party/WebKit/Source/core/animation/ElementAnimation.h b/third_party/WebKit/Source/core/animation/ElementAnimation.h
index 1ad9e7d6f0a856ba56e3abb8f9d758d83f45510c..4932e8ebe0327f15ecc19acf3d066c14bbdb709b 100644
--- a/third_party/WebKit/Source/core/animation/ElementAnimation.h
+++ b/third_party/WebKit/Source/core/animation/ElementAnimation.h
@@ -55,16 +55,20 @@ public:
EffectModel* effect = EffectInput::convert(&element, effectInput, executionContext, exceptionState);
if (exceptionState.hadException())
return 0;
- return animateInternal(element, effect, TimingInput::convert(duration));
+ Timing timing;
+ ASSERT(TimingInput::convert(duration, timing));
alancutter (OOO until 2018) 2016/04/05 04:50:06 ASSERTs don't get compiled into official builds, y
suzyh_UTC10 (ex-contributor) 2016/04/12 08:04:23 Oooh, whoops. Good catch, fixed.
suzyh_UTC10 (ex-contributor) 2016/04/12 08:59:21 Hmmm, I'm getting a compile failure on chromeos_am
Timothy Loh 2016/04/12 13:21:12 DCHECK should work (previously this was called ASS
+ return animateInternal(element, effect, timing);
}
static Animation* animate(ExecutionContext* executionContext, Element& element, const EffectModelOrDictionarySequenceOrDictionary& effectInput, const KeyframeEffectOptions& options, ExceptionState& exceptionState)
{
EffectModel* effect = EffectInput::convert(&element, effectInput, executionContext, exceptionState);
- if (exceptionState.hadException())
+ Timing timing;
+ bool success = TimingInput::convert(options, timing, exceptionState);
+ if (!success || exceptionState.hadException())
return 0;
- Animation* animation = animateInternal(element, effect, TimingInput::convert(options));
+ Animation* animation = animateInternal(element, effect, timing);
animation->setId(options.id());
return animation;
}

Powered by Google App Engine
This is Rietveld 408576698