[webkit-changes] [WebKit/WebKit] 782a6e: [UnifiedPDF] Cursor should be an I-beam while drag...
Abrar Rahman Protyasha
noreply at github.com
Tue Feb 27 13:38:25 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 782a6e1f8520f8fdaa31a7c279076616a8910bc3
https://github.com/WebKit/WebKit/commit/782a6e1f8520f8fdaa31a7c279076616a8910bc3
Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
Date: 2024-02-27 (Tue, 27 Feb 2024)
Changed paths:
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
Log Message:
-----------
[UnifiedPDF] Cursor should be an I-beam while dragging a selection
https://bugs.webkit.org/show_bug.cgi?id=270158
rdar://123634420
Reviewed by Sammy Gill.
This patch ensures that when we're dragging a selection, the cursor is
frozen to an I-beam, which is a better visual experience than
potentially seeing a pointer because a selection drag was initiated over
blank space.
We do not cache the last cursor type before freezing because the cursor
most certainly does not end up at the same spot the selection drag was
initiated from, so unfreezing the cursor to that old type could be
inaccurate. Instead, we choose to hit test again when unfreezing the
cursor.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::handleMouseEvent):
(WebKit::UnifiedPDFPlugin::beginTrackingSelection):
(WebKit::UnifiedPDFPlugin::freezeCursorDuringSelectionDragIfNeeded):
(WebKit::UnifiedPDFPlugin::unfreezeCursorAfterSelectionDragIfNeeded):
(WebKit::UnifiedPDFPlugin::continueTrackingSelection):
(WebKit::UnifiedPDFPlugin::stopTrackingSelection):
Canonical link: https://commits.webkit.org/275403@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list