Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b121d4faa6d8fcfe4e477df3c6ec40d792934175
      
https://github.com/WebKit/WebKit/commit/b121d4faa6d8fcfe4e477df3c6ec40d792934175
  Author: Lily Spiniolas <[email protected]>
  Date:   2026-06-22 (Mon, 22 Jun 2026)

  Changed paths:
    M Source/WTF/wtf/PlatformEnableCocoa.h
    M Source/WTF/wtf/PlatformHave.h
    M Source/WebCore/page/LocalFrameView.cpp
    M Source/WebCore/page/Page.cpp
    M Source/WebCore/page/Page.h
    M Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp
    M Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h
    M Source/WebCore/page/scrolling/ScrollingStateNode.h
    M Source/WebCore/page/scrolling/ScrollingTree.h
    M Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.cpp
    M Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h
    M Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h
    M Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm
    M Source/WebCore/platform/ScrollingEffectsController.h
    M Source/WebCore/platform/mac/ScrollAnimationRubberBand.h
    M Source/WebCore/platform/mac/ScrollingEffectsController.mm
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/testing/Internals.h
    M Source/WebCore/testing/Internals.idl
    M Source/WebKit/Configurations/WebKit.xcconfig
    M Source/WebKit/Configurations/_WebKit_SwiftUI.xcconfig
    M Source/WebKit/DerivedSources.make
    M Source/WebKit/Platform/spi/mac/AppKitSPI.h
    M 
Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.serialization.in
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Source/WebKit/Shared/WebKit-Swift.h
    M Source/WebKit/Shared/WebPageCreationParameters.h
    M Source/WebKit/Shared/WebPageCreationParameters.serialization.in
    A Source/WebKit/UIProcess/API/Cocoa/WKWebView+RefreshControl.swift
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.h
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
    M Source/WebKit/UIProcess/PageClient.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm
    M 
Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/WebPageProxyInternals.h
    M Source/WebKit/UIProcess/mac/PageClientImplMac.h
    M Source/WebKit/UIProcess/mac/PageClientImplMac.mm
    M Source/WebKit/UIProcess/mac/WKAppKitGestureController.mm
    M Source/WebKit/UIProcess/mac/WebViewImpl.h
    M Source/WebKit/UIProcess/mac/WebViewImpl.mm
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
    M Source/WebKit/_WebKit_SwiftUI/Implementation/WebViewRepresentable.swift
    M Tools/TestWebKitAPI/Helpers/mac/AppKitSPI.h
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SampledPageTopColor.mm

  Log Message:
  -----------
  Upstream support for `NSRefreshController` and updates to `UIRefreshControl`
https://bugs.webkit.org/show_bug.cgi?id=316808
rdar://179255418

Reviewed by Abrar Rahman Protyasha and Aditya Keerthi.

Upstream support for `NSRefreshController` on macOS along with support
for the `refreshable` view modifier for both macOS and iOS in SwiftUI,
and some refresh control tests.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SampledPageTopColor.mm

* Source/WTF/wtf/PlatformEnableCocoa.h:
* Source/WTF/wtf/PlatformHave.h:
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::calculateExtendedBackgroundMode const):
* Source/WebCore/page/Page.cpp:
(WebCore::Page::setHasRefreshController):
(WebCore::Page::setHasBannerViewOverlay): Deleted.
* Source/WebCore/page/Page.h:
(WebCore::Page::hasRefreshController const):
(WebCore::Page::hasBannerViewOverlay const): Deleted.
* Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
(WebCore::ScrollingStateFrameScrollingNode::applicableProperties const):
(WebCore::ScrollingStateFrameScrollingNode::setTopScrollStretchForRefreshController):
(WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):
(WebCore::ScrollingStateFrameScrollingNode::setBannerViewHeight): Deleted.
* Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h:
* Source/WebCore/page/scrolling/ScrollingStateNode.h:
* Source/WebCore/page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::topScrollStretchForRefreshController const):
(WebCore::ScrollingTree::refreshControllerSnappingThreshold const):
(WebCore::ScrollingTree::hasRefreshController const):
(WebCore::ScrollingTree::bannerViewHeight const): Deleted.
(WebCore::ScrollingTree::bannerViewMaximumHeight const): Deleted.
(WebCore::ScrollingTree::hasBannerViewOverlay const): Deleted.
* Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
(WebCore::ScrollingTreeFrameScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNode::dumpProperties const):
* Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h:
* Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
* Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
(WebCore::ScrollingTreeScrollingNodeDelegateMac::rubberBandTargetOffset const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::refreshControllerSnappingThreshold
 const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::hasRefreshController const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::bannerViewMaximumHeight 
const): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateMac::hasBannerViewOverlay const): 
Deleted.
* Source/WebCore/platform/ScrollingEffectsController.h:
(WebCore::ScrollingEffectsControllerClient::hasRefreshController const):
(WebCore::ScrollingEffectsControllerClient::refreshControllerSnappingThreshold 
const):
(WebCore::ScrollingEffectsControllerClient::hasBannerViewOverlay const): 
Deleted.
(WebCore::ScrollingEffectsControllerClient::bannerViewMaximumHeight const): 
Deleted.
* Source/WebCore/platform/mac/ScrollAnimationRubberBand.h:
* Source/WebCore/platform/mac/ScrollingEffectsController.mm:
(WebCore::ScrollingEffectsController::deltaAdjustedForRefreshController):
(WebCore::ScrollingEffectsController::shouldAttemptRubberbandingRestoration):
(WebCore::ScrollingEffectsController::applyScrollDeltaWithStretching):
(WebCore::ScrollingEffectsController::deltaWithAdditionalAdjustments): Deleted.
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setPageHasRefreshControllerForTesting):
(WebCore::Internals::setPageHasBannerViewOverlayForTesting): Deleted.
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:
* Source/WebKit/Configurations/WebKit.xcconfig:
* Source/WebKit/Configurations/_WebKit_SwiftUI.xcconfig:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Platform/spi/mac/AppKitSPI.h:
* 
Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.serialization.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/Shared/WebKit-Swift.h:
* Source/WebKit/Shared/WebPageCreationParameters.h:
* Source/WebKit/Shared/WebPageCreationParameters.serialization.in:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView+RefreshControl.swift: Added.
(WKWebView.apply(_:animated:completion:)):
(WKWebView.remove(_:animated:completion:)):
(WKWebView.refreshControlVisibleHeight):
(WKWebView.refreshControlHostBounds):
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView setRefreshController:]):
(-[WKWebView refreshController]):
(-[WKWebView _updateRefreshControlAppearance]):
(-[WKWebView _setPlatformRefreshControl:]):
(-[WKWebView _platformRefreshControl]):
(-[WKWebView _refreshControlVisibleHeight]):
(-[WKWebView _setWebViewInformation:]): Deleted.
(-[WKWebView _webViewInformation]): Deleted.
(-[WKWebView _bannerViewOverlayHeight]): Deleted.
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/PageClient.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTreeTransaction):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::setTopScrollStretchForRefreshController):
(WebKit::RemoteScrollingCoordinatorProxy::setRefreshControllerSnappingThreshold):
(WebKit::RemoteScrollingCoordinatorProxy::setHasRefreshController):
(WebKit::RemoteScrollingCoordinatorProxy::setBannerViewHeight): Deleted.
(WebKit::RemoteScrollingCoordinatorProxy::setBannerViewMaximumHeight): Deleted.
(WebKit::RemoteScrollingCoordinatorProxy::setHasBannerViewOverlay): Deleted.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.h:
(WebKit::RemoteScrollingTree::setTopScrollStretchForRefreshController):
(WebKit::RemoteScrollingTree::setRefreshControllerSnappingThreshold):
(WebKit::RemoteScrollingTree::setHasRefreshController):
(WebKit::RemoteScrollingTree::setBannerViewHeight): Deleted.
(WebKit::RemoteScrollingTree::setBannerViewMaximumHeight): Deleted.
(WebKit::RemoteScrollingTree::setHasBannerViewOverlay): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setHasRefreshController):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setHasBannerViewOverlay): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxyInternals.h:
* Source/WebKit/UIProcess/mac/PageClientImplMac.h:
* Source/WebKit/UIProcess/mac/PageClientImplMac.mm:
* Source/WebKit/UIProcess/mac/WKAppKitGestureController.mm:
(-[WKAppKitGestureController panGestureRecognized:]):
* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::scrollingCoordinatorWasCreated):
(WebKit::WebViewImpl::setFrameSize):
(WebKit::WebViewImpl::setObscuredContentInsets):
(WebKit::WebViewImpl::scrollWheel):
(WebKit::WebViewImpl::setRefreshController):
(WebKit::WebViewImpl::applyRefreshControllerHeight):
(WebKit::WebViewImpl::topScrollStretchForRefreshController const):
(WebKit::WebViewImpl::refreshControllerSnappingThreshold const):
(WebKit::WebViewImpl::updateRefreshControllerFrame):
(WebKit::WebViewImpl::topScrollStretchDidChange):
(WebKit::WebViewImpl::updateRefreshControllerForWheelEvent):
(WebKit::WebViewImpl::updateRefreshControllerForPanGesture):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::m_allowsImmersiveEnvironments):
(WebKit::WebPage::setHasRefreshController):
(WebKit::WebPage::setHasBannerViewOverlay): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Source/WebKit/_WebKit_SwiftUI/Implementation/WebViewRepresentable.swift:
(WebViewRepresentable.updatePlatformView(_:context:)):
(WebViewCoordinator.refreshAction):
(WebViewCoordinator.update(_:configuration:context:)):
(WebViewRepresentable.setupRefreshControl(_:)):
(WebViewCoordinator.handleRefresh(_:)):
(WebViewCoordinator.additionalInformation): Deleted.
* Tools/TestWebKitAPI/Helpers/mac/AppKitSPI.h:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SampledPageTopColor.mm:
(TestWebKitAPI::createWebViewWithRefreshControl):
(TestWebKitAPI::expectRefreshControlLightAppearance):
(TestWebKitAPI::expectRefreshControlDarkAppearance):
(TestWebKitAPI::waitForUnderPageBackgroundColorToChange):
(TestWebKitAPI::testLightToDarkBackgroundColorChange):
(TestWebKitAPI::TEST(SampledPageTopColor, RefreshControlAppearanceLightToDark)):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceLightToDarkIPad)):
(TestWebKitAPI::testDarkToLightBackgroundColorChange):
(TestWebKitAPI::TEST(SampledPageTopColor, RefreshControlAppearanceDarkToLight)):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceDarkToLightIPad)):
(TestWebKitAPI::testLightToDarkPageNavigation):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceLightToDarkNavigation)):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceLightToDarkNavigationIPad)):
(TestWebKitAPI::testDarkToLightPageNavigation):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceDarkToLightNavigation)):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceDarkToLightNavigationIPad)):
(TestWebKitAPI::fixedHeaderPageHTML):
(TestWebKitAPI::addObscuredTopContentInsets):
(TestWebKitAPI::scrollPageDown):
(TestWebKitAPI::testFixedHeaderWithInsetsLightHeader):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceWithInsetsLightHeader)):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceWithInsetsLightHeaderIPad)):
(TestWebKitAPI::testFixedHeaderWithInsetsDarkHeader):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceWithInsetsDarkHeader)):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceWithInsetsDarkHeaderIPad)):
(TestWebKitAPI::testFixedHeaderWithoutInsetsLightHeader):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceWithoutInsetsLightHeader)):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceWithoutInsetsLightHeaderIPad)):
(TestWebKitAPI::testFixedHeaderWithoutInsetsDarkHeader):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceWithoutInsetsDarkHeader)):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceWithoutInsetsDarkHeaderIPad)):
(TestWebKitAPI::testScrollViewBackgroundColorOverride):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceScrollViewBackgroundColor)):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceScrollViewBackgroundColorIPad)):
(TestWebKitAPI::testScrollViewBackgroundColorOverrideWithInsets):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceScrollViewBGWithInsets)):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceScrollViewBGWithInsetsIPad)):
(TestWebKitAPI::testScrollViewBackgroundColorOverrideWithoutInsets):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceScrollViewBGWithoutInsets)):
(TestWebKitAPI::TEST(SampledPageTopColor, 
RefreshControlAppearanceScrollViewBGWithoutInsetsIPad)):

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



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

Reply via email to