Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 37264fe399965bb5936fd6191ac27e284dc4bf90
https://github.com/WebKit/WebKit/commit/37264fe399965bb5936fd6191ac27e284dc4bf90
Author: Simon Fraser <[email protected]>
Date: 2026-02-26 (Thu, 26 Feb 2026)
Changed paths:
M LayoutTests/fast/dom/elementFromPoint-relative-to-viewport.html
A LayoutTests/fast/scrolling/scroll-anchoring-constraints-expected.txt
A LayoutTests/fast/scrolling/scroll-anchoring-constraints.html
M
LayoutTests/platform/ios/compositing/geometry/fixed-in-composited-expected.txt
M
LayoutTests/platform/ios/compositing/geometry/horizontal-scroll-composited-expected.txt
R
LayoutTests/platform/ios/imported/w3c/web-platform-tests/dom/events/scrolling/scrollend-event-fired-for-scrollIntoView_include=root-inline-end-block-end-behavior-auto-expected.txt
M Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
M Source/WebCore/platform/ScrollView.h
M Source/WebCore/platform/ScrollableArea.h
Log Message:
-----------
[Scroll Anchoring] Anchoring can cause pages to scroll to negative offsets
https://bugs.webkit.org/show_bug.cgi?id=308689
rdar://171221075
Reviewed by Tim Horton and Abrar Rahman Protyasha.
Scroll anchoring adjustments are issued with `ScrollClamping::Clamped`, but the
path through `AsyncScrollingCoordinator::requestScrollToPosition()` that
applies the ScrollUpdate synchronously does not express clamping, so we need
to do a manual clamp here, using `adjustScrollPositionWithinRange()` which is
made virtual, and consults `allowsUnclampedScrollPosition` on ScrollView.
This was seen in a (broken) scroll anchoring scenario on reddit, and resulted
in missing content.
Test: fast/scrolling/scroll-anchoring-constraints.html
* LayoutTests/fast/dom/elementFromPoint-relative-to-viewport.html: Make it side
scrollable.
* LayoutTests/fast/scrolling/scroll-anchoring-constraints-expected.txt: Added.
* LayoutTests/fast/scrolling/scroll-anchoring-constraints.html: Added.
*
LayoutTests/platform/ios/compositing/geometry/fixed-in-composited-expected.txt:
*
LayoutTests/platform/ios/compositing/geometry/horizontal-scroll-composited-expected.txt:
*
LayoutTests/platform/ios/imported/w3c/web-platform-tests/dom/events/scrolling/scrollend-event-fired-for-scrollIntoView_include=root-inline-end-block-end-behavior-auto-expected.txt:
Removed.
* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::requestScrollToPosition):
* Source/WebCore/platform/ScrollView.h:
* Source/WebCore/platform/ScrollableArea.h:
(WebCore::ScrollableArea::adjustScrollPositionWithinRange const):
Canonical link: https://commits.webkit.org/308320@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications