Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 913c214aa45d39b202144dcff23a49895eb3663d
https://github.com/WebKit/WebKit/commit/913c214aa45d39b202144dcff23a49895eb3663d
Author: Tim Horton <[email protected]>
Date: 2026-10-05 (Mon, 05 Oct 2026)
Changed paths:
M Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.h
M Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.mm
M Source/WebKit/UIProcess/mac/WebViewImpl.mm
M Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture
Tests/BasicAppKitGesturesTests.swift
Log Message:
-----------
[AppKit Gestures] Mouse tracking gets stuck after a drag, if the page cancels
dragstart
https://bugs.webkit.org/show_bug.cgi?id=326429
rdar://188950013
Reviewed by Abrar Rahman Protyasha.
When the drag gesture begins, it sends a mousedown that may initiate a drag and
sets
_dragGestureHasSentMouseDown, which blocks mouse tracking gestures until the
drag is resolved.
That state was only cleared from startDrag() or draggingSessionEnded:, neither
of which is called
if the web process prevents the drag from starting. Thus, we get stuck with no
more mouse tracking.
Once the web process has finished handling the drag's mouseup, any startDrag()
it was going
to send has already arrived; if none did, clear the state.
Test: Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture
Tests/BasicAppKitGesturesTests.swift
* Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.h:
* Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.mm:
(-[WKAppKitGestureController dragPressGestureRecognized:]):
After sending mouseUp, wait for all pending mouse events to be processed, then
clear
_dragGestureHasSentMouseDown, if no drag was started.
(-[WKAppKitGestureController didReceiveDragStart]):
We got startDrag(), so cleanup happens in draggingSessionEnded: or cancelDrag().
(-[WKAppKitGestureController clearGestureDragState]):
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::startDrag):
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture
Tests/BasicAppKitGesturesTests.swift:
(AppKitGesturesTests.Basic.dragOverRangeInputChangesValueAfterPageCancelsDragStart):
Drag an image whose dragstart is cancelled, then verify a drag over a range
input
still reaches the slider and changes its value.
Canonical link: https://commits.webkit.org/322808@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications