Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1ebd10ef5e85c57c79434682ce73af0895e1e65a
https://github.com/WebKit/WebKit/commit/1ebd10ef5e85c57c79434682ce73af0895e1e65a
Author: Elika Etemad <[email protected]>
Date: 2025-10-30 (Thu, 30 Oct 2025)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-000-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-000-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-000.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-001-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-001-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-001.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-002-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-002-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-002.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-003-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-003-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-003.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-004-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-004-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-004.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-005-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-005-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-005.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-006-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-006-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-006.html
M Source/WebCore/page/LocalFrameView.cpp
M Source/WebCore/page/LocalFrameView.h
M Source/WebCore/style/AnchorPositionEvaluator.h
Log Message:
-----------
Ensure that fixed anchor positioned boxes can be scrolled into view
https://bugs.webkit.org/show_bug.cgi?id=300515
rdar://162378346
Reviewed by Simon Fraser.
In the past, it was impossible for a fixed-positioned box outside the viewport
to be scrolled into view. However, with anchor positioning, scrolling the
page can bring the box into view when it has a default anchor.
This patch teaches our scrollRectToVisible() function to scroll the page for
anchor-positioned boxes by allowing each axis to be treated as fixed or not
independently when determining whether/how to scroll the page.
This is particularly important functionality for keyboard navigation.
Tests:
imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-000-ref.html
imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-000.html
imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-001-ref.html
imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-001.html
imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-002-ref.html
imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-002.html
imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-003-ref.html
imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-003.html
imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-004-ref.html
imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-004.html
imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-005-ref.html
imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-005.html
imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-006-ref.html
imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-006.html
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-000-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-000-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-000.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-001-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-001-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-001.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-002-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-002-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-002.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-003-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-003-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-003.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-004-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-004-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-004.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-005-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-005-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-005.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-006-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-006-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/scroll-to-anchored-fixed-006.html:
Added.
Add tests.
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::adjustForScrollByAnchor):
(WebCore::LocalFrameView::scrollRectToVisible):
(WebCore::LocalFrameView::scrollRectToVisibleInChildView):
(WebCore::LocalFrameView::scrollRectToVisibleInTopLevelView):
(WebCore::LocalFrameView::getPossiblyFixedRectToExpose const):
* Source/WebCore/page/LocalFrameView.h:
Allow for single-axis fixed behavior for scrollRectToVisible() and friends.
* Source/WebCore/style/AnchorPositionEvaluator.h:
(WebCore::AnchorScrollAdjuster::mayNeedAdjustment const):
(WebCore::AnchorScrollAdjuster::mayNeedXAdjustment const):
(WebCore::AnchorScrollAdjuster::mayNeedYAdjustment const):
(WebCore::AnchorScrollAdjuster::hasViewportSnapshot const):
Expose some internal adjuster data for public use.
Canonical link: https://commits.webkit.org/302368@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications