Preview is sometimes dismissed too early
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Nov 2014 00:47:40 +0000 (00:47 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Nov 2014 00:47:40 +0000 (00:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=138811
-and corresponding-
rdar://problem/18900839

Reviewed by Tim Horton.

Don’t make the popover transient until didCloseMenu: time.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController didCloseMenu:withEvent:]):
(-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176237 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/mac/WKActionMenuController.mm

index 02d5987..cffc97f 100644 (file)
@@ -1,3 +1,17 @@
+2014-11-17  Beth Dakin  <bdakin@apple.com>
+
+        Preview is sometimes dismissed too early
+        https://bugs.webkit.org/show_bug.cgi?id=138811
+        -and corresponding-
+        rdar://problem/18900839
+
+        Reviewed by Tim Horton.
+
+        Don’t make the popover transient until didCloseMenu: time.
+        * UIProcess/mac/WKActionMenuController.mm:
+        (-[WKActionMenuController didCloseMenu:withEvent:]):
+        (-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
+
 2014-11-17  Daniel Bates  <dabates@apple.com>
 
         Unreviewed, rolling out r176232.
index ea4620a..78c687b 100644 (file)
@@ -231,6 +231,7 @@ using namespace WebKit;
             [getDDActionsManagerClass() didUseActions];
     }
 
+    [_previewPopover setBehavior:NSPopoverBehaviorTransient];
     if (!_shouldKeepPreviewPopoverOpen)
         [self _clearPreviewPopover];
 
@@ -338,7 +339,7 @@ using namespace WebKit;
     _previewViewController->_delegate = self;
 
     _previewPopover = adoptNS([[NSPopover alloc] init]);
-    [_previewPopover setBehavior:NSPopoverBehaviorTransient];
+    [_previewPopover setBehavior:NSPopoverBehaviorApplicationDefined];
     [_previewPopover setContentSize:popoverSize];
     [_previewPopover setContentViewController:_previewViewController.get()];
     [_previewPopover setDelegate:self];