summaryrefslogtreecommitdiffstats
path: root/views/animation/bounds_animator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/animation/bounds_animator.cc')
-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;