Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7ecbfb2d01acc3b2ff7dbec9f3e16e6e5f5a29d9
https://github.com/WebKit/WebKit/commit/7ecbfb2d01acc3b2ff7dbec9f3e16e6e5f5a29d9
Author: Aditya Keerthi <[email protected]>
Date: 2024-11-06 (Wed, 06 Nov 2024)
Changed paths:
M Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
M Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h
M Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp
M Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h
M Source/WebCore/page/scrolling/ScrollingStateNode.h
M Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp
M Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h
M Source/WebCore/page/scrolling/ScrollingStatePluginScrollingNode.cpp
M Source/WebCore/page/scrolling/ScrollingStatePluginScrollingNode.h
M Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp
M Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h
M Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h
M Source/WebCore/page/scrolling/mac/ScrollerMac.h
M Source/WebCore/page/scrolling/mac/ScrollerMac.mm
M Source/WebCore/page/scrolling/mac/ScrollerPairMac.h
M Source/WebCore/page/scrolling/mac/ScrollerPairMac.mm
M Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm
M
Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.serialization.in
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/mac/ScrollbarTests.mm
Log Message:
-----------
[macOS] Toggling dark mode does not update the scrollbar appearance on <body>
https://bugs.webkit.org/show_bug.cgi?id=282655
rdar://138108344
Reviewed by Wenson Hsieh and Abrar Rahman Protyasha.
With UI-side compositing, scrollbar appearance changes are propagated via
`ScrollableAreaParameters`. However, nothing actually tells the scrollbars
to repaint, resulting in a state mismatch between content and its scrollbars.
Fix by adding a new `ScrollingStateNodeProperty`, noting appearance changes,
and ultimately calling `-[NSScrollerImp setNeedsDisplay:]` to trigger a repaint.
* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::setScrollingNodeScrollableAreaGeometry):
The bit on `ScrollableAreaParameters` is now redundant with the information on
the state node.
* Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h:
* Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
* Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h:
* Source/WebCore/page/scrolling/ScrollingStateNode.h:
* Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
(WebCore::ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode):
* Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h:
* Source/WebCore/page/scrolling/ScrollingStatePluginScrollingNode.cpp:
(WebCore::ScrollingStatePluginScrollingNode::ScrollingStatePluginScrollingNode):
* Source/WebCore/page/scrolling/ScrollingStatePluginScrollingNode.h:
* Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setUseDarkAppearanceForScrollbars):
* Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h:
(WebCore::ScrollingStateScrollingNode::useDarkAppearanceForScrollbars const):
* Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h:
* Source/WebCore/page/scrolling/mac/ScrollerMac.h:
* Source/WebCore/page/scrolling/mac/ScrollerMac.mm:
(WebCore::ScrollerMac::setNeedsDisplay):
* Source/WebCore/page/scrolling/mac/ScrollerPairMac.h:
* Source/WebCore/page/scrolling/mac/ScrollerPairMac.mm:
(WebCore::ScrollerPairMac::useDarkAppearance const):
(WebCore::ScrollerPairMac::setUseDarkAppearance):
* Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
(WebCore::ScrollingTreeScrollingNodeDelegateMac::updateFromStateNode):
Ensure a repaint is triggered when appearance changes.
*
Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.serialization.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/mac/ScrollbarTests.mm: Added.
(TestWebKitAPI::scrollbarLuminanceForWebView):
(TestWebKitAPI::TEST(ScrollbarTests,
AppearanceChangeAfterSystemAppearanceChange)):
Add an API test to verify that the scrollbar takes on the correct appearance.
Previously, the scrollbar would remain white after switching to dark mode,
resulting in a luminance close to 1. The test asserts that the scrollbar is a
dark color.
Canonical link: https://commits.webkit.org/286229@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