Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1072fbe38fb10c4e11088f217eb21c079246203e
      
https://github.com/WebKit/WebKit/commit/1072fbe38fb10c4e11088f217eb21c079246203e
  Author: Abrar Rahman Protyasha <[email protected]>
  Date:   2026-09-12 (Sat, 12 Sep 2026)

  Changed paths:
    M Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.h
    M Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.mm
    M 
Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.serialization.in
    M Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.mm
    M Source/WebKit/WebProcess/WebPage/Cocoa/PositionInformationForWebPage.mm
    A Tools/TestWebKitAPI/Resources/cocoa/svg-drag-slider.html
    M Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture 
Tests/BasicAppKitGesturesTests.swift

  Log Message:
  -----------
  [AppKit Gestures] Cannot press and drag over some custom sliders
https://bugs.webkit.org/show_bug.cgi?id=324040
rdar://187265835

Reviewed by Wenson Hsieh and Richard Robinson.

Before the pan gesture is allowed to scroll, -_panShouldBeginAtLocation:
asks whether web content at the scroll point would rather have the
gesture itself. Right now, we answer that with two signals: the element
is an <input type=range>, or something under the point carries
role="slider".

Many custom sliders satisfy neither. These sliders may not be a native
control, and it is common for them to carry ARIA value attributes, such
as aria-valuenow, aria-valuemin, aria-valuemax, without a `role` value,
which renders the other attributes meaningless.

In some cases, these custom controls do declare a `cursor`. Often, an
axis-specific resize cursor indicates something manipulated by dragging
along that axis. In this patch, we make yet another class of custom
sliders disambiguate correctly between pan and mouse interaction by
recording (and reading) a new hasDirectionalResizeCursor bit off of the
interaction information structure that respects this intent.

Test: AppKitGesturesTests.Basic/pressDragOverSVGSliderChangesValue

* Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.h:
* Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.mm:
(WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
* Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.serialization.in:
* Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.mm:
(-[WKAppKitGestureController _panShouldBeginAtLocation:]):
* Source/WebKit/WebProcess/WebPage/Cocoa/PositionInformationForWebPage.mm:
(WebKit::selectionPositionInformation):
* Tools/TestWebKitAPI/Resources/cocoa/svg-drag-slider.html: Added.
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture 
Tests/BasicAppKitGesturesTests.swift:

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



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

Reply via email to