Bug 231470

Summary: WKWebView scroll indicator color doesn't match expected when web view is non-opaque
Product: WebKit Reporter: me
Component: ScrollingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Trivial CC: akeerthi, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: iPhone / iPad   
OS: All   

Description me 2021-10-08 21:39:04 PDT
When a WKWebView on iOS has isOpaque set to NO, the scrollViewBackgroundColor method in WKWebViewIOS.mm short-circuits and always returns transparentBlack. This causes the scroll indicator to always use the black style (set in _updateScrollViewBackground), regardless of the page's background color.

This is easily reproducible by enabling dark mode in the simulator, running MobileMiniBrowser, and visiting a page that has a black background. The scroll indicators are not visible, because they have the black style.

In my (very) limited testing, just removing the !webView.opaque if statement results in the expected behavior in the above example, but I'm not sure if this change has other implications.
Comment 1 Radar WebKit Bug Importer 2021-10-15 21:40:14 PDT
<rdar://problem/84327005>