[webkit-changes] [WebKit/WebKit] 230c08: [UnifiedPDF] Context menu should have a "copy" item
Abrar Rahman Protyasha
noreply at github.com
Mon Feb 12 19:39:04 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 230c082da552c659123fc483bf8282a85623a926
https://github.com/WebKit/WebKit/commit/230c082da552c659123fc483bf8282a85623a926
Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
Date: 2024-02-12 (Mon, 12 Feb 2024)
Changed paths:
M Source/WebCore/platform/LocalizedStrings.cpp
M Source/WebCore/platform/LocalizedStrings.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
Log Message:
-----------
[UnifiedPDF] Context menu should have a "copy" item
https://bugs.webkit.org/show_bug.cgi?id=269183
rdar://122777658
Reviewed by Sammy Gill.
This commit brings the UnifiedPDFPlugin context menu closer to parity
with the legacy plugin's context menu by implementing support for a
"copy" item.
This item is only made visible when the backing PDFDocument can be
copied from and when there is a non-nil selection, and simply delegates
the copy operation to performCopyEditingOperation(), since both the
editing command and the context menu item represent the same work.
* Source/WebCore/platform/LocalizedStrings.cpp:
(WebCore::contextMenuItemPDFCopy):
* Source/WebCore/platform/LocalizedStrings.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::createContextMenu const):
(WebKit::UnifiedPDFPlugin::performContextMenuAction):
Canonical link: https://commits.webkit.org/274515@main
More information about the webkit-changes
mailing list