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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp

Issue 1906463002: Web Animations: Throw TypeErrors for invalid timing parameters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests 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/inspector/InspectorAnimationAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp
index ae0d0accc2aa5c2914d32ec91cf78a6f11908e90..6a3ecbd6c720d41edb6b26d1ea07311d490207f1 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp
@@ -333,6 +333,7 @@ void InspectorAnimationAgent::setTiming(ErrorString* errorString, const String&
return;
animation = animationClone(animation);
+ NonThrowableExceptionState exceptionState;
String type = m_idToAnimationType.get(animationId);
if (type == AnimationType::CSSTransition) {
@@ -352,12 +353,12 @@ void InspectorAnimationAgent::setTiming(ErrorString* errorString, const String&
AnimationEffectTiming* timing = animation->effect()->timing();
UnrestrictedDoubleOrString unrestrictedDuration;
unrestrictedDuration.setUnrestrictedDouble(duration + delay);
- timing->setDuration(unrestrictedDuration);
+ timing->setDuration(unrestrictedDuration, exceptionState);
} else {
AnimationEffectTiming* timing = animation->effect()->timing();
UnrestrictedDoubleOrString unrestrictedDuration;
unrestrictedDuration.setUnrestrictedDouble(duration);
- timing->setDuration(unrestrictedDuration);
+ timing->setDuration(unrestrictedDuration, exceptionState);
timing->setDelay(delay);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMarqueeElement.js ('k') | third_party/WebKit/Source/core/style/DataEquivalency.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698