Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 81451dabde97ba73cbed2abc4c4be64957aa20f6
https://github.com/WebKit/WebKit/commit/81451dabde97ba73cbed2abc4c4be64957aa20f6
Author: Nikolaos Mouchtaris <[email protected]>
Date: 2024-03-20 (Wed, 20 Mar 2024)
Changed paths:
A
LayoutTests/fast/scrolling/mac/scrollable-area-size-for-overlay-scrollbars-expected.txt
A
LayoutTests/fast/scrolling/mac/scrollable-area-size-for-overlay-scrollbars.html
M Source/WebCore/page/LocalFrameView.cpp
M Source/WebCore/page/LocalFrameView.h
M Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
M Source/WebCore/platform/Scrollbar.cpp
M Source/WebCore/platform/Scrollbar.h
M Source/WebCore/platform/ScrollbarsController.cpp
M Source/WebCore/platform/ScrollbarsController.h
M Source/WebCore/platform/mac/ScrollbarsControllerMac.h
M Source/WebCore/platform/mac/ScrollbarsControllerMac.mm
M Source/WebCore/rendering/RenderLayerScrollableArea.cpp
M Source/WebCore/testing/Internals.cpp
M Source/WebCore/testing/Internals.h
M Source/WebCore/testing/Internals.idl
M Source/WebCore/testing/Internals.mm
M
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.h
M
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.mm
M
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollbarsController.h
M
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollbarsController.mm
M Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
Log Message:
-----------
REGRESSION (UI-side compositing) changing between non-overlay and overlay
scrollbars should adjust the size of the scrollable area
https://bugs.webkit.org/show_bug.cgi?id=263618
rdar://117507268
Reviewed by Simon Fraser.
This patch fixes a couple bugs related to switching back and forth dynamically
between
overlay and non-overlay scrollbars. First, setFrameScrollingNodeState() was not
always
called when switching the default, so iterate through each page and call
LocalFrameView::overlayScrollbarDefaultDidChange to force a scrolling commit to
plumb
across this state change. Second, when we get the state change on the
ui-process side,
we call _updateAllScrollerImpPairsForNewRecommendedScrollerStyle, which
notifies all the
scroller imp pairs in the process of the new style. On the web process side, we
had code
to adjust the scrollbar thickness and force a relayout, which now doesn't work
since there
are no NSScrollerImpPairs in the web process. Instead, replicate this code in
RemoteScrollbarsController and loop through the scrollable areas in the
FrameView. This
takes care of updating scrollable areas with overflow, while
https://github.com/WebKit/WebKit/pull/19561 will take care of updating
scrollable areas
without overflow. Also add some additional testing infrastructure to compare
the size of
the scrollable area before and after toggling scrollbar style.
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::usesOverlayScrollbars const):
(WebCore::LocalFrameView::overlayScrollbarDefaultDidChange):
* Source/WebCore/page/LocalFrameView.h:
* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::setFrameScrollingNodeState):
* Source/WebCore/page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::scrollingTreeNodeMarkScrollbarStyleChange):
(WebCore::ScrollingTree::scrollingTreeNodesWithScrollbarStyleChange):
(WebCore::ScrollingTree::clearScrollingTreeNodesWithScrollbarStyleChange):
* Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::markHasScrollbarStyleChange):
* Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h:
* Source/WebCore/page/scrolling/mac/ScrollerPairMac.mm:
(-[WebScrollerImpPairDelegateMac
scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
* Source/WebCore/platform/Scrollbar.cpp:
(WebCore::Scrollbar::updateScrollbarThickness):
* Source/WebCore/platform/Scrollbar.h:
* Source/WebCore/platform/ScrollbarsController.cpp:
(WebCore::ScrollbarsController::updateScrollbarsThickness):
* Source/WebCore/platform/ScrollbarsController.h:
(WebCore::ScrollbarsController::updateScrollerStyle):
* Source/WebCore/platform/mac/ScrollbarsControllerMac.h:
* Source/WebCore/platform/mac/ScrollbarsControllerMac.mm:
(WebCore::ScrollbarsControllerMac::updateScrollerStyle):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingNodesHaveScrollbarStyleChange):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
*
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.h:
*
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxyMac::didCommitLayerTree):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.h:
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm:
(WebKit::RemoteScrollingTreeMac::scrollingTreeNodeMarkScrollbarStyleChange):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollbarsController.h:
*
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollbarsController.mm:
(WebKit::macScrollbarTheme):
(WebKit::RemoteScrollbarsController::updateScrollerStyle):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.h:
*
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.messages.in:
*
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::scrollingTreeNodesHaveScrollbarsWithStyleChange):
* Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::scrollerStylePreferenceChanged):
Canonical link: https://commits.webkit.org/276439@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes