Skip to content

Commit

Permalink
I missed that we don't need to set bounds on the children here either.
Browse files Browse the repository at this point in the history
BUG=none
TEST=none
R=yusukes@chromium.org


Review URL: https://chromiumcodereview.appspot.com/10916104

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154881 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
sky@chromium.org committed Sep 5, 2012
1 parent 6d8c388 commit 080f4fd
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions ash/wm/window_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,13 @@ void CenterWindow(aura::Window* window) {
}

ui::Layer* RecreateWindowLayers(aura::Window* window) {
const gfx::Rect bounds = window->bounds();
ui::Layer* old_layer = window->RecreateLayer();
DCHECK(old_layer);
for (aura::Window::Windows::const_iterator it = window->children().begin();
it != window->children().end();
++it) {
aura::Window* child = *it;
const gfx::Rect child_bounds = child->bounds();
ui::Layer* old_child_layer = RecreateWindowLayers(child);
// Maintain the hierarchy of the detached layers.
old_layer->Add(old_child_layer);
child->SetBounds(child_bounds); // Resize the child window too.
old_layer->Add(RecreateWindowLayers(*it));
}
return old_layer;
}
Expand Down

0 comments on commit 080f4fd

Please sign in to comment.