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

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: 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 2591f79bbe7a802acddb68050c02bb21a86114ae..ec1f71328bd03718e02c6d700bcb23b21658ca0b 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;
suzyh_UTC10 (ex-contributor) 2016/04/20 21:54:12 I don't know the implications of this, so best to
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);
}
}

Powered by Google App Engine
This is Rietveld 408576698