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

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

Issue 2379863003: Implement AnimationEffectTimingReadOnly interface (Closed)
Patch Set: Created 4 years, 3 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 51b86b76e65a547b6533bd0edc07ca10f4663db9..2532fc5f513e67f50d977db6b4b8e57a8a1fff2f 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp
@@ -343,12 +343,12 @@ void InspectorAnimationAgent::setTiming(ErrorString* errorString, const String&
newFrames[1]->setOffset(delay / (delay + duration));
model->setFrames(newFrames);
- AnimationEffectTiming* timing = animation->effect()->timing();
+ AnimationEffectTiming* timing = effect->timing();
UnrestrictedDoubleOrString unrestrictedDuration;
unrestrictedDuration.setUnrestrictedDouble(duration + delay);
timing->setDuration(unrestrictedDuration, exceptionState);
} else {
- AnimationEffectTiming* timing = animation->effect()->timing();
+ AnimationEffectTiming* timing = toKeyframeEffect(animation->effect())->timing();
alancutter (OOO until 2018) 2016/09/30 04:32:46 Non-nit: Downcast timing instead of effect object.
suzyh_UTC10 (ex-contributor) 2016/10/04 06:57:31 This will require defining the type casts for the
alancutter (OOO until 2018) 2016/10/04 11:59:19 Yes. I don't think this code should be assuming a
UnrestrictedDoubleOrString unrestrictedDuration;
unrestrictedDuration.setUnrestrictedDouble(duration);
timing->setDuration(unrestrictedDuration, exceptionState);

Powered by Google App Engine
This is Rietveld 408576698