Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: df95fbb390cb4d73277d3c40251d322473385b84
https://github.com/WebKit/WebKit/commit/df95fbb390cb4d73277d3c40251d322473385b84
Author: Richard Robinson <[email protected]>
Date: 2026-08-13 (Thu, 13 Aug 2026)
Changed paths:
M Source/WebCore/page/EventHandler.cpp
M Source/WebKit/Modules/Internal/module.modulemap
M Source/WebKit/SourcesCocoa.txt
A Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.h
A Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.mm
A Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.swift
A
Source/WebKit/UIProcess/mac/AppKitGestures/WKDOMDoubleClickGestureRecognizer.swift
A
Source/WebKit/UIProcess/mac/AppKitGestures/WKDirectionalScrollLockTracker.swift
A Source/WebKit/UIProcess/mac/AppKitGestures/WKFastScrollTracker.swift
R Source/WebKit/UIProcess/mac/WKAppKitGestureController.h
R Source/WebKit/UIProcess/mac/WKAppKitGestureController.mm
R Source/WebKit/UIProcess/mac/WKAppKitGestureController.swift
R Source/WebKit/UIProcess/mac/WKDirectionalScrollLockTracker.swift
R Source/WebKit/UIProcess/mac/WKFastScrollTracker.swift
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture
Tests/DoubleClickGesturesTests.swift
Log Message:
-----------
[AppKit Gestures] Bring up support for DOM dblclick (take two)
https://bugs.webkit.org/show_bug.cgi?id=321352
rdar://184385585
Reviewed by Wenson Hsieh and Abrar Rahman Protyasha.
Add support for firing the dblclick DOM event. To do this, a new passive
gesture recognizer is added
to recognize double clicks, and then forwards to WebPage to dispatch the event
if a dblclick listener exists.
To facilitate keeping track of double clicks, a new
`WKDOMDoubleClickGestureRecognizer` type is introduced.
This is necessary instead of just setting the minimum number of clicks to two
because after the first click,
AppKit prevents any other gestures from recognizing any of the following events
until that two-click GR is
has a chance to handle them, which is undesirable.
Also clean up and de-duplicate some tests.
Also move some related files to a new `AppKitGestures` directory.
Test: Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture
Tests/DoubleClickGesturesTests.swift
* Source/WebKit/Modules/Internal/module.modulemap:
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.h:
Renamed from Source/WebKit/UIProcess/mac/WKAppKitGestureController.h.
* Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.mm:
Renamed from Source/WebKit/UIProcess/mac/WKAppKitGestureController.mm.
(-[WKAppKitGestureController domDoubleClickGestureRecognizer]):
(-[WKAppKitGestureController setDomDoubleClickGestureRecognizer:]):
(-[WKAppKitGestureController setUpGestureRecognizers]):
(-[WKAppKitGestureController addGesturesToWebView]):
(-[WKAppKitGestureController enableGesturesIfNeeded]):
(-[WKAppKitGestureController ensureGesturesAreNotArchived]):
(-[WKAppKitGestureController domDoubleClickGestureRecognized:]):
(-[WKAppKitGestureController
_updateLayerTreeTransactionIdAtLastInteractionStart]):
(-[WKAppKitGestureController _handleClickBegan:]):
(-[WKAppKitGestureController
gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKAppKitGestureController gestureRecognizerShouldBegin:]):
(-[WKAppKitGestureController _gestureRecognizer:canPreventGestureRecognizer:]):
* Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.swift:
Renamed from Source/WebKit/UIProcess/mac/WKAppKitGestureController.swift.
(WKAppKitGestureController.setUpDOMDoubleClickGestureRecognizer):
*
Source/WebKit/UIProcess/mac/AppKitGestures/WKDOMDoubleClickGestureRecognizer.swift:
Added.
(click):
(state):
(isDoubleClick):
*
Source/WebKit/UIProcess/mac/AppKitGestures/WKDirectionalScrollLockTracker.swift:
Renamed from Source/WebKit/UIProcess/mac/WKDirectionalScrollLockTracker.swift.
* Source/WebKit/UIProcess/mac/AppKitGestures/WKFastScrollTracker.swift: Renamed
from Source/WebKit/UIProcess/mac/WKFastScrollTracker.swift.
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture
Tests/DoubleClickGesturesTests.swift:
(AppKitGesturesTests.doubleClickWithListenerFiresDblclickAndSelectsWord):
(AppKitGesturesTests.doubleClickWithListenerFiresDblclickRegardlessOfEditability(_:)):
(AppKitGesturesTests.singleClickReportsDetailOne):
(AppKitGesturesTests.clickingTwoDifferentWordsDoesNotFireDblclick):
(AppKitGesturesTests.doubleClickInsideExistingRangeSelectionFiresDblclick):
(AppKitGesturesTests.doubleClickWithListenerFiresDblclick): Deleted.
(AppKitGesturesTests.doubleClickReportsDetailTwo): Deleted.
Canonical link: https://commits.webkit.org/319115@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications