[webkit-changes] [WebKit/WebKit] cf3e6e: [UnifiedPDF] Selections should be extensible on sh...
Abrar Rahman Protyasha
noreply at github.com
Wed Feb 7 18:43:30 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cf3e6e92d5506c27f425e369230535ea047ce13a
https://github.com/WebKit/WebKit/commit/cf3e6e92d5506c27f425e369230535ea047ce13a
Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
Date: 2024-02-07 (Wed, 07 Feb 2024)
Changed paths:
M Source/WebKit/Platform/spi/Cocoa/PDFKitSPI.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
Log Message:
-----------
[UnifiedPDF] Selections should be extensible on shift-click
https://bugs.webkit.org/show_bug.cgi?id=268617
rdar://122179325
Reviewed by Tim Horton.
This patch introduces support for extending selections by click/drag
operations while the shift key is active.
When beginning a selection, we check if the shift key is pressed, and
generate an extended selection from the start of the existing selection
(if any) to the mouse click position. We adopt the
-[PDFSelection firstCharCenter] SPI to obtain the start point of our
extended selection.
Other than that, we fall back to existing code which makes sure we
extend our current selection if we're doing a drag operation.
* Source/WebKit/Platform/spi/Cocoa/PDFKitSPI.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::extendCurrentSelectionIfNeeded):
(WebKit::UnifiedPDFPlugin::beginTrackingSelection):
Canonical link: https://commits.webkit.org/274262@main
More information about the webkit-changes
mailing list