Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2715812bcdba4065f929c0633a226cf4755fc11d
      
https://github.com/WebKit/WebKit/commit/2715812bcdba4065f929c0633a226cf4755fc11d
  Author: Abrar Rahman Protyasha <[email protected]>
  Date:   2026-08-27 (Thu, 27 Aug 2026)

  Changed paths:
    M Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.mm
    M Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture 
Tests/BasicAppKitGesturesTests.swift

  Log Message:
  -----------
  REGRESSION(319888@main): [AppKit Gestures] Cannot back/forward navigate with 
gesture-driven swipe
https://bugs.webkit.org/show_bug.cgi?id=322776
rdar://186040671

Reviewed by Wenson Hsieh.

319888@main started clamping the delta of the wheel events produced by
the pan GR along any pinned axis, with the intention that a sideways
scroll component during a simultaneous pan + transient zoom could not
turn into a rubberband stretch (which makes the scrolling tree discard
the orthogonal delta for the rest of the gesture).

The wheel event in question feeds two systems, though; the swipe tracker
maintained by view gesture controller, and the actual page. For the
former, our clamping means we remove the signal used to determine
PendingSwipeTracker::scrollEventCanBecomeSwipe(), and as such we
inadvertently broke swiping -> page navigation when the horizontal axis
is pinned, i.e. the common case at the default page scale.

In this patch, we build a separate event per consumer. The swipe tracker
gets the unclamped delta, and only the event that reaches the page is
clamped. A more principled fix would be to make the scrolling tree _not_
discard the orthogonal component of a scroll delta from the motivation
for 319888@main, but that is riskier and certainly not right in exactly
the form I described.

Test: AppKitGesturesTests.Basic.swipingAtPinnedStateShouldTriggerPageNavigation

* Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.mm:
(-[WKAppKitGestureController sendWheelEventForGesture:]):
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture 
Tests/BasicAppKitGesturesTests.swift:

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



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

Reply via email to