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

Unified Diff: ui/aura/window.cc

Issue 241983003: Stops animations when removing a window from its parent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Stops animations when removing a window from its parent (comment) Created 6 years, 8 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
« no previous file with comments | « no previous file | ui/aura/window_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « no previous file | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698