Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 91f4890b4242f62e227da934a30392e86c9d71b1
https://github.com/WebKit/WebKit/commit/91f4890b4242f62e227da934a30392e86c9d71b1
Author: Lily Spiniolas <[email protected]>
Date: 2026-03-18 (Wed, 18 Mar 2026)
Changed paths:
M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTree.serialization.in
M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeCommitBundle.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
M Source/WebKit/UIProcess/PageClient.h
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm
M Source/WebKit/UIProcess/mac/PageClientImplMac.h
M Source/WebKit/UIProcess/mac/PageClientImplMac.mm
M Source/WebKit/UIProcess/mac/WebViewImpl.h
M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
Log Message:
-----------
Top scroll stretch notifications may be incorrect during rubber band
restoration
https://bugs.webkit.org/show_bug.cgi?id=310244
rdar://172886834
Reviewed by Wenson Hsieh.
After the page reloads, `WebPage::willCommitMainFrameData` calculates the
scroll stretch and adds it to `MainFrameData`. Then, in
`PageClientImpl::didCommitMainFrameData`, we pass the scroll stretch
to `_topScrollStretchDidChange`.
Critically, after a page reloads and a rubberband animation is restored,
the scroll stretch is initially calculated as 0 in
`WebPage::willCommitMainFrameData` due to it running before the UI process
restores the rubber band state.
Resolve this by instead calculating the scroll stretch in
`commitLayerTreeTransaction` after the scrolling tree commit, and passing
it to `_topScrollStretchDidChange` from this same location.
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTree.serialization.in:
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeCommitBundle.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _topScrollStretchDidChange:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h:
* Source/WebKit/UIProcess/PageClient.h:
(WebKit::PageClient::topScrollStretchDidChange):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTreeTransaction):
* Source/WebKit/UIProcess/mac/PageClientImplMac.h:
* Source/WebKit/UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::topScrollStretchDidChange):
(WebKit::PageClientImpl::didCommitMainFrameData):
* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::willCommitMainFrameData):
Canonical link: https://commits.webkit.org/309537@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications