Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ce76e2b79384d3b751287f8c8da007d3c7fd9fc4
      
https://github.com/WebKit/WebKit/commit/ce76e2b79384d3b751287f8c8da007d3c7fd9fc4
  Author: Lily Spiniolas <[email protected]>
  Date:   2026-07-14 (Tue, 14 Jul 2026)

  Changed paths:
    M Source/WebCore/PAL/pal/spi/mac/NSScrollViewSPI.h
    M Source/WebCore/page/scrolling/ScrollingTree.cpp
    M Source/WebCore/page/scrolling/ScrollingTree.h
    M Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp
    M Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h
    M Source/WebCore/page/scrolling/ScrollingTreeScrollingNodeDelegate.h
    M Source/WebCore/page/scrolling/ThreadedScrollingTreeScrollingNodeDelegate.h
    M Source/WebCore/platform/PlatformWheelEvent.h
    M Source/WebCore/platform/ScrollingEffectsController.h
    M Source/WebCore/platform/mac/ScrollingEffectsController.mm
    M Source/WebKit/Shared/WebEventConversion.cpp
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm
    M 
Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h
    M Tools/TestWebKitAPI/Helpers/cocoa/WebPage+Extras.swift
    M Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture 
Tests/BasicAppKitGesturesTests.swift

  Log Message:
  -----------
  [macOS] Scroll stretch behavior should more closely match NSScrollView
https://bugs.webkit.org/show_bug.cgi?id=318641
rdar://174548304

Reviewed by Abrar Rahman Protyasha and Richard Robinson.

Update WebKit's scroll stretch behavior to more closely resemble NSScrollView.
In the normal scroll-stretch path, there should be no observable change for
user-driven scrolling. In scroll-stretch path when a refresh control is present,
the scroll deltas are no longer dampened whatsoever until the stretch surpasses
the full activation height of the refresh control.

For automation-driven scrolling, the hyperbolic coefficient used during 
rubberband
animations is altered in order to align with AppKit.

Test: Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture 
Tests/BasicAppKitGesturesTests.swift

* Source/WebCore/PAL/pal/spi/mac/NSScrollViewSPI.h:
* Source/WebCore/page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::rubberbandHyperbolicCoefficientForTesting):
* Source/WebCore/page/scrolling/ScrollingTree.h:
* Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::rubberbandHyperbolicCoefficientForTesting 
const):
* Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h:
* Source/WebCore/page/scrolling/ScrollingTreeScrollingNodeDelegate.h:
(WebCore::ScrollingTreeScrollingNodeDelegate::rubberbandHyperbolicCoefficientForTesting
 const):
* Source/WebCore/page/scrolling/ThreadedScrollingTreeScrollingNodeDelegate.h:
* Source/WebCore/platform/PlatformWheelEvent.h:
(WebCore::PlatformWheelEvent::inputSource const):
(WebCore::PlatformWheelEvent::setInputSource):
* Source/WebCore/platform/ScrollingEffectsController.h:
(WebCore::ScrollingEffectsController::rubberbandHyperbolicCoefficientForTesting 
const):
* Source/WebCore/platform/mac/ScrollingEffectsController.mm:
(WebCore::hyperbolicReboundDeltaForElasticDelta):
(WebCore::ScrollingEffectsController::handleWheelEvent):
(WebCore::ScrollingEffectsController::deltaAdjustedForRefreshController):
(WebCore::ScrollingEffectsController::computeDampedStretchDelta):
(WebCore::ScrollingEffectsController::applyScrollDeltaWithStretching):
* Source/WebKit/Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm:
(-[WKWebView _rubberbandHyperbolicCoefficientForTesting]):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::rubberbandHyperbolicCoefficientForTesting
 const):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
* Tools/TestWebKitAPI/Helpers/cocoa/WebPage+Extras.swift:
(rubberbandHyperbolicCoefficient):
(scrollWheel(at:delta:)):
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture 
Tests/BasicAppKitGesturesTests.swift:
(AppKitGesturesTests.scrollInputSourceUpdatesrubberbandHyperbolicCoefficient):

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



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

Reply via email to