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

Unified Diff: third_party/WebKit/Source/core/animation/AnimationTimeline.cpp

Issue 2952783002: Make AnimationTimeline.currentTime readonly (Closed)
Patch Set: Delete obsolete setCurrentTime* methods 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
Index: third_party/WebKit/Source/core/animation/AnimationTimeline.cpp
diff --git a/third_party/WebKit/Source/core/animation/AnimationTimeline.cpp b/third_party/WebKit/Source/core/animation/AnimationTimeline.cpp
index f5036c0551b350fee1d867517c9b5fecf42235e6..4258e9449a37dc1d2ee4375b1397269665e74c7d 100644
--- a/third_party/WebKit/Source/core/animation/AnimationTimeline.cpp
+++ b/third_party/WebKit/Source/core/animation/AnimationTimeline.cpp
@@ -222,29 +222,6 @@ double AnimationTimeline::CurrentTimeInternal() {
return CurrentTimeInternal(is_null);
}
-void AnimationTimeline::setCurrentTime(double current_time, bool is_null) {
- SetCurrentTimeInternal(current_time / 1000);
-}
-
-void AnimationTimeline::SetCurrentTimeInternal(double current_time) {
- if (!IsActive())
- return;
- zero_time_ = playback_rate_ == 0
- ? current_time
- : GetDocument()->GetAnimationClock().CurrentTime() -
- current_time / playback_rate_;
- zero_time_initialized_ = true;
-
- for (const auto& animation : animations_) {
- // The Player needs a timing update to pick up a new time.
- animation->SetOutdated();
- }
-
- // Any corresponding compositor animation will need to be restarted. Marking
- // the effect changed forces this.
- SetAllCompositorPending(true);
-}
-
double AnimationTimeline::EffectiveTime() {
double time = CurrentTimeInternal();
return std::isnan(time) ? 0 : time;

Powered by Google App Engine
This is Rietveld 408576698