-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PDF context menu should be shown asynchronously
https://bugs.webkit.org/show_bug.cgi?id=268973 rdar://122525514 Reviewed by Simon Fraser. WebPageProxy::ShowPDFContextMenu is a sync IPC call that blocks the WP. Among other things, this manifests itself in repaint requests queued right before the IPC call to be fulfilled only _after_ a context menu action has been taken. There is no reason for this synchronicity, so this patch async-ifies WebPageProxy::ShowPDFContextMenu, which we call with sendWithAsyncReply to learn about the context menu item selected by the user. We also make some drive-by fixes such as avoiding blindly casting integral values from the UIP into ContextMenuItemTag and moving some function definitions around so we can annotate function groups with `#pragma mark`. * Source/WebKit/UIProcess/WebPageProxy.messages.in: * Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::handleContextMenuEvent): * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h: * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm: (WebKit::UnifiedPDFPlugin::handleMouseEvent): (WebKit::UnifiedPDFPlugin::handleMouseEnterEvent): (WebKit::UnifiedPDFPlugin::handleMouseLeaveEvent): (WebKit::UnifiedPDFPlugin::handleContextMenuEvent): (WebKit::UnifiedPDFPlugin::contextMenuItemTagFromDisplayMode const): (WebKit::UnifiedPDFPlugin::displayModeFromContextMenuItemTag const): (WebKit::UnifiedPDFPlugin::performContextMenuAction): Canonical link: https://commits.webkit.org/274320@main
- Loading branch information
Showing
4 changed files
with
69 additions
and
40 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
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
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
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