Title: [233116] trunk/Source
Revision
233116
Author
[email protected]
Date
2018-06-22 18:21:13 -0700 (Fri, 22 Jun 2018)

Log Message

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.

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (233115 => 233116)


--- trunk/Source/WebCore/ChangeLog	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/ChangeLog	2018-06-23 01:21:13 UTC (rev 233116)
@@ -1,3 +1,42 @@
+2018-06-22  Timothy Hatcher  <[email protected]>
+
+        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.
+
+        * 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.
+
 2018-06-22  Tim Horton  <[email protected]>
 
         Make it possible to add a border around loading or failed-to-load images

Modified: trunk/Source/WebCore/Configurations/WebCore.xcconfig (233115 => 233116)


--- trunk/Source/WebCore/Configurations/WebCore.xcconfig	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/Configurations/WebCore.xcconfig	2018-06-23 01:21:13 UTC (rev 233116)
@@ -80,6 +80,9 @@
 WK_CARBON_LDFLAGS = $(WK_CARBON_LDFLAGS_$(WK_PLATFORM_NAME));
 WK_CARBON_LDFLAGS_macosx = -framework Carbon;
 
+WK_CORE_UI_LDFLAGS = $(WK_CORE_UI_LDFLAGS_$(WK_PLATFORM_NAME));
+WK_CORE_UI_LDFLAGS_macosx = -framework CoreUI;
+
 WK_DATA_DETECTORS_CORE_LDFLAGS = $(WK_DATA_DETECTORS_CORE_LDFLAGS_$(WK_PLATFORM_NAME));
 WK_DATA_DETECTORS_CORE_LDFLAGS_macosx = -framework DataDetectorsCore;
 
@@ -126,7 +129,7 @@
 WK_URL_FORMATTING_LDFLAGS_YES = -framework URLFormatting;
 
 // FIXME: Reduce the number of allowable_clients <rdar://problem/31823969>
-OTHER_LDFLAGS = $(inherited) $(WK_RELOCATABLE_FRAMEWORK_LDFLAGS) $(WK_UNDEFINED_SYMBOLS_LDFLAGS) -lsqlite3 -lobjc -lANGLE -allowable_client WebCoreTestSupport -allowable_client WebKitLegacy -force_load $(BUILT_PRODUCTS_DIR)/libPAL.a -framework CFNetwork -framework CoreAudio -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework Metal $(OTHER_LDFLAGS_PLATFORM_$(WK_COCOA_TOUCH)) $(OTHER_LDFLAGS_PLATFORM_$(WK_PLATFORM_NAME)) $(WK_APPKIT_LDFLAGS) $(WK_APPSUPPORT_LDFLAGS) $(WK_AUDIO_UNIT_LDFLAGS) $(WK_CARBON_LDFLAGS)  $(WK_DATA_DETECTORS_CORE_LDFLAGS) $(WK_DEVICE_IDENTITY_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_IOSURFACE_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_OPENGL_LDFLAGS) $(WK_SYSTEM_CONFIGURATION_LDFLAGS) $(WK_SYSTEM_PREVIEW_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS);
+OTHER_LDFLAGS = $(inherited) $(WK_RELOCATABLE_FRAMEWORK_LDFLAGS) $(WK_UNDEFINED_SYMBOLS_LDFLAGS) -lsqlite3 -lobjc -lANGLE -allowable_client WebCoreTestSupport -allowable_client WebKitLegacy -force_load $(BUILT_PRODUCTS_DIR)/libPAL.a -framework CFNetwork -framework CoreAudio -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework Metal $(OTHER_LDFLAGS_PLATFORM_$(WK_COCOA_TOUCH)) $(OTHER_LDFLAGS_PLATFORM_$(WK_PLATFORM_NAME)) $(WK_APPKIT_LDFLAGS) $(WK_APPSUPPORT_LDFLAGS) $(WK_AUDIO_UNIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_CORE_UI_LDFLAGS) $(WK_DATA_DETECTORS_CORE_LDFLAGS) $(WK_DEVICE_IDENTITY_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_IOSURFACE_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_OPENGL_LDFLAGS) $(WK_SYSTEM_CONFIGURATION_LDFLAGS) $(WK_SYSTEM_PREVIEW_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS);
 
 OTHER_LDFLAGS_PLATFORM_cocoatouch = -allowable_client WebKit -allowable_client iTunesU -allowable_client Casablanca -allowable_client Remote -allowable_client TVBooks -allowable_client DumpRenderTree -allowable_client WebKitTestRunner -allowable_client TestWebKitAPI;
 OTHER_LDFLAGS_PLATFORM_macosx = -sub_library libobjc -umbrella WebKit;

Modified: trunk/Source/WebCore/PAL/ChangeLog (233115 => 233116)


--- trunk/Source/WebCore/PAL/ChangeLog	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/PAL/ChangeLog	2018-06-23 01:21:13 UTC (rev 233116)
@@ -1,3 +1,15 @@
+2018-06-22  Timothy Hatcher  <[email protected]>
+
+        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.
+
+        * PAL.xcodeproj/project.pbxproj:
+        * pal/spi/mac/CoreUISPI.h: Added.
+        * pal/spi/mac/NSAppearanceSPI.h: Added.
+
 2018-06-21  Ryan Haddad  <[email protected]>
 
         Unreviewed attempt to fix the build after r233052.

Modified: trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj (233115 => 233116)


--- trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj	2018-06-23 01:21:13 UTC (rev 233116)
@@ -105,6 +105,8 @@
 		1C09D0581E31C57E00725F18 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C09D0571E31C57E00725F18 /* config.h */; };
 		1C4876D81F8D7F4E00CCEEBD /* Logging.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C4876D61F8D7F4E00CCEEBD /* Logging.cpp */; };
 		1C4876D91F8D7F4E00CCEEBD /* Logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C4876D71F8D7F4E00CCEEBD /* Logging.h */; };
+		1CCEE4F520D871930047B097 /* CoreUISPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CCEE4F420D871930047B097 /* CoreUISPI.h */; };
+		1CCEE4F720D8743F0047B097 /* NSAppearanceSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CCEE4F620D8743F0047B097 /* NSAppearanceSPI.h */; };
 		2D02E93C2056FAA700A13797 /* AudioToolboxSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D02E93B2056FAA700A13797 /* AudioToolboxSPI.h */; };
 		31308B1420A21705003FB929 /* SystemPreviewSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 31308B1320A21705003FB929 /* SystemPreviewSPI.h */; };
 		570AB8F120AE2E8D00B8BE87 /* SecKeyProxySPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 570AB8F020AE2E8D00B8BE87 /* SecKeyProxySPI.h */; };
@@ -252,6 +254,8 @@
 		1C4876DC1F8D7FC600CCEEBD /* LogMacros.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LogMacros.h; sourceTree = "<group>"; };
 		1C67CEA11E32EDA800F80F2E /* FeatureDefines.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = FeatureDefines.xcconfig; sourceTree = "<group>"; };
 		1C67CEA21E32EE2600F80F2E /* Version.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = "<group>"; };
+		1CCEE4F420D871930047B097 /* CoreUISPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreUISPI.h; sourceTree = "<group>"; };
+		1CCEE4F620D8743F0047B097 /* NSAppearanceSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSAppearanceSPI.h; sourceTree = "<group>"; };
 		2D02E93B2056FAA700A13797 /* AudioToolboxSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioToolboxSPI.h; sourceTree = "<group>"; };
 		31308B1320A21705003FB929 /* SystemPreviewSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SystemPreviewSPI.h; sourceTree = "<group>"; };
 		37119A7820CCB5FF002C6DC9 /* WebKitTargetConditionals.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = WebKitTargetConditionals.xcconfig; sourceTree = "<group>"; };
@@ -417,6 +421,7 @@
 			isa = PBXGroup;
 			children = (
 				0C7785701F45130F00F4EBB6 /* AVFoundationSPI.h */,
+				1CCEE4F420D871930047B097 /* CoreUISPI.h */,
 				0C7785711F45130F00F4EBB6 /* DataDetectorsSPI.h */,
 				A102658D1F567E9D00B4C844 /* HIServicesSPI.h */,
 				A10265881F56747A00B4C844 /* HIToolboxSPI.h */,
@@ -424,6 +429,7 @@
 				0C7785731F45130F00F4EBB6 /* MediaRemoteSPI.h */,
 				A1F55DCE1F5528EC00EDB75F /* MetadataSPI.h */,
 				0C7785741F45130F00F4EBB6 /* NSAccessibilitySPI.h */,
+				1CCEE4F620D8743F0047B097 /* NSAppearanceSPI.h */,
 				0C7785751F45130F00F4EBB6 /* NSApplicationSPI.h */,
 				A1175B4A1F6B2D7E00C4B9F0 /* NSCellSPI.h */,
 				0C7785761F45130F00F4EBB6 /* NSEventSPI.h */,
@@ -629,6 +635,7 @@
 				0CF99CA91F738437007EE793 /* CoreMediaSoftLink.h in Headers */,
 				0C2DA0721F33CA8400DBC317 /* CoreMediaSPI.h in Headers */,
 				0C2DA1401F3BEB4900DBC317 /* CoreTextSPI.h in Headers */,
+				1CCEE4F520D871930047B097 /* CoreUISPI.h in Headers */,
 				0C5AF9191F43A4C7002EAC02 /* CoreUISPI.h in Headers */,
 				1C09D0531E31C44100725F18 /* CryptoDigest.h in Headers */,
 				0C2DA1411F3BEB4900DBC317 /* DataDetectorsCoreSPI.h in Headers */,
@@ -660,6 +667,7 @@
 				0C5AF91E1F43A4C7002EAC02 /* MobileGestaltSPI.h in Headers */,
 				0C2DA1491F3BEB4900DBC317 /* NEFilterSourceSPI.h in Headers */,
 				0C77858D1F45130F00F4EBB6 /* NSAccessibilitySPI.h in Headers */,
+				1CCEE4F720D8743F0047B097 /* NSAppearanceSPI.h in Headers */,
 				0C77858E1F45130F00F4EBB6 /* NSApplicationSPI.h in Headers */,
 				0C2DA14A1F3BEB4900DBC317 /* NSAttributedStringSPI.h in Headers */,
 				0C2DA14B1F3BEB4900DBC317 /* NSButtonCellSPI.h in Headers */,

Copied: trunk/Source/WebCore/PAL/pal/spi/mac/CoreUISPI.h (from rev 233115, trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.h) (0 => 233116)


--- trunk/Source/WebCore/PAL/pal/spi/mac/CoreUISPI.h	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/CoreUISPI.h	2018-06-23 01:21:13 UTC (rev 233116)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2018 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#pragma once
+
+#if USE(APPLE_INTERNAL_SDK)
+
+#include <CoreUI/CoreUI.h>
+
+#else
+
+extern const CFStringRef kCUIWidgetKey;
+extern const CFStringRef kCUIIsFlippedKey;
+
+extern const CFStringRef kCUIWidgetScrollBarTrackCorner;
+
+#endif

Copied: trunk/Source/WebCore/PAL/pal/spi/mac/NSAppearanceSPI.h (from rev 233115, trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.h) (0 => 233116)


--- trunk/Source/WebCore/PAL/pal/spi/mac/NSAppearanceSPI.h	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/NSAppearanceSPI.h	2018-06-23 01:21:13 UTC (rev 233116)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2018 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if USE(APPKIT)
+
+@interface NSAppearance ()
+
+- (void)_drawInRect:(NSRect)rect context:(CGContextRef)context options:(NSDictionary *)options;
+
+@end
+
+#endif // USE(APPKIT)

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (233115 => 233116)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2018-06-23 01:21:13 UTC (rev 233116)
@@ -1192,7 +1192,7 @@
 		43EDD67F1B485DBF00640E75 /* CombinedFiltersAlphabet.h in Headers */ = {isa = PBXBuildFile; fileRef = 43EDD67D1B485DBF00640E75 /* CombinedFiltersAlphabet.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		4415292E0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4415292C0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		443918001A91B2F8006E04F2 /* QuickLookSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 443917FE1A91B2F8006E04F2 /* QuickLookSoftLink.h */; };
-		445775E520472F73008DCE5D /* LocalDefaultSystemAppearance.h in Headers */ = {isa = PBXBuildFile; fileRef = 445775E420472F73008DCE5D /* LocalDefaultSystemAppearance.h */; };
+		445775E520472F73008DCE5D /* LocalDefaultSystemAppearance.h in Headers */ = {isa = PBXBuildFile; fileRef = 445775E420472F73008DCE5D /* LocalDefaultSystemAppearance.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		445775EA2047303C008DCE5D /* LocalDefaultSystemAppearance.mm in Sources */ = {isa = PBXBuildFile; fileRef = 445775E92047303B008DCE5D /* LocalDefaultSystemAppearance.mm */; };
 		4471710E205AF945000A116E /* MediaQueryParserContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 4471710C205AF945000A116E /* MediaQueryParserContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		447958041643B49A001E0A7F /* ParsedContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 447958031643B47B001E0A7F /* ParsedContentType.h */; settings = {ATTRIBUTES = (Private, ); }; };

Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (233115 => 233116)


--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2018-06-23 01:21:13 UTC (rev 233116)
@@ -59,6 +59,9 @@
 #include <_javascript_Core/InspectorProtocolObjects.h>
 #include <wtf/JSONValues.h>
 
+#if PLATFORM(MAC)
+#include "LocalDefaultSystemAppearance.h"
+#endif
 
 namespace WebCore {
 
@@ -177,6 +180,10 @@
     if (!shouldShowOverlay())
         return;
 
+#if PLATFORM(MAC)
+    LocalDefaultSystemAppearance localAppearance(m_page.useSystemAppearance(), m_page.defaultAppearance());
+#endif
+
     GraphicsContextStateSaver stateSaver(context);
     FrameView* view = overlayPage()->mainFrame().view();
     view->updateLayoutAndStyleIfNeededRecursive();

Modified: trunk/Source/WebCore/page/Page.h (233115 => 233116)


--- trunk/Source/WebCore/page/Page.h	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/page/Page.h	2018-06-23 01:21:13 UTC (rev 233116)
@@ -342,7 +342,7 @@
     bool useSystemAppearance() const { return m_useSystemAppearance; }
     WEBCORE_EXPORT void setUseSystemAppearance(bool);
     
-    bool defaultAppearance() const;
+    WEBCORE_EXPORT bool defaultAppearance() const;
     WEBCORE_EXPORT void setDefaultAppearance(bool);
 
 #if ENABLE(TEXT_AUTOSIZING)

Modified: trunk/Source/WebCore/platform/ScrollView.cpp (233115 => 233116)


--- trunk/Source/WebCore/platform/ScrollView.cpp	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/platform/ScrollView.cpp	2018-06-23 01:21:13 UTC (rev 233116)
@@ -1122,7 +1122,7 @@
 
 void ScrollView::paintScrollCorner(GraphicsContext& context, const IntRect& cornerRect)
 {
-    ScrollbarTheme::theme().paintScrollCorner(this, context, cornerRect);
+    ScrollbarTheme::theme().paintScrollCorner(context, cornerRect);
 }
 
 void ScrollView::paintScrollbar(GraphicsContext& context, Scrollbar& bar, const IntRect& rect)

Modified: trunk/Source/WebCore/platform/ScrollbarTheme.h (233115 => 233116)


--- trunk/Source/WebCore/platform/ScrollbarTheme.h	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/platform/ScrollbarTheme.h	2018-06-23 01:21:13 UTC (rev 233116)
@@ -84,7 +84,7 @@
 
     virtual void invalidatePart(Scrollbar&, ScrollbarPart) { }
 
-    virtual void paintScrollCorner(ScrollView*, GraphicsContext& context, const IntRect& cornerRect) { defaultPaintScrollCorner(context, cornerRect); }
+    virtual void paintScrollCorner(GraphicsContext& context, const IntRect& cornerRect) { defaultPaintScrollCorner(context, cornerRect); }
     static void defaultPaintScrollCorner(GraphicsContext& context, const IntRect& cornerRect) { context.fillRect(cornerRect, Color::white); }
 
     virtual void paintTickmarks(GraphicsContext&, Scrollbar&, const IntRect&) { }

Modified: trunk/Source/WebCore/platform/ScrollbarThemeComposite.cpp (233115 => 233116)


--- trunk/Source/WebCore/platform/ScrollbarThemeComposite.cpp	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/platform/ScrollbarThemeComposite.cpp	2018-06-23 01:21:13 UTC (rev 233116)
@@ -260,11 +260,6 @@
     return (scrollbar.orientation() == HorizontalScrollbar) ? constrainedTrackRect.width() : constrainedTrackRect.height();
 }
 
-void ScrollbarThemeComposite::paintScrollCorner(ScrollView*, GraphicsContext& context, const IntRect& cornerRect)
-{
-    context.fillRect(cornerRect, Color::white);
-}
-
 IntRect ScrollbarThemeComposite::thumbRect(Scrollbar& scrollbar)
 {
     if (!hasThumb(scrollbar))

Modified: trunk/Source/WebCore/platform/ScrollbarThemeComposite.h (233115 => 233116)


--- trunk/Source/WebCore/platform/ScrollbarThemeComposite.h	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/platform/ScrollbarThemeComposite.h	2018-06-23 01:21:13 UTC (rev 233116)
@@ -44,7 +44,6 @@
     int thumbLength(Scrollbar&) override;
     int trackPosition(Scrollbar&) override;
     int trackLength(Scrollbar&) override;
-    void paintScrollCorner(ScrollView*, GraphicsContext&, const IntRect& cornerRect) override;
     void paintOverhangAreas(ScrollView&, GraphicsContext&, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect) override;
 
     virtual bool hasButtons(Scrollbar&) = 0;

Modified: trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.h (233115 => 233116)


--- trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.h	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.h	2018-06-23 01:21:13 UTC (rev 233116)
@@ -39,8 +39,8 @@
 class LocalDefaultSystemAppearance {
     WTF_MAKE_NONCOPYABLE(LocalDefaultSystemAppearance);
 public:
-    LocalDefaultSystemAppearance(bool useSystemAppearance, bool useDefaultAppearance);
-    ~LocalDefaultSystemAppearance();
+    WEBCORE_EXPORT LocalDefaultSystemAppearance(bool useSystemAppearance, bool useDefaultAppearance);
+    WEBCORE_EXPORT ~LocalDefaultSystemAppearance();
 private:
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
     RetainPtr<NSAppearance> m_savedSystemAppearance;

Modified: trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.mm (233115 => 233116)


--- trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.mm	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.mm	2018-06-23 01:21:13 UTC (rev 233116)
@@ -31,9 +31,16 @@
 
 namespace WebCore {
 
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+static size_t recursionCount = 0;
+#endif
+
 LocalDefaultSystemAppearance::LocalDefaultSystemAppearance(bool useSystemAppearance, bool useDefaultAppearance)
 {
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+    if (recursionCount++)
+        return;
+
     m_savedSystemAppearance = [NSAppearance currentAppearance];
     [NSAppearance setCurrentAppearance:[NSAppearance appearanceNamed:(!useSystemAppearance || useDefaultAppearance ? NSAppearanceNameAqua : NSAppearanceNameDarkAqua)]];
 #else
@@ -45,6 +52,9 @@
 LocalDefaultSystemAppearance::~LocalDefaultSystemAppearance()
 {
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+    if (--recursionCount)
+        return;
+
     [NSAppearance setCurrentAppearance:m_savedSystemAppearance.get()];
 #endif
 }

Modified: trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.h (233115 => 233116)


--- trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.h	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.h	2018-06-23 01:21:13 UTC (rev 233116)
@@ -41,6 +41,7 @@
     void updateEnabledState(Scrollbar&) override;
 
     bool paint(Scrollbar&, GraphicsContext&, const IntRect& damageRect) override;
+    void paintScrollCorner(GraphicsContext&, const IntRect& cornerRect) override;
 
     int scrollbarThickness(ScrollbarControlSize = RegularScrollbar, ScrollbarExpansionState = ScrollbarExpansionState::Expanded) override;
     

Modified: trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm (233115 => 233116)


--- trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm	2018-06-23 01:21:13 UTC (rev 233116)
@@ -38,6 +38,8 @@
 #import "ScrollView.h"
 #import <Carbon/Carbon.h>
 #import <pal/spi/cg/CoreGraphicsSPI.h>
+#import <pal/spi/mac/CoreUISPI.h>
+#import <pal/spi/mac/NSAppearanceSPI.h>
 #import <pal/spi/mac/NSScrollerImpSPI.h>
 #import <wtf/BlockObjCExceptions.h>
 #import <wtf/HashMap.h>
@@ -554,7 +556,7 @@
         return true;
 
     SetForScope<bool> isCurrentlyDrawingIntoLayer(g_isCurrentlyDrawingIntoLayer, context.isCALayerContext());
-    
+
     GraphicsContextStateSaver stateSaver(context);
     context.clip(damageRect);
     context.translate(scrollbar.frameRect().location());
@@ -564,6 +566,15 @@
     return true;
 }
 
+void ScrollbarThemeMac::paintScrollCorner(GraphicsContext& context, const IntRect& cornerRect)
+{
+    LocalCurrentGraphicsContext localContext(context);
+
+    auto cornerDrawingOptions = @{ (__bridge NSString *)kCUIWidgetKey: (__bridge NSString *)kCUIWidgetScrollBarTrackCorner,
+        (__bridge NSString *)kCUIIsFlippedKey: (__bridge NSNumber *)kCFBooleanTrue };
+    [[NSAppearance currentAppearance] _drawInRect:cornerRect context:localContext.cgContext() options:cornerDrawingOptions];
+}
+
 #if ENABLE(RUBBER_BANDING)
 static RetainPtr<CGColorRef> linenBackgroundColor()
 {

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (233115 => 233116)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2018-06-23 01:21:13 UTC (rev 233116)
@@ -3710,10 +3710,10 @@
         return;
     }
 
-    // We don't want to paint white if we have overlay scrollbars, since we need
+    // We don't want to paint a corner if we have overlay scrollbars, since we need
     // to see what is behind it.
     if (!hasOverlayScrollbars())
-        context.fillRect(absRect, Color::white);
+        ScrollbarTheme::theme().paintScrollCorner(context, absRect);
 }
 
 void RenderLayer::drawPlatformResizerImage(GraphicsContext& context, const LayoutRect& resizerCornerRect)

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (233115 => 233116)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2018-06-23 01:21:13 UTC (rev 233116)
@@ -73,6 +73,10 @@
 #include "RuntimeApplicationChecks.h"
 #endif
 
+#if PLATFORM(MAC)
+#include "LocalDefaultSystemAppearance.h"
+#endif
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -2580,6 +2584,10 @@
     renderer().page().setIsPainting(true);
 #endif
 
+#if PLATFORM(MAC)
+    LocalDefaultSystemAppearance localAppearance(renderer().page().useSystemAppearance(), renderer().page().defaultAppearance());
+#endif
+
     // The dirtyRect is in the coords of the painting root.
     FloatRect adjustedClipRect = clip;
     adjustedClipRect.move(m_subpixelOffsetFromRenderer);

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (233115 => 233116)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2018-06-23 01:21:13 UTC (rev 233116)
@@ -70,6 +70,10 @@
 #include "RenderScrollbar.h"
 #endif
 
+#if PLATFORM(MAC)
+#include "LocalDefaultSystemAppearance.h"
+#endif
+
 #if ENABLE(TREE_DEBUGGING)
 #include "RenderTreeAsText.h"
 #endif
@@ -2769,6 +2773,10 @@
 
 void RenderLayerCompositor::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, GraphicsLayerPaintingPhase, const FloatRect& clip, GraphicsLayerPaintBehavior)
 {
+#if PLATFORM(MAC)
+    LocalDefaultSystemAppearance localAppearance(page().useSystemAppearance(), page().defaultAppearance());
+#endif
+
     IntRect pixelSnappedRectForIntegralPositionedItems = snappedIntRect(LayoutRect(clip));
     if (graphicsLayer == layerForHorizontalScrollbar())
         paintScrollbar(m_renderView.frameView().horizontalScrollbar(), context, pixelSnappedRectForIntegralPositionedItems);

Modified: trunk/Source/WebCore/rendering/RenderScrollbarTheme.cpp (233115 => 233116)


--- trunk/Source/WebCore/rendering/RenderScrollbarTheme.cpp	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/rendering/RenderScrollbarTheme.cpp	2018-06-23 01:21:13 UTC (rev 233116)
@@ -126,10 +126,9 @@
     }
 }
 
-void RenderScrollbarTheme::paintScrollCorner(ScrollView*, GraphicsContext& context, const IntRect& cornerRect)
+void RenderScrollbarTheme::paintScrollCorner(GraphicsContext& context, const IntRect& cornerRect)
 {
-    // FIXME: Implement.
-    context.fillRect(cornerRect, Color::white);
+    ScrollbarTheme::theme().paintScrollCorner(context, cornerRect);
 }
 
 void RenderScrollbarTheme::paintScrollbarBackground(GraphicsContext& context, Scrollbar& scrollbar)

Modified: trunk/Source/WebCore/rendering/RenderScrollbarTheme.h (233115 => 233116)


--- trunk/Source/WebCore/rendering/RenderScrollbarTheme.h	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/rendering/RenderScrollbarTheme.h	2018-06-23 01:21:13 UTC (rev 233116)
@@ -43,7 +43,7 @@
 
     bool supportsControlTints() const override { return true; }
 
-    void paintScrollCorner(ScrollView*, GraphicsContext&, const IntRect& cornerRect) override;
+    void paintScrollCorner(GraphicsContext&, const IntRect& cornerRect) override;
 
     ScrollbarButtonPressAction handleMousePressEvent(Scrollbar& scrollbar, const PlatformMouseEvent& event, ScrollbarPart pressedPart) override { return ScrollbarTheme::theme().handleMousePressEvent(scrollbar, event, pressedPart); }
 

Modified: trunk/Source/WebCore/svg/graphics/SVGImage.cpp (233115 => 233116)


--- trunk/Source/WebCore/svg/graphics/SVGImage.cpp	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.cpp	2018-06-23 01:21:13 UTC (rev 233116)
@@ -60,6 +60,10 @@
 #include <_javascript_Core/JSLock.h>
 #include <wtf/text/TextStream.h>
 
+#if PLATFORM(MAC)
+#include "LocalDefaultSystemAppearance.h"
+#endif
+
 #if USE(DIRECT2D)
 #include "COMPtr.h"
 #include <d2d1.h>
@@ -319,6 +323,10 @@
             view->layoutContext().layout();
     }
 
+#if PLATFORM(MAC)
+    LocalDefaultSystemAppearance localAppearance(m_page->useSystemAppearance(), m_page->defaultAppearance());
+#endif
+
     view->paint(context, intersection(context.clipBounds(), enclosingIntRect(srcRect)));
 
     if (compositingRequiresTransparencyLayer)

Modified: trunk/Source/WebKit/ChangeLog (233115 => 233116)


--- trunk/Source/WebKit/ChangeLog	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebKit/ChangeLog	2018-06-23 01:21:13 UTC (rev 233116)
@@ -1,3 +1,20 @@
+2018-06-22  Timothy Hatcher  <[email protected]>
+
+        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.
+
+        * 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.
+
 2018-06-22  Tim Horton  <[email protected]>
 
         Make it possible to add a border around loading or failed-to-load images

Modified: trunk/Source/WebKit/UIProcess/mac/WKPrintingView.mm (233115 => 233116)


--- trunk/Source/WebKit/UIProcess/mac/WKPrintingView.mm	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebKit/UIProcess/mac/WKPrintingView.mm	2018-06-23 01:21:13 UTC (rev 233116)
@@ -36,6 +36,7 @@
 #import "WebPageProxy.h"
 #import <PDFKit/PDFKit.h>
 #import <WebCore/GraphicsContext.h>
+#import <WebCore/LocalDefaultSystemAppearance.h>
 #import <WebCore/WebCoreObjCExtras.h>
 #import <wtf/RunLoop.h>
 
@@ -563,9 +564,12 @@
 
     ASSERT(_printOperation == [NSPrintOperation currentOperation]);
 
-    if (!_webFrame->page())
+    auto* page = _webFrame->page();
+    if (!page)
         return;
 
+    LocalDefaultSystemAppearance localAppearance(page->useSystemAppearance(), page->defaultAppearance());
+
     if ([self _isPrintingPreview]) {
         [self _drawPreview:nsRect];
         return;

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp (233115 => 233116)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp	2018-06-23 01:21:13 UTC (rev 233116)
@@ -45,6 +45,10 @@
 #include <wtf/HashMap.h>
 #include <wtf/NeverDestroyed.h>
 
+#if PLATFORM(MAC)
+#include <WebCore/LocalDefaultSystemAppearance.h>
+#endif
+
 using namespace WebCore;
 
 namespace WebKit {
@@ -120,6 +124,10 @@
     if (!frameView)
         return nullptr;
 
+#if PLATFORM(MAC)
+    LocalDefaultSystemAppearance localAppearance(frame->page()->useSystemAppearance(), frame->page()->defaultAppearance());
+#endif
+
     Ref<Frame> protector(*frame);
 
     VisibleSelection oldSelection = frame->selection().selection();

Modified: trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm (233115 => 233116)


--- trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm	2018-06-23 01:21:13 UTC (rev 233116)
@@ -86,6 +86,10 @@
 #import <pal/spi/mac/NSMenuSPI.h>
 #import <wtf/UUID.h>
 
+#if PLATFORM(MAC)
+#include <WebCore/LocalDefaultSystemAppearance.h>
+#endif
+
 using namespace WebCore;
 
 // Set overflow: hidden on the annotation container so <input> elements scrolled out of view don't show
@@ -1209,20 +1213,25 @@
 
 void PDFPlugin::paintControlForLayerInContext(CALayer *layer, CGContextRef context)
 {
+#if PLATFORM(MAC)
+    auto* page = webFrame()->coreFrame()->page();
+    LocalDefaultSystemAppearance localAppearance(page->useSystemAppearance(), page->defaultAppearance());
+#endif
+
     GraphicsContext graphicsContext(context);
     GraphicsContextStateSaver stateSaver(graphicsContext);
-    
+
     graphicsContext.setIsCALayerContext(true);
-    
+
     if (layer == m_scrollCornerLayer) {
         IntRect scrollCornerRect = this->scrollCornerRect();
         graphicsContext.translate(-scrollCornerRect.x(), -scrollCornerRect.y());
-        ScrollbarTheme::theme().paintScrollCorner(nullptr, graphicsContext, scrollCornerRect);
+        ScrollbarTheme::theme().paintScrollCorner(graphicsContext, scrollCornerRect);
         return;
     }
-    
+
     Scrollbar* scrollbar = nullptr;
-    
+
     if (layer == m_verticalScrollbarLayer)
         scrollbar = verticalScrollbar();
     else if (layer == m_horizontalScrollbarLayer)
@@ -1230,7 +1239,7 @@
 
     if (!scrollbar)
         return;
-    
+
     graphicsContext.translate(-scrollbar->x(), -scrollbar->y());
     scrollbar->paint(graphicsContext, scrollbar->frameRect());
 }

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (233115 => 233116)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2018-06-23 00:52:56 UTC (rev 233115)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2018-06-23 01:21:13 UTC (rev 233116)
@@ -258,6 +258,10 @@
 #include <pal/spi/cocoa/CoreTextSPI.h>
 #endif
 
+#if PLATFORM(MAC)
+#include <WebCore/LocalDefaultSystemAppearance.h>
+#endif
+
 #ifndef NDEBUG
 #include <wtf/RefCountedLeakCounter.h>
 #endif
@@ -1517,6 +1521,10 @@
 
 void WebPage::drawRect(GraphicsContext& graphicsContext, const IntRect& rect)
 {
+#if PLATFORM(MAC)
+    LocalDefaultSystemAppearance localAppearance(m_page->useSystemAppearance(), m_page->defaultAppearance());
+#endif
+
     GraphicsContextStateSaver stateSaver(graphicsContext);
     graphicsContext.clip(rect);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to