Chromium Code Reviews| Index: ui/views/widget/native_widget_mac.mm |
| diff --git a/ui/views/widget/native_widget_mac.mm b/ui/views/widget/native_widget_mac.mm |
| index 28bc1da2d126c3014da169c90542c73a5ee476d9..34655c80fbb1813257fd550f76fe59328f003ff8 100644 |
| --- a/ui/views/widget/native_widget_mac.mm |
| +++ b/ui/views/widget/native_widget_mac.mm |
| @@ -689,8 +689,14 @@ void NativeWidgetPrivate::GetAllChildWidgets(gfx::NativeView native_view, |
| Widget::Widgets* children) { |
| BridgedNativeWidget* bridge = |
| NativeWidgetMac::GetBridgeForNativeWindow([native_view window]); |
| - if (!bridge) |
| + if (!bridge) { |
| + // The NSWindow is not itself a views::Widget, but it may have children that |
| + // are. Note we assume we don't care about children of Widgets that are not |
| + // themselves a Widget (those are skipped by this logic). |
|
karandeepb
2016/11/29 05:28:42
It's not clear to me what this comment means- "Not
tapted
2016/11/29 05:51:42
Moved it down to the other for loop and reworded.
karandeepb
2016/11/29 06:00:20
Acknowledged.
|
| + for (NSWindow* native_child in [[native_view window] childWindows]) |
| + GetAllChildWidgets([native_child contentView], children); |
| return; |
| + } |
| // If |native_view| is a subview of the contentView, it will share an |
| // NSWindow, but will itself be a native child of the Widget. That is, adding |