Chromium Code Reviews| 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) |