Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d28e96e8be48eae916334ccb91fa1691ba45a0ef
https://github.com/WebKit/WebKit/commit/d28e96e8be48eae916334ccb91fa1691ba45a0ef
Author: Aditya Keerthi <[email protected]>
Date: 2024-02-29 (Thu, 29 Feb 2024)
Changed paths:
A LayoutTests/fast/forms/listbox-scrollbar-dark-mode-expected-mismatch.html
A LayoutTests/fast/forms/listbox-scrollbar-dark-mode.html
M LayoutTests/platform/ios/TestExpectations
M LayoutTests/platform/wincairo/TestExpectations
M Source/WebCore/rendering/RenderListBox.cpp
M Source/WebCore/rendering/RenderListBox.h
Log Message:
-----------
List box scrollbars do not match the used color scheme
https://bugs.webkit.org/show_bug.cgi?id=270281
rdar://123807167
Reviewed by Abrar Rahman Protyasha and Richard Robinson.
Dark appearance scrollbars are keyed off of
`ScrollableArea::useDarkAppearanceForScrollbars`, which consults the virtual
method `ScrollableArea::useDarkAppearance`. By default, that method returns
`false`, and is not overridden on `RenderListBox`. Consequently, on platforms
where `<select multiple>` is rendered as a list box, the scrollbar always has
a light appearance.
Fix by overriding `useDarkAppearance` on `RenderListBox` and returning the value
of `RenderBlockFlow::useDarkAppearance`, which consults the used color scheme of
the renderer.
* LayoutTests/fast/forms/listbox-scrollbar-dark-mode-expected-mismatch.html:
Added.
* LayoutTests/fast/forms/listbox-scrollbar-dark-mode.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/wincairo/TestExpectations:
* Source/WebCore/rendering/RenderListBox.cpp:
(WebCore::RenderListBox::useDarkAppearance const):
* Source/WebCore/rendering/RenderListBox.h:
Canonical link: https://commits.webkit.org/275505@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