Trying to lookup when WebView is in a popover causes process to hang.
Created attachment 405210 [details] Patch
Comment on attachment 405210 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405210&action=review > Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm:355 > + if (!(((webView.get().window._childWindowOrderingPriority == NSWindowChildOrderingPriorityPopover) || [NSUserDefaults.standardUserDefaults boolForKey:@"LULookupDisabled"]) && items[i].action() == ContextMenuItemTagLookUpInDictionary)) Can we move the `((webView.get().window._childWindowOrderingPriority == NSWindowChildOrderingPriorityPopover) || [NSUserDefaults.standardUserDefaults boolForKey:@"LULookupDisabled"])` to a variable outside this loop so that it doesn't have to be recalculated in each iteration? ``` bool isPopover = m_webView->get().window._childWindowOrderingPriority == NSWindowChildOrderingPriorityPopover; bool isLookupDisabled = [NSUserDefaults.standardUserDefaults boolForKey:@"LULookupDisabled"]; for (auto& item : items) { if (item.action() != ContextMenuItemTagLookUpInDictionary || (!isLookupDisabled && !isPopover)) filteredItems.uncheckedAppend(item); } ```
Comment on attachment 405210 [details] Patch It looks like you’ll need to add NSWindowChildOrderingPriorityPopover to NSWindowSPI.h as well.
Created attachment 405276 [details] Patch
Comment on attachment 405276 [details] Patch r=me
Committed r264928: <https://trac.webkit.org/changeset/264928> All reviewed patches have been landed. Closing bug and clearing flags on attachment 405276 [details].
<rdar://problem/66168314>