Chromium Code Reviews| Index: ui/views/cocoa/bridged_native_widget.mm |
| diff --git a/ui/views/cocoa/bridged_native_widget.mm b/ui/views/cocoa/bridged_native_widget.mm |
| index ce3731d026165eb42ef39e0b00bafe6953e2fcf9..7fdc5f342792acb8c9b9e3749c32f2965210b79d 100644 |
| --- a/ui/views/cocoa/bridged_native_widget.mm |
| +++ b/ui/views/cocoa/bridged_native_widget.mm |
| @@ -363,6 +363,8 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { |
| DCHECK(child_windows_.empty()); |
| SetFocusManager(nullptr); |
| SetRootView(nullptr); |
| + |
| + DCHECK(![window_ isVisible]); |
| DestroyCompositor(); |
| } |
| @@ -681,6 +683,11 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { |
| } |
| void BridgedNativeWidget::OnWindowWillClose() { |
| + // Hide the window before closing. This ensures that destroying the compositor |
| + // during the close does not cause a flash, which would be the case if the |
| + // window was still visible. |
| + SetVisibilityState(HIDE_WINDOW); |
|
karandeepb
2016/10/28 02:12:09
Is it possible that some animations may be in prog
tapted
2016/10/28 02:35:39
CompleteAllAnimations probably just sets the end s
karandeepb
2016/10/28 04:51:09
Yeah so I debugged a bit more. The reason the webc
tapted
2016/10/28 05:13:17
ccameron might have some further insight. I think
|
| + |
| native_widget_mac_->GetWidget()->OnNativeWidgetDestroying(); |
| // Ensure BridgedNativeWidget does not have capture, otherwise |