Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 695f7498cde009612482f820ae52d9aa70a819e1
https://github.com/WebKit/WebKit/commit/695f7498cde009612482f820ae52d9aa70a819e1
Author: Simon Fraser <[email protected]>
Date: 2026-02-08 (Sun, 08 Feb 2026)
Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/page/LocalFrameView.cpp
M Source/WebCore/page/LocalFrameView.h
M Source/WebCore/page/scrolling/ScrollAnchoringController.cpp
M Source/WebCore/page/scrolling/ScrollAnchoringController.h
M Source/WebCore/platform/ScrollableArea.cpp
M Source/WebCore/rendering/RenderLayerScrollableArea.cpp
Log Message:
-----------
[Scroll anchoring] overflow:hidden areas need to participate in scroll
anchoring
https://bugs.webkit.org/show_bug.cgi?id=307283
rdar://169928637
Reviewed by Tim Nguyen.
`overflow:hidden` elements need to participate in scroll anchoring, but they are
not tracked in the scrollable area set that LocalFrameView uses. So keep a
separate
set of ScrollableAreas for those that need to do scroll anchoring. We only need
to
track those for which `shouldMaintainScrollAnchor()` returns true, which means
only
those that have scrolled away from 0.
* LayoutTests/TestExpectations: nested-overflow-subtree-layout.html now passes.
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::addScrollableAreaForScrollAnchoring):
(WebCore::LocalFrameView::removeScrollableAreaForScrollAnchoring):
(WebCore::LocalFrameView::clearScrollAnchorsInScrollableAreas):
(WebCore::LocalFrameView::updateScrollAnchoringBeforeLayoutForScrollableAreas):
* Source/WebCore/page/LocalFrameView.h:
* Source/WebCore/page/scrolling/ScrollAnchoringController.cpp:
(WebCore::ScrollAnchoringController::shouldMaintainScrollAnchor const):
(WebCore::ScrollAnchoringController::scrollPositionDidChange):
(WebCore::ScrollAnchoringController::scrollerDidLayout):
(WebCore::ScrollAnchoringController::updateScrollableAreaRegistration):
(WebCore::ScrollAnchoringController::updateBeforeLayout):
* Source/WebCore/page/scrolling/ScrollAnchoringController.h:
* Source/WebCore/platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollPositionChanged):
* Source/WebCore/rendering/RenderLayerScrollableArea.cpp:
(WebCore::RenderLayerScrollableArea::updateScrollbarsAfterLayout):
Canonical link: https://commits.webkit.org/307045@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications