summaryrefslogtreecommitdiffstats
path: root/views/animation
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-03 23:54:07 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-03 23:54:07 +0000
commit28a2912d9aeba1a743af7fabe883ad514f12503e (patch)
tree156784bfbb3ad68404ffcc403c491a0b8f73f999 /views/animation
parenta28a4111d65e74afd46a8873ff346225cf0c028a (diff)
downloadchromium_src-28a2912d9aeba1a743af7fabe883ad514f12503e.zip
chromium_src-28a2912d9aeba1a743af7fabe883ad514f12503e.tar.gz
chromium_src-28a2912d9aeba1a743af7fabe883ad514f12503e.tar.bz2
Changes tab strip to use BoundsAnimator for tab strip animations and
adds a new animation when inserting a tab. I've changed the code to make it clear when an index is in terms of the model, and when it is in terms of tab_data_. I may replace using an index for tab data with an actual int wrapper class to avoid mistakes, but I'll do that separately. BUG=27783 TEST=thorougly test all animations in the tab strip, as well as dragging tabs in an out. Review URL: http://codereview.chromium.org/1553008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43582 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/animation')
-rw-r--r--views/animation/bounds_animator.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/views/animation/bounds_animator.cc b/views/animation/bounds_animator.cc
index 6dbd105..3a88242 100644
--- a/views/animation/bounds_animator.cc
+++ b/views/animation/bounds_animator.cc
@@ -44,13 +44,13 @@ void BoundsAnimator::AnimateViewTo(View* view,
// We delay deleting the view until the end so that we don't prematurely
// send out notification that we're done.
current_animation.reset(ResetAnimationForView(view));
- } else if (target == view->bounds()) {
- // View is already at the target location, delete it if necessary.
- if (delete_when_done)
- delete view;
- return;
}
+ // NOTE: we don't check if the view is already at the target location. Doing
+ // so leads to odd cases where no animations may be present after invoking
+ // AnimateViewTo. AnimationProgressed does nothing when the bounds of the
+ // view don't change.
+
Data& data = data_[view];
data.start_bounds = view->bounds();
data.target_bounds = target;