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

Issue 8653005: Make Aura and compositor stacking methods more intuitive. (Closed)

Created:
9 years, 1 month ago by Daniel Erat
Modified:
9 years, 1 month ago
Reviewers:
sky
CC:
chromium-reviews, Ian Vollick, piman+watch_chromium.org, jonathan.backer, Paweł Hajdan Jr.
Visibility:
Public.

Description

Make Aura and compositor stacking methods more intuitive. aura::Window::StackChildAbove() and ui::Layer::StackAbove() stacked entity A directly above entity B... unless A was already somewhere above B in the stack, in which case they'd do nothing. I see the caveat as making these methods less useful, and I'm unable to think of any benefits from it, so this change makes the methods place A directly above B in all cases (possibly lowering A in the stacking order if it was previously far above B). This also fixes an issue in the Aura shell's shadow-stacking code where ShadowController could inadvertently raise a window to the top of the stacking order. BUG=101977 TEST=added Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=111264

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -26 lines) Patch
M ui/aura/window.cc View 1 chunk +6 lines, -7 lines 0 comments Download
M ui/aura/window_unittest.cc View 3 chunks +14 lines, -3 lines 0 comments Download
M ui/aura_shell/image_grid.h View 2 chunks +2 lines, -1 line 0 comments Download
M ui/aura_shell/shadow.h View 2 chunks +2 lines, -1 line 0 comments Download
M ui/aura_shell/shadow_controller.h View 2 chunks +3 lines, -2 lines 0 comments Download
M ui/aura_shell/shadow_controller_unittest.cc View 4 chunks +45 lines, -3 lines 2 comments Download
M ui/gfx/compositor/layer.h View 2 chunks +4 lines, -2 lines 0 comments Download
M ui/gfx/compositor/layer.cc View 1 chunk +8 lines, -7 lines 0 comments Download
M ui/gfx/compositor/layer_unittest.cc View 2 chunks +48 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Daniel Erat
9 years, 1 month ago (2011-11-22 22:19:58 UTC) #1
sky
LGTM http://codereview.chromium.org/8653005/diff/1/ui/aura_shell/shadow_controller_unittest.cc File ui/aura_shell/shadow_controller_unittest.cc (right): http://codereview.chromium.org/8653005/diff/1/ui/aura_shell/shadow_controller_unittest.cc#newcode14 ui/aura_shell/shadow_controller_unittest.cc:14: #include "ui/aura_shell/shadow_controller.h" nit: test files should have headers ...
9 years, 1 month ago (2011-11-22 22:44:54 UTC) #2
sky
I'm tempted to suggest moving the duplicated logic into a template function that both places ...
9 years, 1 month ago (2011-11-22 22:46:08 UTC) #3
Daniel Erat
9 years, 1 month ago (2011-11-22 22:58:42 UTC) #4
(as discussed in person, i was thinking of abstracting out the reordering code
too but couldn't come up with a good spot for it)

http://codereview.chromium.org/8653005/diff/1/ui/aura_shell/shadow_controller...
File ui/aura_shell/shadow_controller_unittest.cc (right):

http://codereview.chromium.org/8653005/diff/1/ui/aura_shell/shadow_controller...
ui/aura_shell/shadow_controller_unittest.cc:14: #include
"ui/aura_shell/shadow_controller.h"
On 2011/11/22 22:44:54, sky wrote:
> nit: test files should have headers organized like .cc files, so that this
> include should be first.

Done.

Powered by Google App Engine
This is Rietveld 408576698