Corner of two scroll bars is white with dark mode enabled.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Jun 2018 01:21:13 +0000 (01:21 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Jun 2018 01:21:13 +0000 (01:21 +0000)
commit7c9580ef2651fc4974530f5ed9931f456ee6f89e
treef2c91dd3d225115ee5016abb9acc4dce2add4d3f
parent1fd6c8c9ac8d6d6d159a1d331edfdce5724a338c
Corner of two scroll bars is white with dark mode enabled.
https://bugs.webkit.org/show_bug.cgi?id=186819
rdar://problem/40434350

Reviewed by Tim Horton.

Source/WebCore:

* Configurations/WebCore.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::paint): Added LocalDefaultSystemAppearance.
* page/Page.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::paintScrollCorner): Dropped ScrollView argument.
* platform/ScrollbarTheme.h:
(WebCore::ScrollbarTheme::paintScrollCorner): Ditto.
* platform/ScrollbarThemeComposite.cpp:
(WebCore::ScrollbarThemeComposite::paintScrollCorner): Deleted. Default is the same.
* platform/ScrollbarThemeComposite.h:
* platform/mac/LocalDefaultSystemAppearance.h:
* platform/mac/LocalDefaultSystemAppearance.mm:
(WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance): Added recursion early return.
(WebCore::LocalDefaultSystemAppearance::~LocalDefaultSystemAppearance): Ditto.
* platform/mac/ScrollbarThemeMac.h:
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::paintScrollCorner): Added.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintScrollCorner): Call ScrollbarTheme::paintScrollCorner.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintContents): Added LocalDefaultSystemAppearance.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::paintContents): Added LocalDefaultSystemAppearance.
* rendering/RenderScrollbarTheme.cpp:
(WebCore::RenderScrollbarTheme::paintScrollCorner): Call ScrollbarTheme::paintScrollCorner.
* rendering/RenderScrollbarTheme.h:
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::draw): Added LocalDefaultSystemAppearance.

Source/WebCore/PAL:

* PAL.xcodeproj/project.pbxproj:
* pal/spi/mac/CoreUISPI.h: Added.
* pal/spi/mac/NSAppearanceSPI.h: Added.

Source/WebKit:

* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView drawRect:]): Added LocalDefaultSystemAppearance.
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::renderedImage): Ditto.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::paintControlForLayerInContext): Ditto. Dropped ScrollView argument.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::drawRect): Added LocalDefaultSystemAppearance.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Configurations/WebCore.xcconfig
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
Source/WebCore/PAL/pal/spi/mac/CoreUISPI.h [new file with mode: 0644]
Source/WebCore/PAL/pal/spi/mac/NSAppearanceSPI.h [new file with mode: 0644]
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/inspector/InspectorOverlay.cpp
Source/WebCore/page/Page.h
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/platform/ScrollbarTheme.h
Source/WebCore/platform/ScrollbarThemeComposite.cpp
Source/WebCore/platform/ScrollbarThemeComposite.h
Source/WebCore/platform/mac/LocalDefaultSystemAppearance.h
Source/WebCore/platform/mac/LocalDefaultSystemAppearance.mm
Source/WebCore/platform/mac/ScrollbarThemeMac.h
Source/WebCore/platform/mac/ScrollbarThemeMac.mm
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderScrollbarTheme.cpp
Source/WebCore/rendering/RenderScrollbarTheme.h
Source/WebCore/svg/graphics/SVGImage.cpp
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/mac/WKPrintingView.mm
Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp
Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm
Source/WebKit/WebProcess/WebPage/WebPage.cpp