Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ceee5e9070b100c496086afc6da497fe5d60235e
      
https://github.com/WebKit/WebKit/commit/ceee5e9070b100c496086afc6da497fe5d60235e
  Author: Abrar Rahman Protyasha <[email protected]>
  Date:   2026-07-22 (Wed, 22 Jul 2026)

  Changed paths:
    M Source/WebKit/UIProcess/mac/WKAppKitGestureController.h
    M Source/WebKit/UIProcess/mac/WKAppKitGestureController.mm
    M Source/WebKit/UIProcess/mac/WKAppKitGestureController.swift
    M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
    M Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture 
Tests/EmbeddedAppKitGesturesTests.swift

  Log Message:
  -----------
  [AppKit Gestures] Bring up support for DOM dblclick and smart magnification
https://bugs.webkit.org/show_bug.cgi?id=319832
rdar://177010342

Reviewed by Richard Robinson and Wenson Hsieh.

This patch reworks WKAppKitGestureController's click handling so that
a double click either produces a DOM dblclick or smart magnification
depending on the content under the interaciton.

Some salient parts to this change:

- Move the start of a potential click (in the two-phase click pipeline)
  at pressDown instead of the single click's .began action. This
  addresses latency concerns that could drop the click on a plain single
  click (now that the double click recognizer's failure requirements are
  active).

- Add a non-blocking double-click recognizer and a doubleClickForDouble-
  click recognizer and drive their enablement by deliberating about the
  web content under some interaction.

- Wire the new recognizers in the gesture controller (simultaneity,
  canPrevent, and a listener-gated single-click failure requirement)
  and, in the web content process, feed the decision by hit-testing the
  node under the press point when there is no click responder.

* Source/WebKit/UIProcess/mac/WKAppKitGestureController.h:
* Source/WebKit/UIProcess/mac/WKAppKitGestureController.mm:
(-[WKAppKitGestureController singleClickGestureRecognizer]):
(-[WKAppKitGestureController setSingleClickGestureRecognizer:]):
(-[WKAppKitGestureController setUpGestureRecognizers]):
(-[WKAppKitGestureController setUpDoubleClickForDoubleClickGestureRecognizer]):
(-[WKAppKitGestureController setUpNonBlockingDoubleClickGestureRecognizer]):
(-[WKAppKitGestureController addGesturesToWebView]):
(-[WKAppKitGestureController enableGesturesIfNeeded]):
(-[WKAppKitGestureController ensureGesturesAreNotArchived]):
(-[WKAppKitGestureController panGestureRecognized:]):
(-[WKAppKitGestureController singleClickGestureRecognized:]):
(-[WKAppKitGestureController doubleClickGestureRecognized:]):
(-[WKAppKitGestureController doubleClickForDoubleClickGestureRecognized:]):
(-[WKAppKitGestureController nonBlockingDoubleClickGestureRecognized:]):
(-[WKAppKitGestureController _doubleClickForDoubleClickShouldBeginAtLocation:]):
(-[WKAppKitGestureController _doubleClickForZoomShouldBeginAtLocation:]):
(-[WKAppKitGestureController handleClickBegan:]):
(-[WKAppKitGestureController _resetClickGestureRecognizersForNextClick]):
(-[WKAppKitGestureController _handleClickEnded:]):
(-[WKAppKitGestureController _setDoubleClickGesturesEnabled:]):
(-[WKAppKitGestureController _updateDoubleClickGestureRecognizerEnablement]):
(-[WKAppKitGestureController wouldSignificantlyZoomForRenderRect:]):
(-[WKAppKitGestureController 
handleSmartMagnificationInformationForPotentialClick:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:nodeIsRootLevel:nodeIsPluginElement:]):
(-[WKAppKitGestureController didNotHandleClickAsClick:]):
(-[WKAppKitGestureController 
gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKAppKitGestureController 
gestureRecognizer:shouldRequireFailureOfGestureRecognizer:]):
(-[WKAppKitGestureController gestureRecognizerShouldBegin:]):
(-[WKAppKitGestureController _gestureRecognizer:canPreventGestureRecognizer:]):
(-[WKAppKitGestureController setUpSingleClickGestureRecognizer]): Deleted.
(-[WKAppKitGestureController _handleClickBegan:]): Deleted.
* Source/WebKit/UIProcess/mac/WKAppKitGestureController.swift:
(WKClickPressGestureRecognizer.controller):
(WKAppKitGestureController.setUpSingleClickGestureRecognizer):
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::potentialTapAtPosition):
(WebKit::WebPage::commitPotentialTap):
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture 
Tests/EmbeddedAppKitGesturesTests.swift:
(AppKitGesturesTests.doubleClickingSelectsWordWhenScrolledToTopWithObscuredContentInset):

Canonical link: https://commits.webkit.org/317742@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to