Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a16dca68c731a40566d6a2b43292aae8e789c788
https://github.com/WebKit/WebKit/commit/a16dca68c731a40566d6a2b43292aae8e789c788
Author: Abrar Rahman Protyasha <[email protected]>
Date: 2026-09-23 (Wed, 23 Sep 2026)
Changed paths:
M Source/WebCore/platform/PlatformMouseEvent.h
M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
M Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture
Tests/BasicAppKitGesturesTests.swift
M Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture
Tests/DoubleClickGesturesTests.swift
Log Message:
-----------
[AppKit Gesture] Mouse events from synthesized clicks report no held button
or force
https://bugs.webkit.org/show_bug.cgi?id=324987
rdar://188198133
Reviewed by Richard Robinson and Wenson Hsieh.
The synthetic click path builds events through a PlatformMouseEvent
constructor that carries no `buttons`, so it defaults to none. For input
sources whose synthetic clicks become the pointer events dispatched to
content, this means that the resulting pointer events see a press
holding no button and with no pressure behind it.
In this patch, we address these incompatibilities to make the dispatched
events more spec compliant.
Tests: AppKitGesturesTests.Basic/singleClickReportsHeldButtonAndPressure
AppKitGesturesTests.DoubleClick/doubleClickReportsHeldButtonAndPressure
* Source/WebCore/platform/PlatformMouseEvent.h:
(WebCore::PlatformMouseEvent::setButtons):
(WebCore::PlatformMouseEvent::setMovementDelta):
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::completeSyntheticClick):
(WebKit::WebPage::handleDoubleTapForDoubleClickAtPoint):
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture
Tests/BasicAppKitGesturesTests.swift:
(AppKitGesturesTests.singleClickReportsHeldButtonAndPressure):
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture
Tests/DoubleClickGesturesTests.swift:
(AppKitGesturesTests.doubleClickReportsHeldButtonAndPressure):
Canonical link: https://commits.webkit.org/321725@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications