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

Unified Diff: ui/aura/window.cc

Issue 15114002: Reorder the NativeViews attached to a view via kViewHostKey according to the position of the view (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
Index: ui/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index 90a8fed69cb5d9c921170bb663fe3874cd590db7..5160bf6c34fbd23f33c5f943d2a8fa9b325b5ba3 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -163,10 +163,10 @@ ui::Layer* Window::RecreateLayer() {
UpdateLayerName(name_);
layer_->SetFillsBoundsOpaquely(!transparent_);
- // Install new layer as a sibling of the old layer, stacked on top of it.
+ // Install new layer as a sibling of the old layer, stacked below it.
sky 2013/05/28 14:03:50 Document why it's important to stack below rather
pkotwicz 2013/05/28 15:15:00 This is actually a bad diff, this change is not pa
if (old_layer->parent()) {
old_layer->parent()->Add(layer_);
- old_layer->parent()->StackAbove(layer_, old_layer);
+ old_layer->parent()->StackBelow(layer_, old_layer);
}
// Migrate all the child layers over to the new layer. Copy the list because
// the items are removed during iteration.
@@ -340,6 +340,12 @@ void Window::StackChildAbove(Window* child, Window* target) {
StackChildRelativeTo(child, target, STACK_ABOVE);
}
+void Window::StackChildAtBottom(Window* child) {
+ if (children_.size() <= 1 || child == children_.front())
+ return; // At the bottom already.
+ StackChildBelow(child, children_.front());
+}
+
void Window::StackChildBelow(Window* child, Window* target) {
StackChildRelativeTo(child, target, STACK_BELOW);
}

Powered by Google App Engine
This is Rietveld 408576698