-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
browser(webkit): let web page close when it has open context menu (#2802
) Review URL: aslushnikov/WebKit@42f86e9 Currently, if web page has an open context menu, then it won't close. This prevents browser from quitting. In stock safari, this behavior can also be observed in a way that context menu will stay opened even if related page got closed. While investigating this behavior on Mac, a crucial observation was that `[NSMenu popUpContextMenu]` is spawning a nested event loop, keeping reference to `WebContextMenuProxyMac` instance, which in turn keeps references on associated `NSView` with `WKWebView`. To exit the loop, we need to explicitly cancel context menu. For this, this patch adds a method `hide` on `WebContextMenuProxy` that uses port-specific code to cancel context menu. Windows part of this patch is somewhat speculative: I didn't check it, but given the same symptomps, I applied the same solution. Fixes #2700
- Loading branch information
1 parent
c188118
commit 14162f8
Showing
2 changed files
with
93 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1296 | ||
1297 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters