Use dark appearance scrollbar when page background is dark or document supports dark...
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Oct 2018 17:47:10 +0000 (17:47 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Oct 2018 17:47:10 +0000 (17:47 +0000)
commit5eab77aea912aea8a2242b6d25ee4ff38e902226
tree01cd8f5fec0f9f4b8014d1138741a653912b5563
parentfb4619733d828ed6e36264e7fc422e6b34025ac7
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
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/spi/mac/NSScrollerImpSPI.h
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/platform/ScrollableArea.h
Source/WebCore/platform/mac/ScrollAnimatorMac.mm