Index: ui/aura/window.cc |
diff --git a/ui/aura/window.cc b/ui/aura/window.cc |
index 1b7ed4be09e14b4f7d35a9e26672592c3c9b16c1..450fb453c01f640a531173271c045572a0dddf48 100644 |
--- a/ui/aura/window.cc |
+++ b/ui/aura/window.cc |
@@ -30,7 +30,6 @@ |
#include "ui/compositor/compositor.h" |
#include "ui/compositor/layer.h" |
#include "ui/events/event_target_iterator.h" |
-#include "ui/gfx/animation/multi_animation.h" |
#include "ui/gfx/canvas.h" |
#include "ui/gfx/path.h" |
#include "ui/gfx/scoped_canvas.h" |
@@ -1016,6 +1015,10 @@ Window* Window::GetWindowForPoint(const gfx::Point& local_point, |
} |
void Window::RemoveChildImpl(Window* child, Window* new_parent) { |
+ // Stop (and complete) an ongoing animation to make sure bounds are updated |
+ // before updating the layers bounds again. |
+ if (child->layer() && child->layer()->GetAnimator()) |
+ child->layer()->GetAnimator()->StopAnimating(); |
Ben Goodger (Google)
2014/04/25 03:28:01
Is it possible to do this in the layer's RemoveChi
varkha
2014/04/25 04:41:45
Yes, it would make more sense. I'll explore it. Th
varkha
2014/04/25 07:13:12
Done.
|
if (layout_manager_) |
layout_manager_->OnWillRemoveWindowFromLayout(child); |
FOR_EACH_OBSERVER(WindowObserver, observers_, OnWillRemoveWindow(child)); |