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

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebCore/dom/Document.cpp
    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/ScrollAnimator.cpp
    M Source/WebCore/platform/ScrollableArea.cpp
    M Source/WebCore/platform/ScrollableArea.h
    M Source/WebCore/rendering/RenderElement.cpp

  Log Message:
  -----------
  [Scroll anchoring] Prepare for a new implementation of 
ScrollAnchoringController
https://bugs.webkit.org/show_bug.cgi?id=307205
rdar://169832293

Reviewed by Tim Nguyen.

Prepare for a new implementation of Scroll Anchoring by gutting 
ScrollAnchoringController,
but fixing up some hooks in other parts of the code that call into it.

Various places that called `updateScrollAnchoring()` now do 
`clearScrollAnchor()`
because that's more descriptive of what happens (the anchor is recomputed before
the next layout).

One critical new hook is the "before layout" hook in 
`LocalFrameView::willDoLayout()`;
this is the point at which we'll compute the current scroll offset, to be 
adjusted
after layout, in `performPostLayoutTasks()`.

Temporarily skip all scroll-anchoring tests while things are in flux.

* LayoutTests/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::updateLayout):
(WebCore::Document::runScrollSteps):
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::willDoLayout):
(WebCore::LocalFrameView::setLayoutViewportOverrideRect):
(WebCore::LocalFrameView::scrollOffsetChangedViaPlatformWidgetImpl):
(WebCore::LocalFrameView::performPostLayoutTasks):
(WebCore::LocalFrameView::clearScrollAnchorsInScrollableAreas):
(WebCore::LocalFrameView::updateScrollAnchoringBeforeLayoutForScrollableAreas):
(WebCore::LocalFrameView::scheduleResizeEventIfNeeded):
(WebCore::LocalFrameView::updateScrollAnchoringElementsForScrollableAreas): 
Deleted.
* Source/WebCore/page/LocalFrameView.h:
* Source/WebCore/page/scrolling/ScrollAnchoringController.cpp:
(WebCore::ScrollAnchoringController::ScrollAnchoringController):
(WebCore::ScrollAnchoringController::~ScrollAnchoringController):
(WebCore::ScrollAnchoringController::shouldMaintainScrollAnchor const):
(WebCore::ScrollAnchoringController::frameView):
(WebCore::ScrollAnchoringController::scrollableAreaBox const):
(WebCore::ScrollAnchoringController::clearAnchor):
(WebCore::ScrollAnchoringController::invalidate):
(WebCore::ScrollAnchoringController::notifyChildHadSuppressingStyleChange):
(WebCore::ScrollAnchoringController::chooseAnchorElement):
(WebCore::ScrollAnchoringController::anchoringSuppressedByStyleChange const):
(WebCore::ScrollAnchoringController::updateBeforeLayout):
(WebCore::ScrollAnchoringController::adjustScrollPositionForAnchoring):
(WebCore::elementIsScrollableArea): Deleted.
(WebCore::elementForScrollableArea): Deleted.
(WebCore::ScrollAnchoringController::invalidateAnchorElement): Deleted.
(WebCore::boundingRectForScrollableArea): Deleted.
(WebCore::ScrollAnchoringController::computeOffsetFromOwningScroller): Deleted.
(WebCore::ScrollAnchoringController::isInScrollAnchoringAncestorChain): Deleted.
(WebCore::anchorElementForPriorityCandidate): Deleted.
(WebCore::scrollAnchoringControllerForElement): Deleted.
(WebCore::canIncludeElementInPriorityCandidateChain): Deleted.
(WebCore::ScrollAnchoringController::didFindPriorityCandidate): Deleted.
(WebCore::absolutePositionedElementOutsideScroller): Deleted.
(WebCore::canDescendIntoElement): Deleted.
(WebCore::ScrollAnchoringController::examineAnchorCandidate): Deleted.
(WebCore::operator<<): Deleted.
(WebCore::ScrollAnchoringController::findAnchorElementRecursive): Deleted.
(WebCore::ScrollAnchoringController::updateAnchorElement): Deleted.
* Source/WebCore/page/scrolling/ScrollAnchoringController.h:
(WebCore::ScrollAnchoringController::hasAnchorElement const):
(WebCore::ScrollAnchoringController::anchorElement const): Deleted.
* Source/WebCore/platform/ScrollAnimator.cpp:
(WebCore::notifyScrollAnchoringControllerOfScroll):
* Source/WebCore/platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollPositionChanged):
(WebCore::ScrollableArea::clearScrollAnchor):
(WebCore::ScrollableArea::updateScrollAnchoringElement): Deleted.
* Source/WebCore/platform/ScrollableArea.h:
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::styleDidChange):

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



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

Reply via email to