Diff
Modified: trunk/Source/WebCore/ChangeLog (292913 => 292914)
--- trunk/Source/WebCore/ChangeLog 2022-04-15 17:38:42 UTC (rev 292913)
+++ trunk/Source/WebCore/ChangeLog 2022-04-15 18:02:23 UTC (rev 292914)
@@ -1,3 +1,24 @@
+2022-04-15 Tim Horton <[email protected]>
+
+ Make it possible to adjust the final trait collection applied by LocalCurrentTraitCollection
+ https://bugs.webkit.org/show_bug.cgi?id=239375
+ rdar://problem/87115393
+
+ Reviewed by Wenson Hsieh.
+
+ * SourcesCocoa.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/ios/LocalCurrentTraitCollection.mm:
+ (WebCore::adjustedTraitCollection):
+ (WebCore::LocalCurrentTraitCollection::LocalCurrentTraitCollection):
+ * platform/ios/WebCoreUIColorExtras.h: Removed.
+ * platform/ios/WebCoreUIColorExtras.mm: Removed.
+ * rendering/RenderThemeIOS.mm:
+ (WebCore::cssValueSystemColorInformationList):
+ (WebCore::systemColorFromCSSValueSystemColorInformation):
+ (WebCore::CSSValueSystemColorInformation::function): Deleted.
+ Partially revert r291564, and add an addition point for LocalCurrentTraitCollection instead.
+
2022-04-15 J Pascoe <[email protected]>
[WebAuthn] Implement getTransports() and getAuthenticatorData() on AuthenticatorAttestationResponse
Modified: trunk/Source/WebCore/SourcesCocoa.txt (292913 => 292914)
--- trunk/Source/WebCore/SourcesCocoa.txt 2022-04-15 17:38:42 UTC (rev 292913)
+++ trunk/Source/WebCore/SourcesCocoa.txt 2022-04-15 18:02:23 UTC (rev 292914)
@@ -482,7 +482,6 @@
platform/ios/WebBackgroundTaskController.mm
platform/ios/WebCoreMotionManager.mm
platform/ios/WebEvent.mm @no-unify
-platform/ios/WebCoreUIColorExtras.mm
platform/ios/WebItemProviderPasteboard.mm @no-unify
platform/ios/WebSQLiteDatabaseTrackerClient.mm
platform/ios/WebVideoFullscreenControllerAVKit.mm @no-unify
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (292913 => 292914)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2022-04-15 17:38:42 UTC (rev 292913)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2022-04-15 18:02:23 UTC (rev 292914)
@@ -862,7 +862,6 @@
2D8B92FD203D13E1009C868F /* UnifiedSource528.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE5F85D21FA23856006DB63B /* UnifiedSource528.cpp */; };
2D8B92FE203D13E1009C868F /* UnifiedSource529.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE5F85CF1FA23850006DB63B /* UnifiedSource529.cpp */; };
2D8B92FF203D13E1009C868F /* UnifiedSource530.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE5F85D31FA23859006DB63B /* UnifiedSource530.cpp */; };
- 2D8BA18127E5A487008F7E52 /* WebCoreUIColorExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D8BA18027E5A47B008F7E52 /* WebCoreUIColorExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
2D8FEBDD143E3EF70072502B /* CSSCrossfadeValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D8FEBDB143E3EF70072502B /* CSSCrossfadeValue.h */; };
2D9066070BE141D400956998 /* RenderLayoutState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9066050BE141D400956998 /* RenderLayoutState.h */; settings = {ATTRIBUTES = (Private, ); }; };
2D93AEE319DF5641002A86C3 /* ServicesOverlayController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D93AEE119DF5641002A86C3 /* ServicesOverlayController.h */; };
@@ -8117,8 +8116,6 @@
2D7ED0A91BAE99170043B3E5 /* TimerEventBasedMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimerEventBasedMock.h; sourceTree = "<group>"; };
2D8287F416E4A0380086BD00 /* HitTestLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HitTestLocation.cpp; sourceTree = "<group>"; };
2D8287F516E4A0380086BD00 /* HitTestLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HitTestLocation.h; sourceTree = "<group>"; };
- 2D8BA17F27E5A47A008F7E52 /* WebCoreUIColorExtras.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreUIColorExtras.mm; sourceTree = "<group>"; };
- 2D8BA18027E5A47B008F7E52 /* WebCoreUIColorExtras.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebCoreUIColorExtras.h; sourceTree = "<group>"; };
2D8D3BEB23847AC900657075 /* gesture-recognizer.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode._javascript_; path = "gesture-recognizer.js"; sourceTree = "<group>"; };
2D8D3BEC23847AC900657075 /* pinch.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode._javascript_; path = pinch.js; sourceTree = "<group>"; };
2D8D3BED23847AC900657075 /* tap.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode._javascript_; path = tap.js; sourceTree = "<group>"; };
@@ -10092,7 +10089,7 @@
5273CCAD2564576C00850007 /* JSFakeXRButtonStateInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFakeXRButtonStateInit.cpp; sourceTree = "<group>"; };
5273CCAE2564576D00850007 /* JSFakeXRRigidTransformInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFakeXRRigidTransformInit.cpp; sourceTree = "<group>"; };
5273CCAF2564576E00850007 /* JSFakeXRViewInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFakeXRViewInit.cpp; sourceTree = "<group>"; };
- 52A0BE6527C227E00046611E /* JSFakeXRJointStateInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSFakeXRJointStateInit.cpp; path = JSFakeXRJointStateInit.cpp; sourceTree = "<group>"; };
+ 52A0BE6527C227E00046611E /* JSFakeXRJointStateInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFakeXRJointStateInit.cpp; sourceTree = "<group>"; };
52B0D4BD1C57FD1E0077CE53 /* PlatformView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformView.h; sourceTree = "<group>"; };
52B0D4BF1C57FD660077CE53 /* VideoFullscreenChangeObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoFullscreenChangeObserver.h; sourceTree = "<group>"; };
52B0D4C11C57FF910077CE53 /* VideoFullscreenInterfaceMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoFullscreenInterfaceMac.h; sourceTree = "<group>"; };
@@ -26900,8 +26897,6 @@
1F36EA9B1E21BA1700621E25 /* WebBackgroundTaskController.mm */,
31403797124BEA7F00AF40E4 /* WebCoreMotionManager.h */,
31403798124BEA7F00AF40E4 /* WebCoreMotionManager.mm */,
- 2D8BA18027E5A47B008F7E52 /* WebCoreUIColorExtras.h */,
- 2D8BA17F27E5A47A008F7E52 /* WebCoreUIColorExtras.mm */,
FE0D84E810484348001A179E /* WebEvent.h */,
FE0D84EA1048436E001A179E /* WebEvent.mm */,
F482230F1E3869B80066FC79 /* WebItemProviderPasteboard.h */,
@@ -38189,7 +38184,6 @@
A14832CC187F67C400DA63A6 /* WebCoreThreadRun.h in Headers */,
A14832CF187F684700DA63A6 /* WebCoreThreadSystemInterface.h in Headers */,
0F099D0917B968A100FF84B9 /* WebCoreTypedArrayController.h in Headers */,
- 2D8BA18127E5A487008F7E52 /* WebCoreUIColorExtras.h in Headers */,
37F818FD0D657606005E1F05 /* WebCoreURLResponse.h in Headers */,
44A20DB90F84166C00B3E1FE /* WebCoreURLResponseIOS.h in Headers */,
93F199F008245E59001E9ABC /* WebCoreView.h in Headers */,
Modified: trunk/Source/WebCore/platform/ios/LocalCurrentTraitCollection.mm (292913 => 292914)
--- trunk/Source/WebCore/platform/ios/LocalCurrentTraitCollection.mm 2022-04-15 17:38:42 UTC (rev 292913)
+++ trunk/Source/WebCore/platform/ios/LocalCurrentTraitCollection.mm 2022-04-15 18:02:23 UTC (rev 292914)
@@ -29,8 +29,24 @@
#import <pal/ios/UIKitSoftLink.h>
+#if HAVE(OS_DARK_MODE_SUPPORT)
+#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/LocalCurrentTraitCollectionAdditions.mm>)
+#import <WebKitAdditions/LocalCurrentTraitCollectionAdditions.mm>
+#else
namespace WebCore {
+static UITraitCollection *adjustedTraitCollection(UITraitCollection *traitCollection)
+{
+ return traitCollection;
+}
+
+}
+#endif
+#endif // HAVE(OS_DARK_MODE_SUPPORT)
+
+
+namespace WebCore {
+
LocalCurrentTraitCollection::LocalCurrentTraitCollection(bool useDarkAppearance, bool useElevatedUserInterfaceLevel)
{
#if HAVE(OS_DARK_MODE_SUPPORT)
@@ -40,7 +56,7 @@
auto userInterfaceStyleTrait = [PAL::getUITraitCollectionClass() traitCollectionWithUserInterfaceStyle:m_usingDarkAppearance ? UIUserInterfaceStyleDark : UIUserInterfaceStyleLight];
auto backgroundLevelTrait = [PAL::getUITraitCollectionClass() traitCollectionWithUserInterfaceLevel:m_usingElevatedUserInterfaceLevel ? UIUserInterfaceLevelElevated : UIUserInterfaceLevelBase];
- auto newTraitCollection = [PAL::getUITraitCollectionClass() traitCollectionWithTraitsFromCollections:@[ m_savedTraitCollection.get(), userInterfaceStyleTrait, backgroundLevelTrait ]];
+ auto newTraitCollection = adjustedTraitCollection([PAL::getUITraitCollectionClass() traitCollectionWithTraitsFromCollections:@[ m_savedTraitCollection.get(), userInterfaceStyleTrait, backgroundLevelTrait ]]);
[PAL::getUITraitCollectionClass() setCurrentTraitCollection:newTraitCollection];
#else
Deleted: trunk/Source/WebCore/platform/ios/WebCoreUIColorExtras.h (292913 => 292914)
--- trunk/Source/WebCore/platform/ios/WebCoreUIColorExtras.h 2022-04-15 17:38:42 UTC (rev 292913)
+++ trunk/Source/WebCore/platform/ios/WebCoreUIColorExtras.h 2022-04-15 18:02:23 UTC (rev 292914)
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2022 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. AND ITS CONTRIBUTORS ``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 ITS 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 PLATFORM(IOS_FAMILY)
-
-namespace WebCore {
-
-WEBCORE_EXPORT UIColor *systemBackgroundColor();
-
-} // namespace WebCore
-
-#endif
Deleted: trunk/Source/WebCore/platform/ios/WebCoreUIColorExtras.mm (292913 => 292914)
--- trunk/Source/WebCore/platform/ios/WebCoreUIColorExtras.mm 2022-04-15 17:38:42 UTC (rev 292913)
+++ trunk/Source/WebCore/platform/ios/WebCoreUIColorExtras.mm 2022-04-15 18:02:23 UTC (rev 292914)
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2022 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. AND ITS CONTRIBUTORS ``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 ITS 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.
- */
-
-#import "config.h"
-#import "WebCoreUIColorExtras.h"
-
-#if PLATFORM(IOS_FAMILY)
-
-#import <pal/ios/UIKitSoftLink.h>
-
-#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/WebCoreUIColorExtrasAdditions.mm>)
-
-#import <WebKitAdditions/WebCoreUIColorExtrasAdditions.mm>
-
-#else
-
-namespace WebCore {
-
-UIColor *systemBackgroundColor()
-{
- return (UIColor *)[PAL::getUIColorClass() systemBackgroundColor];
-}
-
-} // namespace WebCore
-
-#endif
-
-#endif // PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (292913 => 292914)
--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2022-04-15 17:38:42 UTC (rev 292913)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2022-04-15 18:02:23 UTC (rev 292914)
@@ -81,7 +81,6 @@
#import "Theme.h"
#import "UTIUtilities.h"
#import "WebCoreThreadRun.h"
-#import "WebCoreUIColorExtras.h"
#import <CoreGraphics/CoreGraphics.h>
#import <CoreImage/CoreImage.h>
#import <objc/runtime.h>
@@ -1446,7 +1445,6 @@
SEL selector;
bool makeOpaque { false };
float opacity { 1.0f };
- UIColor *(*function)(void) { nullptr };
};
static const Vector<CSSValueSystemColorInformation>& cssValueSystemColorInformationList()
@@ -1459,7 +1457,7 @@
[] {
cssValueSystemColorInformationList.get() = Vector(std::initializer_list<CSSValueSystemColorInformation> {
{ CSSValueText, @selector(labelColor) },
- { CSSValueWebkitControlBackground, nil, false, 1.0f, &systemBackgroundColor },
+ { CSSValueWebkitControlBackground, @selector(systemBackgroundColor) },
{ CSSValueAppleSystemBlue, @selector(systemBlueColor) },
{ CSSValueAppleSystemBrown, @selector(systemBrownColor) },
{ CSSValueAppleSystemGray, @selector(systemGrayColor) },
@@ -1471,7 +1469,7 @@
{ CSSValueAppleSystemRed, @selector(systemRedColor) },
{ CSSValueAppleSystemTeal, @selector(systemTealColor) },
{ CSSValueAppleSystemYellow, @selector(systemYellowColor) },
- { CSSValueAppleSystemBackground, nil, false, 1.0f, &systemBackgroundColor },
+ { CSSValueAppleSystemBackground, @selector(systemBackgroundColor) },
{ CSSValueAppleSystemSecondaryBackground, @selector(secondarySystemBackgroundColor) },
{ CSSValueAppleSystemTertiaryBackground, @selector(tertiarySystemBackgroundColor) },
{ CSSValueAppleSystemOpaqueFill, @selector(systemFillColor), true },
@@ -1491,11 +1489,11 @@
// FIXME: <rdar://problem/79471528> Adopt [UIColor opaqueSeparatorColor] once it has a high contrast variant.
{ CSSValueAppleSystemOpaqueSeparator, @selector(separatorColor), true },
{ CSSValueAppleSystemContainerBorder, @selector(separatorColor) },
- { CSSValueAppleSystemControlBackground, nil, false, 1.0f, &systemBackgroundColor },
+ { CSSValueAppleSystemControlBackground, @selector(systemBackgroundColor) },
{ CSSValueAppleSystemGrid, @selector(separatorColor) },
{ CSSValueAppleSystemHeaderText, @selector(labelColor) },
{ CSSValueAppleSystemSelectedContentBackground, @selector(tableCellDefaultSelectionTintColor) },
- { CSSValueAppleSystemTextBackground, nil, false, 1.0f, &systemBackgroundColor },
+ { CSSValueAppleSystemTextBackground, @selector(systemBackgroundColor) },
{ CSSValueAppleSystemUnemphasizedSelectedContentBackground, @selector(tableCellDefaultSelectionTintColor) },
{ CSSValueAppleWirelessPlaybackTargetActive, @selector(systemBlueColor) },
});
@@ -1506,12 +1504,7 @@
static inline std::optional<Color> systemColorFromCSSValueSystemColorInformation(CSSValueSystemColorInformation systemColorInformation, bool useDarkAppearance)
{
- UIColor *color = nil;
- if (systemColorInformation.selector)
- color = wtfObjCMsgSend<UIColor *>(PAL::getUIColorClass(), systemColorInformation.selector);
- else
- color = systemColorInformation.function();
-
+ UIColor *color = wtfObjCMsgSend<UIColor *>(PAL::getUIColorClass(), systemColorInformation.selector);
if (!color)
return std::nullopt;
Modified: trunk/Source/WebKit/ChangeLog (292913 => 292914)
--- trunk/Source/WebKit/ChangeLog 2022-04-15 17:38:42 UTC (rev 292913)
+++ trunk/Source/WebKit/ChangeLog 2022-04-15 18:02:23 UTC (rev 292914)
@@ -1,3 +1,16 @@
+2022-04-15 Tim Horton <[email protected]>
+
+ Make it possible to adjust the final trait collection applied by LocalCurrentTraitCollection
+ https://bugs.webkit.org/show_bug.cgi?id=239375
+ rdar://problem/87115393
+
+ Reviewed by Wenson Hsieh.
+
+ * UIProcess/API/ios/WKWebViewIOS.mm:
+ (scrollViewBackgroundColor):
+ * UIProcess/ios/PageClientImplIOS.mm:
+ (WebKit::PageClientImpl::contentViewBackgroundColor):
+
2022-04-15 J Pascoe <[email protected]>
[WebAuthn] Implement getTransports() and getAuthenticatorData() on AuthenticatorAttestationResponse
Modified: trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm (292913 => 292914)
--- trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm 2022-04-15 17:38:42 UTC (rev 292913)
+++ trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm 2022-04-15 18:02:23 UTC (rev 292914)
@@ -61,7 +61,6 @@
#import <WebCore/LocalCurrentTraitCollection.h>
#import <WebCore/MIMETypeRegistry.h>
#import <WebCore/RuntimeApplicationChecks.h>
-#import <WebCore/WebCoreUIColorExtras.h>
#import <pal/spi/cocoa/QuartzCoreSPI.h>
#import <pal/spi/ios/GraphicsServicesSPI.h>
#import <wtf/BlockPtr.h>
@@ -543,7 +542,7 @@
if (!color.isValid()) {
#if HAVE(OS_DARK_MODE_SUPPORT)
- color = WebCore::roundAndClampToSRGBALossy(WebCore::systemBackgroundColor().CGColor);
+ color = WebCore::roundAndClampToSRGBALossy(UIColor.systemBackgroundColor.CGColor);
#else
color = WebCore::Color::white;
#endif
Modified: trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm (292913 => 292914)
--- trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm 2022-04-15 17:38:42 UTC (rev 292913)
+++ trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm 2022-04-15 18:02:23 UTC (rev 292914)
@@ -72,7 +72,6 @@
#import <WebCore/SharedBuffer.h>
#import <WebCore/TextIndicator.h>
#import <WebCore/ValidationBubble.h>
-#import <WebCore/WebCoreUIColorExtras.h>
#import <wtf/BlockPtr.h>
#import <wtf/cocoa/Entitlements.h>
@@ -1029,7 +1028,7 @@
if (color.isValid())
return color;
#if HAVE(OS_DARK_MODE_SUPPORT)
- return WebCore::roundAndClampToSRGBALossy(WebCore::systemBackgroundColor().CGColor);
+ return WebCore::roundAndClampToSRGBALossy(UIColor.systemBackgroundColor.CGColor);
#else
return { };
#endif