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

Unified Diff: ui/views/view.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/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 0e12e14f494eed0172f426d2ca2986b44a24d97f..076a44fb27d629fdd2a91bc4665d5b1584975eac 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -1439,11 +1439,15 @@ void View::ReorderLayers() {
while (v && !v->layer())
v = v->parent();
- // Forward to widget in case we're in a NativeWidgetAura.
- if (!v) {
- if (GetWidget())
+ if (GetWidget()) {
sky 2013/05/23 15:36:49 cache call to GetWidget
+ // If the widget has a view with an attached NativeView (eg NativeViewHost),
+ // the widget's layers must be reordered. The attached NativeView's layer is
+ // always parented to the widget's layer regardless of whether the host view
+ // has an ancestor view with a layer.
+ if (!v || GetWidget()->HasNativeViewAttachedToViewTree())
sky 2013/05/23 15:36:49 HasNativeViewAttachedToViewTree doesn't make sense
GetWidget()->ReorderLayers();
- } else {
+ }
+ if (v) {
for (Views::const_iterator i(v->children_.begin());
i != v->children_.end();
++i)
« no previous file with comments | « no previous file | ui/views/view_constants_aura.h » ('j') | ui/views/widget/native_widget_layer_reorderer_aura.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698