Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: be683cb888e039fa1bd3f91f14bbccce1822a2d8
https://github.com/WebKit/WebKit/commit/be683cb888e039fa1bd3f91f14bbccce1822a2d8
Author: Tim Horton <[email protected]>
Date: 2026-09-17 (Thu, 17 Sep 2026)
Changed paths:
M Source/WebCore/platform/mac/ScrollingEffectsController.mm
M
Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp
M
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.mm
M Source/WebKit/UIProcess/ViewGestureController.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.mm
M Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp
M Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture
Tests/BasicAppKitGesturesTests.swift
Log Message:
-----------
[AppKit Gestures] Diagonal rubber-banding doesn't work, snaps to a single axis
https://bugs.webkit.org/show_bug.cgi?id=324361
rdar://187395904
Reviewed by Abrar Rahman Protyasha.
Add support for rubberbanding in both axes at once. As a part of this, make it
possible to rubberband in a direction that could have become a gesture swipe,
but
only after the swipe itself fails. And, remove a problematic hack that was only
introduced because we didn't support diagonal rubber-banding.
* Source/WebCore/platform/mac/ScrollingEffectsController.mm:
(WebCore::ScrollingEffectsController::modifyScrollDeltaForStretching):
(WebCore::ScrollingEffectsController::applyScrollDeltaWithStretching):
If diagonal rubber-banding is allowed, don't zero the rubberbanding force in
the cross axis.
Compute and clamp the force and deltas independently per axis.
(WebCore::ScrollingEffectsController::computeDampedStretchDelta):
Recompute the force instead of passing it straight through since the cross axis
may still have a nonzero force.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::handleWheelEvent):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.mm:
(WebKit::RemoteLayerTreeEventDispatcher::determineWheelEventProcessing):
* Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::internalWheelEvent):
Update the ScrollingTree's notion of whether edges are rubber-bandable
continuously
instead of just at the beginning, because, now that rubberbandability depends
on the live state of the swipe gesture, it can change throughout the gesture.
* Source/WebKit/UIProcess/ViewGestureController.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleWheelEvent):
(WebKit::WebPageProxy::continueWheelEventHandling):
(WebKit::WebPageProxy::rubberBandableEdgesRespectingHistorySwipe const):
* Source/WebKit/UIProcess/WebPageProxy.h:
Dynamically block rubber-banding based on the feasibility of the current gesture
turning into a swipe, instead of categorically blocking it if swipe is possible
at all.
* Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.mm:
(-[WKAppKitGestureController sendWheelEventForGesture:]):
Remove this workaround that is no longer needed (and caused other downstream
trouble).
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture
Tests/BasicAppKitGesturesTests.swift:
Canonical link: https://commits.webkit.org/321319@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications