Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 17edd052c8db011267aa352f46a1378683ffa2b8
https://github.com/WebKit/WebKit/commit/17edd052c8db011267aa352f46a1378683ffa2b8
Author: Simon Fraser <[email protected]>
Date: 2026-02-28 (Sat, 28 Feb 2026)
Changed paths:
M Source/WebCore/page/LocalFrameView.cpp
M Source/WebCore/page/ios/FrameIOS.mm
M Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
M Source/WebCore/page/scrolling/ScrollAnchoringController.cpp
M Source/WebCore/platform/ScrollableArea.cpp
M Source/WebCore/platform/ScrollableArea.h
M Source/WebCore/rendering/RenderLayerScrollableArea.cpp
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
Log Message:
-----------
Make a scope type to set/restore currentScrollType
https://bugs.webkit.org/show_bug.cgi?id=308904
rdar://171438918
Reviewed by Tim Nguyen.
It's a common pattern to do:
previousScrollType = currentScrollType();
setCurrentScrollType(...);
// Do some kind of scroll
setCurrentScrollType(previousScrollType);
So add ScrollTypeScope that does this set/restore. It supports
an early restore for one class site that would be ugly with
a braces scope.
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::setFrameRect):
(WebCore::LocalFrameView::obscuredContentInsetsDidChange):
(WebCore::LocalFrameView::setScrollOffsetWithOptions):
* Source/WebCore/page/ios/FrameIOS.mm:
(WebCore::LocalFrame::overflowScrollPositionChangedForNode):
* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
* Source/WebCore/page/scrolling/ScrollAnchoringController.cpp:
(WebCore::ScrollAnchoringController::adjustScrollPositionForAnchoring):
* Source/WebCore/platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollToPositionWithAnimation):
(WebCore::ScrollTypeScope::ScrollTypeScope):
(WebCore::ScrollTypeScope::~ScrollTypeScope):
(WebCore::ScrollTypeScope::restore):
* Source/WebCore/platform/ScrollableArea.h:
* Source/WebCore/rendering/RenderLayerScrollableArea.cpp:
(WebCore::RenderLayerScrollableArea::scrollToOffset):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::updateScrollingExtents):
(WebKit::UnifiedPDFPlugin::scrollToPointInContentsSpace):
Canonical link: https://commits.webkit.org/308414@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications