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

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 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..43f5976403ca0cc0227b2de0bcac372b3c0aef78 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,8 @@ Window* Window::GetWindowForPoint(const gfx::Point& local_point,
}
void Window::RemoveChildImpl(Window* child, Window* new_parent) {
+ if (child->layer() && child->layer()->GetAnimator())
sky 2014/04/24 16:06:19 Add a comment as to why we do this.
varkha 2014/04/24 18:47:18 Done.
+ child->layer()->GetAnimator()->StopAnimating();
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