Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5f72cefb47b4a524b02cf4b875802220c1136b66
      
https://github.com/WebKit/WebKit/commit/5f72cefb47b4a524b02cf4b875802220c1136b66
  Author: Lily Spiniolas <[email protected]>
  Date:   2026-02-11 (Wed, 11 Feb 2026)

  Changed paths:
    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/ScrollingTreeFrameScrollingNodeMac.h
    M Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm
    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/ScrollAnimationRubberBand.mm
    M Source/WebCore/platform/mac/ScrollingEffectsController.mm
    M 
Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.serialization.in
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
    M Source/WebKit/UIProcess/PageClient.h
    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/RemoteLayerTree/mac/RemoteScrollingTreeMac.h
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    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

  Log Message:
  -----------
  Perform setup for Banner View overlays once added to the web view
https://bugs.webkit.org/show_bug.cgi?id=307386
rdar://170009747

Reviewed by Abrar Rahman Protyasha and Simon Fraser.

When a banner view overlay is added to the web view, we now layout
the view and adjust our scrolling logic as needed.

Since a banner view must display over the web view without obscuring
the actual content of the site, we display it between the top obscured
content inset and the web content. As a result, when a banner view with height
h is present and scroll stretching occurs, rather than rubber band back to
zero, we need to rubber band back to -h.

To achieve this, `RemoteScrollingCoordinatorProxy` now notifies the
`ScrollingTree` of the banner height, which is then used in
`ScrollAnimationRubberBand` for the target overscroll.

When a banner view is removed, or if the height shrinks, we now call
a new method `triggerMainFrameRubberBandSnapBack` from
`RemoteScrollingCoordinatorProxy` as well to rubber band to the new
location.

Tests will be added in a later patch.

* Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
(WebCore::ScrollingStateFrameScrollingNode::applicableProperties const):
(WebCore::ScrollingStateFrameScrollingNode::setBannerViewHeight):
(WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):
* Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h:
* Source/WebCore/page/scrolling/ScrollingStateNode.h:
* Source/WebCore/page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::bannerViewHeight const):
(WebCore::ScrollingTree::hasBannerViewOverlay const):
(WebCore::ScrollingTree::triggerMainFrameRubberBandSnapBack):
* Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
(WebCore::ScrollingTreeFrameScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNode::dumpProperties const):
* Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h:
* Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::startRubberBandSnapBack):
* Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
* Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
(WebCore::ScrollingTreeScrollingNodeDelegateMac::startRubberBandSnapBack):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::rubberBandTargetOffset const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::hasBannerViewOverlay const):
* Source/WebCore/platform/ScrollingEffectsController.h:
(WebCore::ScrollingEffectsControllerClient::rubberBandTargetOffset const):
(WebCore::ScrollingEffectsControllerClient::hasBannerViewOverlay const):
* Source/WebCore/platform/mac/ScrollAnimationRubberBand.h:
* Source/WebCore/platform/mac/ScrollAnimationRubberBand.mm:
(WebCore::ScrollAnimationRubberBand::startRubberBandAnimation):
(WebCore::ScrollAnimationRubberBand::serviceAnimation):
(WebCore::ScrollAnimationRubberBand::debugDescription const):
* Source/WebCore/platform/mac/ScrollingEffectsController.mm:
(WebCore::ScrollingEffectsController::deltaWithAdditionalAdjustments):
(WebCore::ScrollingEffectsController::applyScrollDeltaWithStretching):
(WebCore::ScrollingEffectsController::startRubberBandAnimation):
(WebCore::ScrollingEffectsController::startRubberBandSnapBack):
* 
Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.serialization.in:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _bannerViewOverlayHeight]):
* Source/WebKit/UIProcess/PageClient.h:
(WebKit::PageClient::scrollingCoordinatorWasCreated):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::setBannerViewHeight):
(WebKit::RemoteScrollingCoordinatorProxy::setHasBannerViewOverlay):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.h:
(WebKit::RemoteScrollingTree::setBannerViewHeight):
(WebKit::RemoteScrollingTree::setHasBannerViewOverlay):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.h:
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm:
(WebKit::RemoteScrollingTreeMac::triggerMainFrameRubberBandSnapBack):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setDrawingArea):
* Source/WebKit/UIProcess/mac/PageClientImplMac.h:
* Source/WebKit/UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::scrollingCoordinatorWasCreated):
(WebKit::PageClientImpl::scrollingNodeScrollViewDidScroll):
* 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::setBannerView): Deleted.
(WebKit::WebViewImpl::applyBannerViewOverlayHeight): Deleted.

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



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

Reply via email to