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

Unified Diff: chrome/browser/ui/cocoa/certificate_viewer_mac_cocoa.mm

Issue 2562653002: Mac: Fix window ordering for certificate viewer/selector sheets and overlays.
Patch Set: Switch to reordering the child window array instead of setting the window level manually. Created 4 years 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/certificate_viewer_mac_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/certificate_viewer_mac_cocoa.mm b/chrome/browser/ui/cocoa/certificate_viewer_mac_cocoa.mm
index 9fbc903727036debed4d069b0fd2de5d3dfab630..8ed1e1c5a8d254bc832fc2c548e9f5bb02b0897d 100644
--- a/chrome/browser/ui/cocoa/certificate_viewer_mac_cocoa.mm
+++ b/chrome/browser/ui/cocoa/certificate_viewer_mac_cocoa.mm
@@ -107,6 +107,13 @@ class SSLCertificateViewerCocoaBridge : public ConstrainedWindowMacDelegate {
[[sheetWindow contentView] setAutoresizesSubviews:oldResizesSubviews_];
[[overlayWindow_ attachedSheet] setAlphaValue:1.0];
+
+ // Reorder child windows so the currently showing sheet/overlay is on top.
+ NSWindow* parent = [overlayWindow_ parentWindow];
+ [parent removeChildWindow:overlayWindow_];
+ [parent addChildWindow:overlayWindow_ ordered:NSWindowAbove];
+ [overlayWindow_ removeChildWindow:sheetWindow];
+ [overlayWindow_ addChildWindow:sheetWindow ordered:NSWindowAbove];
}
- (void)pulseSheet {
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698