Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1aba36b70ea151d9cd176af96b7ccf439a0a49c8
https://github.com/WebKit/WebKit/commit/1aba36b70ea151d9cd176af96b7ccf439a0a49c8
Author: Simon Fraser <[email protected]>
Date: 2026-05-27 (Wed, 27 May 2026)
Changed paths:
A
LayoutTests/css3/scroll-snap/scroll-snap-zoom-after-overflow-scroll-expected.txt
A LayoutTests/css3/scroll-snap/scroll-snap-zoom-after-overflow-scroll.html
M Source/WebCore/rendering/RenderLayerScrollableArea.cpp
Log Message:
-----------
Zooming with scroll snap can trigger infinite recursion
https://bugs.webkit.org/show_bug.cgi?id=315613
rdar://177991127
Reviewed by Sammy Gill.
Changing the zoom level triggered recursion via:
RenderLayer::updateLayerPositionsAfterLayout(bool, bool)
RenderLayerCompositor::updateCompositingLayers(WebCore::CompositingUpdateType,
WebCore::RenderLayer*)
RenderLayerScrollableArea::updateCompositingLayersAfterScroll()
RenderLayerScrollableArea::scrollTo(WebCore::IntPoint const&)
RenderLayerScrollableArea::setScrollOffset(WebCore::IntPoint const&)
ScrollableArea::scrollPositionChanged(WebCore::IntPoint const&)
ScrollableArea::notifyScrollPositionChanged(WebCore::IntPoint const&)
AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll()
AsyncScrollingCoordinator::applyScrollPositionUpdate(WebCore::ScrollUpdate&&,
WebCore::ScrollType, WebCore::ViewportRectStability)
AsyncScrollingCoordinator::applyScrollUpdate(WebCore::ScrollUpdate&&,
WebCore::ScrollType, WebCore::ViewportRectStability)
AsyncScrollingCoordinator::requestScrollToPosition(WebCore::ScrollableArea&,
WebCore::IntPoint const&, WebCore::ScrollPositionChangeOptions const&)
RenderLayerScrollableArea::requestScrollToPosition(WebCore::IntPoint const&,
WebCore::ScrollPositionChangeOptions const&)
RenderLayerScrollableArea::scrollToOffset(WebCore::IntPoint const&,
WebCore::ScrollPositionChangeOptions const&)
RenderLayerScrollableArea::applyPostLayoutScrollPositionIfNeeded()
RenderLayer::recursiveUpdateLayerPositions<>()
...
RenderLayer::recursiveUpdateLayerPositions<>()
RenderLayer::updateLayerPositionsAfterLayout(bool, bool)
LocalFrameViewLayoutContext::flushUpdateLayerPositions()
LocalFrameViewLayoutContext::didLayout(bool)
Clear `m_postLayoutScrollPosition` in
`RenderLayerScrollableArea::applyPostLayoutScrollPositionIfNeeded()`
to prevent the recursion.
Test: css3/scroll-snap/scroll-snap-zoom-after-overflow-scroll.html
*
LayoutTests/css3/scroll-snap/scroll-snap-zoom-after-overflow-scroll-expected.txt:
Added.
* LayoutTests/css3/scroll-snap/scroll-snap-zoom-after-overflow-scroll.html:
Added.
* Source/WebCore/rendering/RenderLayerScrollableArea.cpp:
(WebCore::RenderLayerScrollableArea::applyPostLayoutScrollPositionIfNeeded):
Canonical link: https://commits.webkit.org/313972@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications