Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 63798105bff3ae2fcfff6d6a878f85ba0b487d77
https://github.com/WebKit/WebKit/commit/63798105bff3ae2fcfff6d6a878f85ba0b487d77
Author: Simon Fraser <[email protected]>
Date: 2026-03-10 (Tue, 10 Mar 2026)
Changed paths:
A
LayoutTests/http/tests/navigation-api/scroll-offset-after-navigation-back-expected.html
A
LayoutTests/http/tests/navigation-api/scroll-offset-after-navigation-back.html
M Source/WebCore/page/NavigateEvent.cpp
Log Message:
-----------
Pages using the Navigation API sometimes have offset hit test locations
https://bugs.webkit.org/show_bug.cgi?id=309542
rdar://171752650
Reviewed by Abrar Rahman Protyasha.
Navigation API was calling `LocalFrameView::scrollTo()`, which bypasses the
normal async
scrolling `requestScrollPositionUpdate` machinery; there's a comment in
ScrollView.h about
not calling this function. This could result in UI and web processes having
different
scroll offsets.
Fix by having NavigateEvent call `setScrollPosition` instead.
Test: http/tests/navigation-api/scroll-offset-after-navigation-back.html
*
LayoutTests/http/tests/navigation-api/scroll-offset-after-navigation-back-expected.html:
Added.
*
LayoutTests/http/tests/navigation-api/scroll-offset-after-navigation-back.html:
Added.
* Source/WebCore/page/NavigateEvent.cpp:
(WebCore::NavigateEvent::processScrollBehavior):
Canonical link: https://commits.webkit.org/308976@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications