Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 636e5ac94706004b7ac8b5408c5431a15cbf86d0
https://github.com/WebKit/WebKit/commit/636e5ac94706004b7ac8b5408c5431a15cbf86d0
Author: Simon Fraser <[email protected]>
Date: 2026-02-10 (Tue, 10 Feb 2026)
Changed paths:
M Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
M Source/WebCore/page/scrolling/ScrollAnchoringController.cpp
M Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.cpp
M Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h
M Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp
M Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h
M Source/WebCore/page/scrolling/mac/ScrollerPairMac.mm
M Source/WebCore/platform/ScrollTypes.cpp
M Source/WebCore/platform/ScrollTypes.h
M Source/WebCore/platform/ScrollableArea.cpp
M Source/WebCore/platform/ScrollableArea.h
M
Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
Log Message:
-----------
[Scroll anchoring] Suppress scrollbar reveal for scroll anchoring changes
https://bugs.webkit.org/show_bug.cgi?id=307402
rdar://170023562
Reviewed by Aditya Keerthi.
When scroll anchoring adjusts the scroll position, we want to suppress the
flash of
the overlay scrollbars that would otherwise occur, both to avoid user
distraction,
and to save power. This is a different concept to the existing "scrollbar
suppression".
Introduce `ScrollbarRevealBehavior`, and plumb it through to
`ScrollingTreeScrollingNode`.
`ScrollAnchoringController::adjustScrollPositionForAnchoring()` uses a
stack-based class
to flip to `ScrollbarRevealBehavior::DontReveal` around the adjustment.
ScrollbarRevealBehavior isn't a state on the node; it's state on a
`RequestedScrollData`,
and we do a one-shot read via
`takeScrollbarRevealBehaviorForNextScrollbarUpdate()`
in `ScrollerPairMac`.
This PR only fixes macOS. UIScrollView doesn't seem to support suppressing
indicator.
* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::requestScrollToPosition):
* Source/WebCore/page/scrolling/ScrollAnchoringController.cpp:
(WebCore::ScrollAnchoringController::adjustScrollPositionForAnchoring):
* Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.cpp:
(WebCore::RequestedScrollData::merge):
(WebCore::operator<<):
* Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h:
(WebCore::RequestedScrollData::operator== const):
* Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::handleScrollPositionRequest):
(WebCore::ScrollingTreeScrollingNode::takeScrollbarRevealBehaviorForNextScrollbarUpdate):
* Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h:
* Source/WebCore/page/scrolling/mac/ScrollerPairMac.mm:
(WebCore::ScrollerPairMac::updateValues):
* Source/WebCore/platform/ScrollTypes.cpp:
(WebCore::operator<<):
* Source/WebCore/platform/ScrollTypes.h:
* Source/WebCore/platform/ScrollableArea.cpp:
(WebCore::ScrollbarRevealBehaviorScope::ScrollbarRevealBehaviorScope):
(WebCore::ScrollbarRevealBehaviorScope::~ScrollbarRevealBehaviorScope):
* Source/WebCore/platform/ScrollableArea.h:
(WebCore::ScrollableArea::setScrollbarRevealBehavior):
(WebCore::ScrollableArea::scrollbarRevealBehavior const):
*
Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::dump):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
Canonical link: https://commits.webkit.org/307178@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications