Bug 232295

Summary: webView.scrollView.indicatorStyle does not work on iOS 15
Product: WebKit Reporter: Daohan Chong <dh.chong>
Component: PlatformAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: akeerthi, florentmorin, hi, simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 239898    
Attachments:
Description Flags
The demo project (please run it using iOS 14 and 15 simulators respectively)
none
Patch none

Description Daohan Chong 2021-10-25 23:21:46 PDT
Created attachment 442467 [details]
The demo project (please run it using iOS 14 and 15 simulators respectively)

Previously, on iOS 14, this kind of code can work perfectly:

```swift
  override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
    super.traitCollectionDidChange(previousTraitCollection)

    switch traitCollection.userInterfaceStyle {
    case .light:
      webView.scrollView.indicatorStyle = .black
    case .dark:
      webView.scrollView.indicatorStyle = .white
    default:
      break
    }
  }
```

However, after iOS 15, it stopped from working. We cannot find any related documentation about customizing the color of the scroll indicator.
Comment 1 Simon Fraser (smfr) 2021-10-26 08:30:36 PDT
<rdar://82816423>
Comment 2 Devin Rousso 2021-11-04 17:23:31 PDT
Created attachment 443361 [details]
Patch
Comment 3 EWS 2021-11-08 12:54:17 PST
Committed r285424 (243980@main): <https://commits.webkit.org/243980@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 443361 [details].
Comment 4 Florent Morin 2022-07-05 01:03:11 PDT
This fix don't work on iOS when view is not opaque.