Bug 213394

Summary: When in dark mode, switching to a light theme on the page results in invisible (light) scrollbars
Product: WebKit Reporter: Sean Patterson <sean_patterson>
Component: ScrollingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Major CC: aestes, rik, sean_patterson, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Mac   
OS: macOS 10.15   
URL: https://twitter.com/anthony_ricaud/status/1273751909573234689?s=20
Attachments:
Description Flags
Reduced Testcase none

Description Sean Patterson 2020-06-19 11:32:43 PDT
See  https://twitter.com/anthony_ricaud/status/1273751909573234689?s=20

It was reported on Release 108 (Safari 13.2, WebKit 15610.1.16.3) macOS 10.15.5

It appears the scrollbars aren't updating in while in dark mode. I have yet to confirm.
Comment 1 Radar WebKit Bug Importer 2020-06-19 11:42:22 PDT
<rdar://problem/64538999>
Comment 2 Anthony Ricaud 2020-06-19 12:59:33 PDT
Created attachment 402309 [details]
Reduced Testcase

With this reduced testcase, it seems the scrollbar color does not adapt to the background color in Dark mode with `color-scheme: light dark`.

If you remove `color-scheme: light dark`, the scrollbar always adapts to the background color.
Comment 3 Simon Fraser (smfr) 2020-06-19 13:36:52 PDT
When the page is in light mode, and the OS is dark mode, FrameView::recalculateScrollbarOverlayStyle() computes an overlay scrollbar style of ScrollbarOverlayStyleDefault, which I think means "use the OS default" which gives the wrong color.