Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4f227986989fbd30f5b12752fe4928b250b81a4b
https://github.com/WebKit/WebKit/commit/4f227986989fbd30f5b12752fe4928b250b81a4b
Author: Lily Spiniolas <[email protected]>
Date: 2026-07-28 (Tue, 28 Jul 2026)
Changed paths:
M Source/WebKit/Platform/spi/mac/AppKitSPI.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebView+RefreshControl.swift
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
M Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h
M Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm
M Source/WebKit/UIProcess/mac/WKAppKitGestureController.mm
M Source/WebKit/UIProcess/mac/WebViewImpl.h
M Source/WebKit/UIProcess/mac/WebViewImpl.mm
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/NSRefreshControllerTests.mm
Log Message:
-----------
[macOS 27] Momentum scrolling should not trigger NSRefreshController
https://bugs.webkit.org/show_bug.cgi?id=320448
rdar://182688886
Reviewed by Abrar Rahman Protyasha.
Adopt `NSRefreshControlHosting` property `refreshControlHostIsTracking` so that
we can prevent momentum scrolling from triggering refresh controllers by setting
the property to false during momentum scrolls.
Tests:
NSRefreshControllerTests.MomentumScrollDoesNotTriggerRefresh
NSRefreshControllerTests.HostIsNotTrackingDuringMomentumScroll
NSRefreshControllerTests.HostIsTrackingForLegacyMouseWheelScroll
* Source/WebKit/Platform/spi/mac/AppKitSPI.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView+RefreshControl.swift:
(WKWebView.refreshControlHostIsTracking):
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _refreshControlHostIsTracking]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h:
* Source/WebKit/UIProcess/mac/WKAppKitGestureController.mm:
(-[WKAppKitGestureController startMomentumIfNeededForGesture:]):
* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::setRefreshController):
(WebKit::WebViewImpl::updateRefreshControllerForWheelEvent):
(WebKit::WebViewImpl::updateRefreshControllerForPanGesture):
* Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h:
* Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm:
(-[WKWebView _refreshControlHostIsTrackingForTesting]):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/NSRefreshControllerTests.mm:
(TestWebKitAPI::pullDownAndWaitForRefresh):
(TestWebKitAPI::flickDownAndCoastWithMomentum):
(TestWebKitAPI::TEST_F(NSRefreshControllerTests,
MomentumScrollDoesNotTriggerRefresh)):
(TestWebKitAPI::TEST_F(NSRefreshControllerTests,
HostIsNotTrackingDuringMomentumScroll)):
(TestWebKitAPI::TEST_F(NSRefreshControllerTests,
HostIsTrackingForLegacyMouseWheelScroll)):
Canonical link: https://commits.webkit.org/318106@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications