Use dark appearance scrollbar when page background is dark or document supports dark mode.
https://bugs.webkit.org/show_bug.cgi?id=190937
rdar://problem/
41225839
Reviewed by Beth Dakin.
Source/WebCore:
* page/FrameView.cpp:
(WebCore::FrameView::useDarkAppearance const): Added. Ask the document.
(WebCore::FrameView::paintScrollCorner): Set LocalDefaultSystemAppearance based
on the scrollbar overlay style too.
* page/FrameView.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::useDarkAppearance const): Added. Default to false.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollerImpDelegate effectiveAppearanceForScrollerImp:]): Added.
Ask the ScrollableArea if a dark appearance is desired.
Source/WebCore/PAL:
* pal/spi/mac/NSScrollerImpSPI.h: Added effectiveAppearanceForScrollerImp:.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237466
268f45cc-cd09-0410-ab3c-
d52691b4dbfc