playwright/browser_patches/webkit
Andrey Lushnikov 14162f8923
browser(webkit): let web page close when it has open context menu (#2802)
Review URL: 42f86e9d77

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
2020-07-01 18:12:11 -07:00
..
embedder/Playwright browser(webkit): support bypass list on Mac (#2479) 2020-06-04 21:01:38 -07:00
patches browser(webkit): let web page close when it has open context menu (#2802) 2020-07-01 18:12:11 -07:00
.gitignore Initial commit 2019-11-19 10:58:15 -08:00
archive.sh browser(webkit): exclude gstreamer, its plugins and libdrm from webkit distribution (#2541) 2020-06-19 10:24:19 -07:00
build.sh browser(webkit): simulate device orientation events (#1851) 2020-04-17 15:21:01 -07:00
BUILD_NUMBER browser(webkit): let web page close when it has open context menu (#2802) 2020-07-01 18:12:11 -07:00
buildwin.bat chore(webkit): add libvpx Windows build instructions (#2649) 2020-06-22 12:49:30 -07:00
cheatsheet.md docs(webkit): update core dump analisys instructions (#2778) 2020-06-30 17:00:16 -07:00
clean.sh chore(webkit): build wpe and gtk to different folders (#616) 2020-01-24 11:54:50 -08:00
concat_protocol.js Initial commit 2019-11-19 10:58:15 -08:00
download_gtk_and_wpe_and_zip_together.sh devops: report upload build size via TG notification 2020-01-17 16:56:04 -08:00
pw_run.sh browser(webkit): add injected bundle to webkit distribution on linux (#2461) 2020-06-03 17:49:57 -07:00
pw_run_debug.sh chore(webkit): build wpe and gtk to different folders (#616) 2020-01-24 11:54:50 -08:00
UPSTREAM_CONFIG.sh browser(webkit): roll to Tot 6/16/2020 (#2596) 2020-06-16 21:34:47 -07:00
upstream_status.md Update upstream_status.md 2020-06-17 23:23:51 -07:00