Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b9c702f9efb53ba85042d10c1070d72a6487676f
      
https://github.com/WebKit/WebKit/commit/b9c702f9efb53ba85042d10c1070d72a6487676f
  Author: Simon Fraser <[email protected]>
  Date:   2026-02-08 (Sun, 08 Feb 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/compositing/repaint/sticky-repaint-on-scroll.html
    M LayoutTests/fast/dom/Element/body-scrollLeft-basics-quirks.html
    M LayoutTests/fast/dom/Element/body-scrollTop-basics-quirks.html
    M LayoutTests/fast/overflow/scroll-anchor-in-overflow-in-position-fixed.html
    M LayoutTests/fast/repaint/absolute-position-changed.html
    M 
LayoutTests/fast/scrolling/ios/click-events-during-momentum-scroll-in-main-frame.html
    M LayoutTests/fast/text-extraction/debug-text-extraction-interactions.html
    M 
LayoutTests/fast/visual-viewport/client-coordinates-relative-to-layout-viewport.html
    M 
LayoutTests/fast/visual-viewport/client-rects-relative-to-layout-viewport.html
    M LayoutTests/fast/visual-viewport/nonzoomed-rects.html
    M LayoutTests/fast/visual-viewport/rtl-nonzoomed-rects.html
    M LayoutTests/fast/visual-viewport/rtl-zoomed-rects.html
    M LayoutTests/fast/visual-viewport/zoomed-rects.html
    M LayoutTests/fast/visual-viewport/zoomed-scroll-into-view-fixed.html
    M LayoutTests/platform/ios/TestExpectations
    M LayoutTests/scrollingcoordinator/mac/latching/simple-page-rubberbands.html
    M 
LayoutTests/scrollingcoordinator/mac/rubberbanding-bounce-based-on-size-tall-content.html
    M Source/WebCore/page/scrolling/ScrollAnchoringController.cpp
    M Source/WebCore/page/scrolling/ScrollAnchoringController.h

  Log Message:
  -----------
  [Scroll Anchoring] Implement the anchor selection algorithm and scroll 
adjustment
https://bugs.webkit.org/show_bug.cgi?id=307256
rdar://169893438

Reviewed by Tim Nguyen.

Implement the anchor selection algorithm, and the scroll adjustment parts of
scroll anchoring[1], via render tree traversal (replacing the former
DOM traversal implementation that was removed).

There are a number of FIXME comments that will be addressed in future
commits, many around writing modes.

Unskip some of the scroll-anchoring tests that now pass. Several tests which
test scrolling are perturbed by scroll anchoring, so disable it in them.

[1] https://drafts.csswg.org/css-scroll-anchoring/

* LayoutTests/TestExpectations:
* LayoutTests/compositing/repaint/sticky-repaint-on-scroll.html:
* LayoutTests/fast/dom/Element/body-scrollLeft-basics-quirks.html:
* LayoutTests/fast/dom/Element/body-scrollTop-basics-quirks.html:
* LayoutTests/fast/overflow/scroll-anchor-in-overflow-in-position-fixed.html: 
Despite the name, this test
is not about scroll anchoring; it's about scrolling to an `<a>`.
* LayoutTests/fast/repaint/absolute-position-changed.html:
* 
LayoutTests/fast/scrolling/ios/click-events-during-momentum-scroll-in-main-frame.html:
* LayoutTests/fast/text-extraction/debug-text-extraction-interactions.html:
* 
LayoutTests/fast/visual-viewport/client-coordinates-relative-to-layout-viewport.html:
* 
LayoutTests/fast/visual-viewport/client-rects-relative-to-layout-viewport.html:
* LayoutTests/fast/visual-viewport/nonzoomed-rects.html:
* LayoutTests/fast/visual-viewport/rtl-nonzoomed-rects.html:
* LayoutTests/fast/visual-viewport/rtl-zoomed-rects.html:
* LayoutTests/fast/visual-viewport/zoomed-rects.html:
* LayoutTests/fast/visual-viewport/zoomed-scroll-into-view-fixed.html:
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/scrollingcoordinator/mac/latching/simple-page-rubberbands.html:
* 
LayoutTests/scrollingcoordinator/mac/rubberbanding-bounce-based-on-size-tall-content.html:
* Source/WebCore/page/scrolling/ScrollAnchoringController.cpp:
(WebCore::ScrollAnchoringController::shouldMaintainScrollAnchor const):
(WebCore::ScrollAnchoringController::frameView const):
(WebCore::ScrollAnchoringController::clearAnchor):
(WebCore::candidateLocalRectForAnchoring):
(WebCore::ScrollAnchoringController::computeScrollerRelativeRects const):
(WebCore::ScrollAnchoringController::computeOffsetFromOwningScroller const):
(WebCore::ScrollAnchoringController::findPriorityCandidate):
(WebCore::candidateMayMoveWithScroller):
(WebCore::ScrollAnchoringController::examinePriorityCandidate const):
(WebCore::ScrollAnchoringController::examineAnchorCandidate const):
(WebCore::operator<<):
(WebCore::ScrollAnchoringController::findAnchorInOutOfFlowObjects):
(WebCore::ScrollAnchoringController::findAnchorRecursive):
(WebCore::ScrollAnchoringController::chooseAnchorElement):
(WebCore::ScrollAnchoringController::updateBeforeLayout):
(WebCore::ScrollAnchoringController::adjustScrollPositionForAnchoring):
(WebCore::ScrollAnchoringController::frameView): Deleted.
* Source/WebCore/page/scrolling/ScrollAnchoringController.h:
(WebCore::ScrollAnchoringController::isViableStatus):

Canonical link: https://commits.webkit.org/307039@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to