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

Unified Diff: ui/aura/window.cc

Issue 58343004: Allow stacking below windows with layers with NULL delegates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 9b8a6df255cf6837051dbad7e75f140cd2b7fadd..81b67f2fe1ac063442b72f9ea9a9b0e6890763ad 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -893,18 +893,16 @@ void Window::StackChildRelativeTo(Window* child,
// See tests WindowTest.StackingMadrigal and StackOverClosingTransient
// for an explanation of this.
while (final_target_i > 0 &&
- children_[final_target_i]->layer()->delegate() == NULL) {
+ children_[direction == STACK_ABOVE ? final_target_i :
+ final_target_i - 1]->layer()
flackr 2013/11/04 22:04:12 This change should make the check in 901 unnecessa
+ ->delegate() == NULL) {
--final_target_i;
}
- // Allow stacking immediately below a window with a NULL layer.
- if (direction == STACK_BELOW && target_i != final_target_i)
- direction = STACK_ABOVE;
-
Window* final_target = children_[final_target_i];
// If we couldn't find a valid target position, don't move anything.
- if (final_target->layer()->delegate() == NULL)
+ if (direction == STACK_ABOVE && final_target->layer()->delegate() == NULL)
return;
// Don't try to stack a child above itself.
« 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