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

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

Issue 2944423003: Implement new AnimationTimeline superclass (Closed)
Patch Set: Rebase Created 3 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/core/animation/SuperAnimationTimeline.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1edfcc7adbdecfbc4a42c35f9c2e57310e229503..df097aed76a9cab96592446bc805c3105af84987 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp
@@ -245,7 +245,7 @@ Response InspectorAnimationAgent::getCurrentTime(const String& id,
} else {
// Use startTime where possible since currentTime is limited.
*current_time =
- animation->timeline()->currentTime() - animation->startTime();
+ animation->TimelineInternal()->currentTime() - animation->startTime();
}
return Response::OK();
}
@@ -265,7 +265,7 @@ Response InspectorAnimationAgent::setPaused(
if (paused && !clone->Paused()) {
// Ensure we restore a current time if the animation is limited.
double current_time =
- clone->timeline()->currentTime() - clone->startTime();
+ clone->TimelineInternal()->currentTime() - clone->startTime();
clone->pause();
clone->setCurrentTime(current_time, false);
} else if (!paused && clone->Paused()) {
@@ -554,12 +554,13 @@ AnimationTimeline& InspectorAnimationAgent::ReferenceTimeline() {
double InspectorAnimationAgent::NormalizedStartTime(
blink::Animation& animation) {
- if (ReferenceTimeline().PlaybackRate() == 0)
+ if (ReferenceTimeline().PlaybackRate() == 0) {
return animation.startTime() + ReferenceTimeline().currentTime() -
- animation.timeline()->currentTime();
- return animation.startTime() +
- (animation.timeline()->ZeroTime() - ReferenceTimeline().ZeroTime()) *
- 1000 * ReferenceTimeline().PlaybackRate();
+ animation.TimelineInternal()->currentTime();
+ }
+ return animation.startTime() + (animation.TimelineInternal()->ZeroTime() -
+ ReferenceTimeline().ZeroTime()) *
+ 1000 * ReferenceTimeline().PlaybackRate();
}
DEFINE_TRACE(InspectorAnimationAgent) {
« no previous file with comments | « third_party/WebKit/Source/core/animation/SuperAnimationTimeline.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698