From ea3f5cf79a8e5d9cd9825bcbc71d448534350135 Mon Sep 17 00:00:00 2001 From: "glen@chromium.org" Date: Wed, 29 Oct 2008 22:55:35 +0000 Subject: Fix throb animation - a change to Animation::Start meant that Run() in a derived class was never being called. Throb animation depended on this. BUG=3516 Review URL: http://codereview.chromium.org/8896 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4181 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/animation.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'chrome/common/animation.cc') diff --git a/chrome/common/animation.cc b/chrome/common/animation.cc index bf69812..315f9f5 100644 --- a/chrome/common/animation.cc +++ b/chrome/common/animation.cc @@ -97,7 +97,7 @@ void Animation::SetDuration(int duration) { current_iteration_ = 0; } -void Animation::Run() { +void Animation::Step() { state_ = static_cast(++current_iteration_) / iteration_count_; if (state_ >= 1.0) @@ -111,6 +111,10 @@ void Animation::Run() { Stop(); } +void Animation::Run() { + Step(); +} + int Animation::CalculateInterval(int frame_rate) { int timer_interval = 1000 / frame_rate; if (timer_interval < 10) -- cgit v1.1