Scrollbar can show as white on white in dark mode on iOS.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jun 2019 23:55:18 +0000 (23:55 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jun 2019 23:55:18 +0000 (23:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=198772
rdar://problem/51516743

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateScrollViewBackground]): Use UIScrollViewIndicatorStyleBlack instead
of UIScrollViewIndicatorStyleDefault to prevent getting a white scrollbar in dark mode.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246341 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm

index cadb967..d8aa34c 100644 (file)
@@ -1,3 +1,15 @@
+2019-06-11  Timothy Hatcher  <timothy@apple.com>
+
+        Scrollbar can show as white on white in dark mode on iOS.
+        https://bugs.webkit.org/show_bug.cgi?id=198772
+        rdar://problem/51516743
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _updateScrollViewBackground]): Use UIScrollViewIndicatorStyleBlack instead
+        of UIScrollViewIndicatorStyleDefault to prevent getting a white scrollbar in dark mode.
+
 2019-06-11  Michael Catanzaro  <mcatanzaro@igalia.com>
 
         Unreviewed build warning fixes
index a1beb77..3b0fe3b 100644 (file)
@@ -1736,7 +1736,7 @@ static WebCore::Color scrollViewBackgroundColor(WKWebView *webView)
     if (lightness <= .5 && color.isVisible())
         [_scrollView setIndicatorStyle:UIScrollViewIndicatorStyleWhite];
     else
-        [_scrollView setIndicatorStyle:UIScrollViewIndicatorStyleDefault];
+        [_scrollView setIndicatorStyle:UIScrollViewIndicatorStyleBlack];
 }
 
 - (void)_videoControlsManagerDidChange