Title: [287737] trunk/Source
Revision
287737
Author
timothy_hor...@apple.com
Date
2022-01-06 20:28:29 -0800 (Thu, 06 Jan 2022)

Log Message

Move linkedOnOrAfter() to WTF
https://bugs.webkit.org/show_bug.cgi?id=234942

Reviewed by Darin Adler.

Source/WebCore:

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/js/JSWindowProxy.cpp:
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::requiresFullscreenForVideoPlayback const):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
* page/Quirks.cpp:
* page/SecurityOrigin.cpp:
* platform/Timer.cpp:
(WebCore::shouldSuppressThreadSafetyCheck):
* platform/cocoa/VersionChecks.h: Removed.
* platform/cocoa/VersionChecks.mm: Removed.
* platform/graphics/cocoa/FontCacheCoreText.cpp:
* platform/network/DataURLDecoder.cpp:
* testing/js/WebCoreTestSupport.cpp:

Source/WebKit:

* NetworkProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::configurationForSessionID):
* Shared/Cocoa/AuxiliaryProcessCocoa.mm:
(WebKit::AuxiliaryProcess::platformInitialize):
* Shared/Cocoa/CompletionHandlerCallChecker.mm:
(WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):
* Shared/Cocoa/DefaultWebBrowserChecks.mm:
(WebKit::determineITPState):
* Shared/Cocoa/WebKit2InitializeCocoa.mm:
(WebKit::InitializeWebKit2):
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultPassiveTouchListenersAsDefaultOnDocument):
(WebKit::defaultCSSOMViewScrollingAPIEnabled):
(WebKit::defaultPassiveWheelListenersAsDefaultOnDocument):
(WebKit::defaultWheelEventGesturesBecomeNonBlocking):
(WebKit::defaultOfflineWebApplicationCacheEnabled):
* UIProcess/API/C/WKPage.cpp:
(WKPageReload):
* UIProcess/API/Cocoa/WKWebView.mm:
(shouldAllowPictureInPictureMediaPlayback):
(shouldAllowSettingAnyXHRHeaderFromFileURLs):
(shouldRequireUserGestureToLoadVideo):
(shouldRestrictBaseURLSchemes):
(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _setupPageConfiguration:]):
(-[WKWebView reload]):
(-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(defaultShouldDecidePolicyBeforeLoadingQuickLookPreview):
(-[WKWebViewConfiguration init]):
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore init]):
* UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _computedObscuredInset]):
* UIProcess/API/mac/WKWebViewMac.mm:
(-[WKWebView _web_dragDestinationActionForDraggingInfo:]):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
* UIProcess/Inspector/mac/WKInspectorViewController.mm:
(-[WKInspectorViewController inspectorWKWebViewReload:]):
* UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::hasScrollableOrZoomedMainFrame const):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
(WebKit::WebPageProxy::makeViewBlankIfUnpaintedSinceLastLoadCommit):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createWebPage):
* UIProcess/WebProcessProxy.cpp:
(WebKit::isMainThreadOrCheckDisabled):
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _shouldUseContextMenus]):
(applicationIsKnownToIgnoreMouseEvents):
* UIProcess/ios/WKScrollView.mm:
(-[WKScrollView _systemContentInset]):
* UIProcess/ios/WKStylusDeviceObserver.mm:
(-[WKStylusDeviceObserver start]):
(-[WKStylusDeviceObserver stop]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::desktopClassBrowsingRecommended):
* WebProcess/cocoa/WebProcessCocoa.mm:

Source/WebKitLegacy/mac:

* DefaultDelegates/WebDefaultUIDelegate.mm:
(-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):
* Misc/WebDownload.mm:
(shouldCallOnNetworkThread):
* Misc/WebIconDatabase.mm:
(+[WebIconDatabase sharedIconDatabase]):
* WebView/WebPreferencesDefaultValues.mm:
(WebKit::defaultAllowsPictureInPictureMediaPlayback):
(WebKit::defaultJavaScriptCanOpenWindowsAutomatically):
(WebKit::defaultPassiveTouchListenersAsDefaultOnDocument):
(WebKit::defaultRequiresUserGestureToLoadVideo):
(WebKit::defaultWebSQLEnabled):
(WebKit::defaultShouldRestrictBaseURLSchemes):
(WebKit::defaultShouldConvertInvalidURLsToBlank):
(WebKit::defaultPassiveWheelListenersAsDefaultOnDocument):
(WebKit::defaultWheelEventGesturesBecomeNonBlocking):
* WebView/WebView.mm:
(needsLaBanquePostaleQuirks):

Source/WTF:

Move linkedOnOrAfter() and the associated SDKVersion enum to WTF from WebCore.
This precedes a series of patches that will adopt it in WTF and _javascript_Core,
and then replace the underlying mechanism with a slightly more flexible one.

* wtf/cocoa/RuntimeApplicationChecksCocoa.cpp:
(WTF::linkedOnOrAfter):
* wtf/cocoa/RuntimeApplicationChecksCocoa.h:

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (287736 => 287737)


--- trunk/Source/WTF/ChangeLog	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WTF/ChangeLog	2022-01-07 04:28:29 UTC (rev 287737)
@@ -1,3 +1,18 @@
+2022-01-06  Tim Horton  <timothy_hor...@apple.com>
+
+        Move linkedOnOrAfter() to WTF
+        https://bugs.webkit.org/show_bug.cgi?id=234942
+
+        Reviewed by Darin Adler.
+
+        Move linkedOnOrAfter() and the associated SDKVersion enum to WTF from WebCore.
+        This precedes a series of patches that will adopt it in WTF and _javascript_Core,
+        and then replace the underlying mechanism with a slightly more flexible one.
+
+        * wtf/cocoa/RuntimeApplicationChecksCocoa.cpp:
+        (WTF::linkedOnOrAfter):
+        * wtf/cocoa/RuntimeApplicationChecksCocoa.h:
+
 2022-01-06  Wenson Hsieh  <wenson_hs...@apple.com>
 
         Add a helper function that returns the value of a std::optional<T> or constructs T if needed

Modified: trunk/Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.cpp (287736 => 287737)


--- trunk/Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -32,7 +32,7 @@
 
 static std::optional<uint32_t>& applicationSDKVersionOverride()
 {
-    static NeverDestroyed<std::optional<uint32_t>> version;
+    static std::optional<uint32_t> version;
     return version;
 }
 
@@ -50,7 +50,7 @@
 
 static std::optional<LinkedOnOrAfterOverride>& linkedOnOrAfterOverrideValue()
 {
-    static NeverDestroyed<std::optional<LinkedOnOrAfterOverride>> linkedOnOrAfter;
+    static std::optional<LinkedOnOrAfterOverride> linkedOnOrAfter;
     return linkedOnOrAfter;
 }
 
@@ -64,4 +64,13 @@
     return linkedOnOrAfterOverrideValue();
 }
 
+bool linkedOnOrAfter(SDKVersion sdkVersion)
+{
+    if (auto overrideValue = linkedOnOrAfterOverride())
+        return *overrideValue == LinkedOnOrAfterOverride::AfterEverything;
+
+    auto sdkVersionAsInteger = static_cast<uint32_t>(sdkVersion);
+    return sdkVersionAsInteger && applicationSDKVersion() >= sdkVersionAsInteger;
 }
+
+}

Modified: trunk/Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h (287736 => 287737)


--- trunk/Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h	2022-01-07 04:28:29 UTC (rev 287737)
@@ -28,14 +28,99 @@
 #include <optional>
 #include <wtf/Forward.h>
 
-// This contains the values with which to compare the return value of applicationSDKVersion().
 #include <wtf/spi/darwin/dyldSPI.h>
 
 namespace WTF {
 
-// dyld_get_program_sdk_version() gives you the wrong answer in any process other than the UI process.
-// These functions are hooked up to give you the right answer.
+enum class SDKVersion : uint32_t {
+#if PLATFORM(IOS_FAMILY)
+    FirstWithPictureInPictureMediaPlayback = DYLD_IOS_VERSION_9_0,
+    FirstWithMediaTypesRequiringUserActionForPlayback = DYLD_IOS_VERSION_10_0,
+    FirstThatRequiresUserGestureToLoadVideo = DYLD_IOS_VERSION_10_0,
+    FirstWithLinkPreviewEnabledByDefault = DYLD_IOS_VERSION_10_0,
+    FirstThatConvertsInvalidURLsToBlank = DYLD_IOS_VERSION_10_0,
+    FirstWithoutTheSecretSocietyHiddenMysteryWindowOpenQuirk = DYLD_IOS_VERSION_10_0,
+    FirstWithUnprefixedPlaysInlineAttribute = DYLD_IOS_VERSION_10_0,
+    FirstWithExceptionsForDuplicateCompletionHandlerCalls = DYLD_IOS_VERSION_11_0,
+    FirstWithExpiredOnlyReloadBehavior = DYLD_IOS_VERSION_11_0,
+    FirstThatDisallowsSettingAnyXHRHeaderFromFileURLs = DYLD_IOS_VERSION_11_3,
+    FirstThatDefaultsToPassiveTouchListenersOnDocument = DYLD_IOS_VERSION_11_3,
+    FirstWhereScrollViewContentInsetsAreNotObscuringInsets = DYLD_IOS_VERSION_12_0,
+    FirstWhereUIScrollViewDoesNotApplyKeyboardInsetsUnconditionally = DYLD_IOS_VERSION_12_0,
+    FirstWithMainThreadReleaseAssertionInWebPageProxy = DYLD_IOS_VERSION_12_0,
+    FirstWithoutMoviStarPlusCORSPreflightQuirk = DYLD_IOS_VERSION_12_0,
+    FirstWithTimerThreadSafetyChecks = DYLD_IOS_VERSION_12_0,
+    FirstWithLazyGestureRecognizerInstallation = DYLD_IOS_VERSION_12_2,
+    FirstWithProcessSwapOnCrossSiteNavigation = DYLD_IOS_VERSION_12_2,
+    FirstWithoutUnconditionalUniversalSandboxExtension = DYLD_IOS_VERSION_13_0,
+    FirstWithSnapshotAfterScreenUpdates = DYLD_IOS_VERSION_13_0,
+    FirstWithDeviceOrientationAndMotionPermissionAPI = DYLD_IOS_VERSION_13_0,
+    FirstThatDecidesPolicyBeforeLoadingQuickLookPreview = DYLD_IOS_VERSION_13_0,
+    FirstWithExceptionsForRelatedWebViewsUsingDifferentDataStores = DYLD_IOS_VERSION_13_0,
+    FirstWithModernCompabilityModeByDefault = DYLD_IOS_VERSION_13_0,
+    FirstThatHasUIContextMenuInteraction = DYLD_IOS_VERSION_13_0,
+    FirstWhereWKContentViewDoesNotOverrideKeyCommands = DYLD_IOS_VERSION_13_0,
+    FirstThatSupportsOverflowHiddenOnMainFrame = DYLD_IOS_VERSION_13_0,
+    FirstWithoutIMDbCSSOMViewScrollingQuirk = DYLD_IOS_VERSION_13_0,
+    FirstWhereSiteSpecificQuirksAreEnabledByDefault = DYLD_IOS_VERSION_13_2,
+    FirstThatRestrictsBaseURLSchemes = DYLD_IOS_VERSION_13_4,
+    FirstThatSendsNativeMouseEvents = DYLD_IOS_VERSION_13_4,
+    FirstWithSessionCleanupByDefault = DYLD_IOS_VERSION_14_0,
+    FirstWithInitializeWebKit2MainThreadAssertion = DYLD_IOS_VERSION_14_0,
+    FirstWithWKWebsiteDataStoreInitReturningNil = DYLD_IOS_VERSION_14_0,
+    FirstWithWebSQLDisabledByDefaultInLegacyWebKit = DYLD_IOS_VERSION_14_0,
+    FirstWithoutLaBanquePostaleQuirks = DYLD_IOS_VERSION_14_0,
+    FirstVersionWithiOSAppsOnMacOS = DYLD_IOS_VERSION_14_2,
+    FirstWithDataURLFragmentRemoval = DYLD_IOS_VERSION_14_5,
+    FirstWithHTMLDocumentSupportedPropertyNames = DYLD_IOS_VERSION_14_5,
+    FirstThatObservesClassProperty = DYLD_IOS_VERSION_14_5,
+    FirstWithoutWeChatScrollingQuirk = DYLD_IOS_VERSION_14_5,
+    FirstWithSharedNetworkProcess = DYLD_IOS_VERSION_14_5,
+    FirstWithBlankViewOnJSPrompt = DYLD_IOS_VERSION_14_5,
+    FirstWithNullOriginForNonSpecialSchemedURLs = DYLD_IOS_VERSION_15_0,
+    FirstWithDOMWindowReuseRestriction  = DYLD_IOS_VERSION_15_0,
+    FirstWithApplicationCacheDisabledByDefault = DYLD_IOS_VERSION_15_0,
+    FirstWithoutExpandoIndexedPropertiesOnWindow = DYLD_IOS_VERSION_15_0,
+    FirstWithAuthorizationHeaderOnSameOriginRedirects = DYLD_IOS_VERSION_15_4,
+    FirstForbiddingDotPrefixedFonts = DYLD_IOS_VERSION_16_0,
+#elif PLATFORM(MAC)
+    FirstThatConvertsInvalidURLsToBlank = DYLD_MACOSX_VERSION_10_12,
+    FirstWithExceptionsForDuplicateCompletionHandlerCalls = DYLD_MACOSX_VERSION_10_13,
+    FirstWithDropToNavigateDisallowedByDefault = DYLD_MACOSX_VERSION_10_13,
+    FirstWithExpiredOnlyReloadBehavior = DYLD_MACOSX_VERSION_10_13,
+    FirstWithWebIconDatabaseWarning = DYLD_MACOSX_VERSION_10_13,
+    FirstWithMainThreadReleaseAssertionInWebPageProxy = DYLD_MACOSX_VERSION_10_14,
+    FirstWithTimerThreadSafetyChecks = DYLD_MACOSX_VERSION_10_14,
+    FirstWithoutUnconditionalUniversalSandboxExtension = DYLD_MACOSX_VERSION_10_15,
+    FirstWithSnapshotAfterScreenUpdates = DYLD_MACOSX_VERSION_10_15,
+    FirstWithExceptionsForRelatedWebViewsUsingDifferentDataStores = DYLD_MACOSX_VERSION_10_15,
+    FirstWithDownloadDelegatesCalledOnTheMainThread = DYLD_MACOSX_VERSION_10_15,
+    FirstWhereSiteSpecificQuirksAreEnabledByDefault = DYLD_MACOSX_VERSION_10_15_1,
+    FirstThatRestrictsBaseURLSchemes = DYLD_MACOSX_VERSION_10_15_4,
+    FirstWithSessionCleanupByDefault = DYLD_MACOSX_VERSION_10_16,
+    FirstWithInitializeWebKit2MainThreadAssertion = DYLD_MACOSX_VERSION_10_16,
+    FirstWithWKWebsiteDataStoreInitReturningNil = DYLD_MACOSX_VERSION_10_16,
+    FirstWithDataURLFragmentRemoval = DYLD_MACOSX_VERSION_11_3,
+    FirstWithHTMLDocumentSupportedPropertyNames = DYLD_MACOSX_VERSION_11_3,
+    FirstWithNullOriginForNonSpecialSchemedURLs = DYLD_MACOSX_VERSION_12_00,
+    FirstWithDOMWindowReuseRestriction = DYLD_MACOSX_VERSION_12_00,
+    FirstWithBlankViewOnJSPrompt = DYLD_MACOSX_VERSION_11_3,
+    FirstWithoutClientCertificateLookup = DYLD_MACOSX_VERSION_11_3,
+    FirstThatDefaultsToPassiveWheelListenersOnDocument = DYLD_MACOSX_VERSION_11_3,
+    FirstThatAllowsWheelEventGesturesToBecomeNonBlocking = DYLD_MACOSX_VERSION_11_3,
+    FirstWithApplicationCacheDisabledByDefault = DYLD_MACOSX_VERSION_12_00,
+    FirstWithoutExpandoIndexedPropertiesOnWindow = DYLD_MACOSX_VERSION_12_00,
+    FirstWithAuthorizationHeaderOnSameOriginRedirects = DYLD_MACOSX_VERSION_12_3,
+    FirstForbiddingDotPrefixedFonts = DYLD_MACOSX_VERSION_13_0,
+#endif
+};
+
+WTF_EXPORT_PRIVATE bool linkedOnOrAfter(SDKVersion);
+
 WTF_EXPORT_PRIVATE void setApplicationSDKVersion(uint32_t);
+
+// Do not use applicationSDKVersion() directly; add a version to the enum above,
+// and use linkedOnOrAfter() at call sites.
 WTF_EXPORT_PRIVATE uint32_t applicationSDKVersion();
 
 enum class LinkedOnOrAfterOverride : uint8_t {
@@ -52,3 +137,6 @@
 using WTF::LinkedOnOrAfterOverride;
 using WTF::setLinkedOnOrAfterOverride;
 using WTF::linkedOnOrAfterOverride;
+using WTF::linkedOnOrAfter;
+using WTF::SDKVersion;
+using WTF::setApplicationSDKVersion;

Modified: trunk/Source/WebCore/ChangeLog (287736 => 287737)


--- trunk/Source/WebCore/ChangeLog	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebCore/ChangeLog	2022-01-07 04:28:29 UTC (rev 287737)
@@ -1,3 +1,28 @@
+2022-01-06  Tim Horton  <timothy_hor...@apple.com>
+
+        Move linkedOnOrAfter() to WTF
+        https://bugs.webkit.org/show_bug.cgi?id=234942
+
+        Reviewed by Darin Adler.
+
+        * SourcesCocoa.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSDOMWindowCustom.cpp:
+        * bindings/js/JSWindowProxy.cpp:
+        * html/MediaElementSession.cpp:
+        (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback const):
+        * loader/DocumentThreadableLoader.cpp:
+        (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
+        * page/Quirks.cpp:
+        * page/SecurityOrigin.cpp:
+        * platform/Timer.cpp:
+        (WebCore::shouldSuppressThreadSafetyCheck):
+        * platform/cocoa/VersionChecks.h: Removed.
+        * platform/cocoa/VersionChecks.mm: Removed.
+        * platform/graphics/cocoa/FontCacheCoreText.cpp:
+        * platform/network/DataURLDecoder.cpp:
+        * testing/js/WebCoreTestSupport.cpp:
+
 2022-01-06  Wenson Hsieh  <wenson_hs...@apple.com>
 
         Add a helper function that returns the value of a std::optional<T> or constructs T if needed

Modified: trunk/Source/WebCore/SourcesCocoa.txt (287736 => 287737)


--- trunk/Source/WebCore/SourcesCocoa.txt	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebCore/SourcesCocoa.txt	2022-01-07 04:28:29 UTC (rev 287737)
@@ -272,7 +272,6 @@
 platform/cocoa/TelephoneNumberDetectorCocoa.cpp
 platform/cocoa/ThemeCocoa.mm
 platform/cocoa/UserAgentCocoa.mm
-platform/cocoa/VersionChecks.mm
 platform/cocoa/VideoFullscreenModelVideoElement.mm
 platform/cocoa/VideoToolboxSoftLink.cpp
 platform/cocoa/WebCoreAdditions.mm @no-unify

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (287736 => 287737)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2022-01-07 04:28:29 UTC (rev 287737)
@@ -5118,7 +5118,6 @@
 		DECA806C1F9FED6A00E3B661 /* UnifiedSource299.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECA7FDA1F9FE9A200E3B661 /* UnifiedSource299.cpp */; };
 		DECA806D1F9FED6A00E3B661 /* UnifiedSource300.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECA7FBB1F9FE98300E3B661 /* UnifiedSource300.cpp */; };
 		DF19E2AC24772BC1007BDACB /* ShouldRelaxThirdPartyCookieBlocking.h in Headers */ = {isa = PBXBuildFile; fileRef = DF19E2AA247729A6007BDACB /* ShouldRelaxThirdPartyCookieBlocking.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		DF4E38E025279595002A7481 /* VersionChecks.h in Headers */ = {isa = PBXBuildFile; fileRef = DF4E38DE25279594002A7481 /* VersionChecks.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		DF9AFD7213FC31D80015FEB7 /* MediaPlayerPrivateAVFoundationObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = DF9AFD7013FC31D80015FEB7 /* MediaPlayerPrivateAVFoundationObjC.h */; };
 		E0FEF372B17C53EAC1C1FBEE /* EventSource.h in Headers */ = {isa = PBXBuildFile; fileRef = E0FEF371B17C53EAC1C1FBEE /* EventSource.h */; };
 		E0FEF372B37C53EAC1C1FBEE /* JSEventSource.h in Headers */ = {isa = PBXBuildFile; fileRef = E0FEF371B37C53EAC1C1FBEE /* JSEventSource.h */; };
@@ -16897,8 +16896,6 @@
 		DF365D0425A984C8005DDB8C /* PerformanceNavigationTiming.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceNavigationTiming.cpp; sourceTree = "<group>"; };
 		DF365D0625A984C8005DDB8C /* PerformanceNavigationTiming.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PerformanceNavigationTiming.h; sourceTree = "<group>"; };
 		DF365D0725A984C9005DDB8C /* PerformanceNavigationTiming.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = PerformanceNavigationTiming.idl; sourceTree = "<group>"; };
-		DF4E38DC25279593002A7481 /* VersionChecks.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = VersionChecks.mm; sourceTree = "<group>"; };
-		DF4E38DE25279594002A7481 /* VersionChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VersionChecks.h; sourceTree = "<group>"; };
 		DF7E9A294C7AACE0AD89B3DD /* MathMLOperatorDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLOperatorDictionary.h; sourceTree = "<group>"; };
 		DF9AFD7013FC31D80015FEB7 /* MediaPlayerPrivateAVFoundationObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlayerPrivateAVFoundationObjC.h; sourceTree = "<group>"; };
 		DF9AFD7113FC31D80015FEB7 /* MediaPlayerPrivateAVFoundationObjC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MediaPlayerPrivateAVFoundationObjC.mm; sourceTree = "<group>"; };
@@ -26724,8 +26721,6 @@
 				310D71941B335C9D009C7B73 /* ThemeCocoa.h */,
 				310D71931B335C9D009C7B73 /* ThemeCocoa.mm */,
 				A3AF9D81203252EE006CAD06 /* UserAgentCocoa.mm */,
-				DF4E38DE25279594002A7481 /* VersionChecks.h */,
-				DF4E38DC25279593002A7481 /* VersionChecks.mm */,
 				52B0D4BF1C57FD660077CE53 /* VideoFullscreenChangeObserver.h */,
 				52D5A1A41C57488900DE34A3 /* VideoFullscreenModel.h */,
 				52D5A1A51C57488900DE34A3 /* VideoFullscreenModelVideoElement.h */,
@@ -37671,7 +37666,6 @@
 				15C7708D100D3C6B005BA267 /* ValidityState.h in Headers */,
 				FD3160AF12B026F700C1A359 /* VectorMath.h in Headers */,
 				0F1A0C38229A481800D37ADB /* VelocityData.h in Headers */,
-				DF4E38E025279595002A7481 /* VersionChecks.h in Headers */,
 				BCA257151293C010007A263D /* VerticalPositionCache.h in Headers */,
 				CD3EEF3B25799FA1006563BB /* VideoConfiguration.h in Headers */,
 				41DEEFB62719BA1A00CB8D74 /* VideoFrameMetadata.h in Headers */,

Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp (287736 => 287737)


--- trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -60,7 +60,7 @@
 #endif
 
 #if PLATFORM(COCOA)
-#include "VersionChecks.h"
+#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #endif
 
 namespace WebCore {

Modified: trunk/Source/WebCore/bindings/js/JSWindowProxy.cpp (287736 => 287737)


--- trunk/Source/WebCore/bindings/js/JSWindowProxy.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebCore/bindings/js/JSWindowProxy.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -43,7 +43,7 @@
 #include <_javascript_Core/StrongInlines.h>
 
 #if PLATFORM(COCOA)
-#include "VersionChecks.h"
+#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #endif
 
 namespace WebCore {

Modified: trunk/Source/WebCore/html/MediaElementSession.cpp (287736 => 287737)


--- trunk/Source/WebCore/html/MediaElementSession.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebCore/html/MediaElementSession.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -66,7 +66,6 @@
 #if PLATFORM(IOS_FAMILY)
 #include "AudioSession.h"
 #include "RuntimeApplicationChecks.h"
-#include "VersionChecks.h"
 #include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #endif
 
@@ -858,7 +857,7 @@
 #if PLATFORM(IOS_FAMILY)
     if (CocoaApplication::isIBooks())
         return !m_element.hasAttributeWithoutSynchronization(HTMLNames::webkit_playsinlineAttr) && !m_element.hasAttributeWithoutSynchronization(HTMLNames::playsinlineAttr);
-    if (!linkedOnOrAfter(WebCore::SDKVersion::FirstWithUnprefixedPlaysInlineAttribute))
+    if (!linkedOnOrAfter(SDKVersion::FirstWithUnprefixedPlaysInlineAttribute))
         return !m_element.hasAttributeWithoutSynchronization(HTMLNames::webkit_playsinlineAttr);
 #endif
 

Modified: trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp (287736 => 287737)


--- trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -65,7 +65,6 @@
 #include <wtf/Ref.h>
 
 #if PLATFORM(IOS_FAMILY)
-#include "VersionChecks.h"
 #include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #endif
 
@@ -202,7 +201,7 @@
     ASSERT(m_options.mode == FetchOptions::Mode::Cors);
 
 #if PLATFORM(IOS_FAMILY)
-    bool needsPreflightQuirk = IOSApplication::isMoviStarPlus() && !linkedOnOrAfter(WebCore::SDKVersion::FirstWithoutMoviStarPlusCORSPreflightQuirk) && (m_options.preflightPolicy == PreflightPolicy::Consider || m_options.preflightPolicy == PreflightPolicy::Force);
+    bool needsPreflightQuirk = IOSApplication::isMoviStarPlus() && !linkedOnOrAfter(SDKVersion::FirstWithoutMoviStarPlusCORSPreflightQuirk) && (m_options.preflightPolicy == PreflightPolicy::Consider || m_options.preflightPolicy == PreflightPolicy::Force);
 #else
     bool needsPreflightQuirk = false;
 #endif

Modified: trunk/Source/WebCore/page/Quirks.cpp (287736 => 287737)


--- trunk/Source/WebCore/page/Quirks.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebCore/page/Quirks.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -63,7 +63,7 @@
 #include "UserScriptTypes.h"
 
 #if PLATFORM(COCOA)
-#include "VersionChecks.h"
+#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #endif
 
 namespace WebCore {

Modified: trunk/Source/WebCore/page/SecurityOrigin.cpp (287736 => 287737)


--- trunk/Source/WebCore/page/SecurityOrigin.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebCore/page/SecurityOrigin.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -45,7 +45,7 @@
 #include <wtf/text/StringBuilder.h>
 
 #if PLATFORM(COCOA)
-#include "VersionChecks.h"
+#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #endif
 
 namespace WebCore {

Modified: trunk/Source/WebCore/platform/Timer.cpp (287736 => 287737)


--- trunk/Source/WebCore/platform/Timer.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebCore/platform/Timer.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -37,7 +37,6 @@
 #include <wtf/Vector.h>
 
 #if PLATFORM(COCOA)
-#include "VersionChecks.h"
 #include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #endif
 
@@ -251,9 +250,9 @@
 static bool shouldSuppressThreadSafetyCheck()
 {
 #if PLATFORM(IOS_FAMILY)
-    return WebThreadIsEnabled() || !linkedOnOrAfter(WebCore::SDKVersion::FirstWithTimerThreadSafetyChecks);
+    return WebThreadIsEnabled() || !linkedOnOrAfter(SDKVersion::FirstWithTimerThreadSafetyChecks);
 #elif PLATFORM(MAC)
-    return !isInWebProcess() && !linkedOnOrAfter(WebCore::SDKVersion::FirstWithTimerThreadSafetyChecks);
+    return !isInWebProcess() && !linkedOnOrAfter(SDKVersion::FirstWithTimerThreadSafetyChecks);
 #else
     return false;
 #endif

Deleted: trunk/Source/WebCore/platform/cocoa/VersionChecks.h (287736 => 287737)


--- trunk/Source/WebCore/platform/cocoa/VersionChecks.h	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebCore/platform/cocoa/VersionChecks.h	2022-01-07 04:28:29 UTC (rev 287737)
@@ -1,117 +0,0 @@
-/*
- * Copyright (C) 2015-2017 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
-
-#import <wtf/spi/darwin/dyldSPI.h>
-
-namespace WebCore {
-
-enum class SDKVersion : uint32_t {
-#if PLATFORM(IOS_FAMILY)
-    FirstWithPictureInPictureMediaPlayback = DYLD_IOS_VERSION_9_0,
-    FirstWithMediaTypesRequiringUserActionForPlayback = DYLD_IOS_VERSION_10_0,
-    FirstThatRequiresUserGestureToLoadVideo = DYLD_IOS_VERSION_10_0,
-    FirstWithLinkPreviewEnabledByDefault = DYLD_IOS_VERSION_10_0,
-    FirstThatConvertsInvalidURLsToBlank = DYLD_IOS_VERSION_10_0,
-    FirstWithoutTheSecretSocietyHiddenMysteryWindowOpenQuirk = DYLD_IOS_VERSION_10_0,
-    FirstWithUnprefixedPlaysInlineAttribute = DYLD_IOS_VERSION_10_0,
-    FirstWithExceptionsForDuplicateCompletionHandlerCalls = DYLD_IOS_VERSION_11_0,
-    FirstWithExpiredOnlyReloadBehavior = DYLD_IOS_VERSION_11_0,
-    FirstThatDisallowsSettingAnyXHRHeaderFromFileURLs = DYLD_IOS_VERSION_11_3,
-    FirstThatDefaultsToPassiveTouchListenersOnDocument = DYLD_IOS_VERSION_11_3,
-    FirstWhereScrollViewContentInsetsAreNotObscuringInsets = DYLD_IOS_VERSION_12_0,
-    FirstWhereUIScrollViewDoesNotApplyKeyboardInsetsUnconditionally = DYLD_IOS_VERSION_12_0,
-    FirstWithMainThreadReleaseAssertionInWebPageProxy = DYLD_IOS_VERSION_12_0,
-    FirstWithoutMoviStarPlusCORSPreflightQuirk = DYLD_IOS_VERSION_12_0,
-    FirstWithTimerThreadSafetyChecks = DYLD_IOS_VERSION_12_0,
-    FirstWithLazyGestureRecognizerInstallation = DYLD_IOS_VERSION_12_2,
-    FirstWithProcessSwapOnCrossSiteNavigation = DYLD_IOS_VERSION_12_2,
-    FirstWithoutUnconditionalUniversalSandboxExtension = DYLD_IOS_VERSION_13_0,
-    FirstWithSnapshotAfterScreenUpdates = DYLD_IOS_VERSION_13_0,
-    FirstWithDeviceOrientationAndMotionPermissionAPI = DYLD_IOS_VERSION_13_0,
-    FirstThatDecidesPolicyBeforeLoadingQuickLookPreview = DYLD_IOS_VERSION_13_0,
-    FirstWithExceptionsForRelatedWebViewsUsingDifferentDataStores = DYLD_IOS_VERSION_13_0,
-    FirstWithModernCompabilityModeByDefault = DYLD_IOS_VERSION_13_0,
-    FirstThatHasUIContextMenuInteraction = DYLD_IOS_VERSION_13_0,
-    FirstWhereWKContentViewDoesNotOverrideKeyCommands = DYLD_IOS_VERSION_13_0,
-    FirstThatSupportsOverflowHiddenOnMainFrame = DYLD_IOS_VERSION_13_0,
-    FirstWithoutIMDbCSSOMViewScrollingQuirk = DYLD_IOS_VERSION_13_0,
-    FirstWhereSiteSpecificQuirksAreEnabledByDefault = DYLD_IOS_VERSION_13_2,
-    FirstThatRestrictsBaseURLSchemes = DYLD_IOS_VERSION_13_4,
-    FirstThatSendsNativeMouseEvents = DYLD_IOS_VERSION_13_4,
-    FirstWithSessionCleanupByDefault = DYLD_IOS_VERSION_14_0,
-    FirstWithInitializeWebKit2MainThreadAssertion = DYLD_IOS_VERSION_14_0,
-    FirstWithWKWebsiteDataStoreInitReturningNil = DYLD_IOS_VERSION_14_0,
-    FirstWithWebSQLDisabledByDefaultInLegacyWebKit = DYLD_IOS_VERSION_14_0,
-    FirstWithoutLaBanquePostaleQuirks = DYLD_IOS_VERSION_14_0,
-    FirstVersionWithiOSAppsOnMacOS = DYLD_IOS_VERSION_14_2,
-    FirstWithDataURLFragmentRemoval = DYLD_IOS_VERSION_14_5,
-    FirstWithHTMLDocumentSupportedPropertyNames = DYLD_IOS_VERSION_14_5,
-    FirstThatObservesClassProperty = DYLD_IOS_VERSION_14_5,
-    FirstWithoutWeChatScrollingQuirk = DYLD_IOS_VERSION_14_5,
-    FirstWithSharedNetworkProcess = DYLD_IOS_VERSION_14_5,
-    FirstWithBlankViewOnJSPrompt = DYLD_IOS_VERSION_14_5,
-    FirstWithNullOriginForNonSpecialSchemedURLs = DYLD_IOS_VERSION_15_0,
-    FirstWithDOMWindowReuseRestriction  = DYLD_IOS_VERSION_15_0,
-    FirstWithApplicationCacheDisabledByDefault = DYLD_IOS_VERSION_15_0,
-    FirstWithoutExpandoIndexedPropertiesOnWindow = DYLD_IOS_VERSION_15_0,
-    FirstWithAuthorizationHeaderOnSameOriginRedirects = DYLD_IOS_VERSION_15_4,
-    FirstForbiddingDotPrefixedFonts = DYLD_IOS_VERSION_16_0,
-#elif PLATFORM(MAC)
-    FirstThatConvertsInvalidURLsToBlank = DYLD_MACOSX_VERSION_10_12,
-    FirstWithExceptionsForDuplicateCompletionHandlerCalls = DYLD_MACOSX_VERSION_10_13,
-    FirstWithDropToNavigateDisallowedByDefault = DYLD_MACOSX_VERSION_10_13,
-    FirstWithExpiredOnlyReloadBehavior = DYLD_MACOSX_VERSION_10_13,
-    FirstWithWebIconDatabaseWarning = DYLD_MACOSX_VERSION_10_13,
-    FirstWithMainThreadReleaseAssertionInWebPageProxy = DYLD_MACOSX_VERSION_10_14,
-    FirstWithTimerThreadSafetyChecks = DYLD_MACOSX_VERSION_10_14,
-    FirstWithoutUnconditionalUniversalSandboxExtension = DYLD_MACOSX_VERSION_10_15,
-    FirstWithSnapshotAfterScreenUpdates = DYLD_MACOSX_VERSION_10_15,
-    FirstWithExceptionsForRelatedWebViewsUsingDifferentDataStores = DYLD_MACOSX_VERSION_10_15,
-    FirstWithDownloadDelegatesCalledOnTheMainThread = DYLD_MACOSX_VERSION_10_15,
-    FirstWhereSiteSpecificQuirksAreEnabledByDefault = DYLD_MACOSX_VERSION_10_15_1,
-    FirstThatRestrictsBaseURLSchemes = DYLD_MACOSX_VERSION_10_15_4,
-    FirstWithSessionCleanupByDefault = DYLD_MACOSX_VERSION_10_16,
-    FirstWithInitializeWebKit2MainThreadAssertion = DYLD_MACOSX_VERSION_10_16,
-    FirstWithWKWebsiteDataStoreInitReturningNil = DYLD_MACOSX_VERSION_10_16,
-    FirstWithDataURLFragmentRemoval = DYLD_MACOSX_VERSION_11_3,
-    FirstWithHTMLDocumentSupportedPropertyNames = DYLD_MACOSX_VERSION_11_3,
-    FirstWithNullOriginForNonSpecialSchemedURLs = DYLD_MACOSX_VERSION_12_00,
-    FirstWithDOMWindowReuseRestriction = DYLD_MACOSX_VERSION_12_00,
-    FirstWithBlankViewOnJSPrompt = DYLD_MACOSX_VERSION_11_3,
-    FirstWithoutClientCertificateLookup = DYLD_MACOSX_VERSION_11_3,
-    FirstThatDefaultsToPassiveWheelListenersOnDocument = DYLD_MACOSX_VERSION_11_3,
-    FirstThatAllowsWheelEventGesturesToBecomeNonBlocking = DYLD_MACOSX_VERSION_11_3,
-    FirstWithApplicationCacheDisabledByDefault = DYLD_MACOSX_VERSION_12_00,
-    FirstWithoutExpandoIndexedPropertiesOnWindow = DYLD_MACOSX_VERSION_12_00,
-    FirstWithAuthorizationHeaderOnSameOriginRedirects = DYLD_MACOSX_VERSION_12_3,
-    FirstForbiddingDotPrefixedFonts = DYLD_MACOSX_VERSION_13_0,
-#endif
-};
-
-WEBCORE_EXPORT bool linkedOnOrAfter(SDKVersion);
-
-}

Deleted: trunk/Source/WebCore/platform/cocoa/VersionChecks.mm (287736 => 287737)


--- trunk/Source/WebCore/platform/cocoa/VersionChecks.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebCore/platform/cocoa/VersionChecks.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2015-2017 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 "VersionChecks.h"
-
-#import "RuntimeApplicationChecks.h"
-#import <mach-o/dyld.h>
-#import <mutex>
-#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
-
-namespace WebCore {
-
-bool linkedOnOrAfter(SDKVersion sdkVersion)
-{
-    if (auto overrideValue = linkedOnOrAfterOverride())
-        return *overrideValue == LinkedOnOrAfterOverride::AfterEverything;
-
-    auto sdkVersionAsInteger = static_cast<uint32_t>(sdkVersion);
-    return sdkVersionAsInteger && applicationSDKVersion() >= sdkVersionAsInteger;
-}
-
-}

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (287736 => 287737)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -34,7 +34,6 @@
 #include "FontPaletteValues.h"
 #include "RenderThemeCocoa.h"
 #include "SystemFontDatabaseCoreText.h"
-#include "VersionChecks.h"
 #include <CoreText/SFNTLayoutTypes.h>
 #include <pal/spi/cf/CoreTextSPI.h>
 #include <wtf/HashSet.h>
@@ -43,6 +42,7 @@
 #include <wtf/MemoryPressureHandler.h>
 #include <wtf/NeverDestroyed.h>
 #include <wtf/cf/TypeCastsCF.h>
+#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 
 // FIXME: This seems like it should be in PlatformHave.h.
 // FIXME: Likely we can remove this special case for watchOS and tvOS.

Modified: trunk/Source/WebCore/platform/network/DataURLDecoder.cpp (287736 => 287737)


--- trunk/Source/WebCore/platform/network/DataURLDecoder.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebCore/platform/network/DataURLDecoder.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -37,7 +37,7 @@
 #include <wtf/text/Base64.h>
 
 #if PLATFORM(COCOA)
-#include "VersionChecks.h"
+#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #endif
 
 namespace WebCore {

Modified: trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp (287736 => 287737)


--- trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -51,7 +51,6 @@
 
 #if PLATFORM(COCOA)
 #include "UTIRegistry.h"
-#include "VersionChecks.h"
 #include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #endif
 

Modified: trunk/Source/WebKit/ChangeLog (287736 => 287737)


--- trunk/Source/WebKit/ChangeLog	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/ChangeLog	2022-01-07 04:28:29 UTC (rev 287737)
@@ -1,3 +1,76 @@
+2022-01-06  Tim Horton  <timothy_hor...@apple.com>
+
+        Move linkedOnOrAfter() to WTF
+        https://bugs.webkit.org/show_bug.cgi?id=234942
+
+        Reviewed by Darin Adler.
+
+        * NetworkProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm:
+        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
+        (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
+        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
+        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+        (WebKit::configurationForSessionID):
+        * Shared/Cocoa/AuxiliaryProcessCocoa.mm:
+        (WebKit::AuxiliaryProcess::platformInitialize):
+        * Shared/Cocoa/CompletionHandlerCallChecker.mm:
+        (WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):
+        * Shared/Cocoa/DefaultWebBrowserChecks.mm:
+        (WebKit::determineITPState):
+        * Shared/Cocoa/WebKit2InitializeCocoa.mm:
+        (WebKit::InitializeWebKit2):
+        * Shared/WebPreferencesDefaultValues.cpp:
+        (WebKit::defaultPassiveTouchListenersAsDefaultOnDocument):
+        (WebKit::defaultCSSOMViewScrollingAPIEnabled):
+        (WebKit::defaultPassiveWheelListenersAsDefaultOnDocument):
+        (WebKit::defaultWheelEventGesturesBecomeNonBlocking):
+        (WebKit::defaultOfflineWebApplicationCacheEnabled):
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageReload):
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (shouldAllowPictureInPictureMediaPlayback):
+        (shouldAllowSettingAnyXHRHeaderFromFileURLs):
+        (shouldRequireUserGestureToLoadVideo):
+        (shouldRestrictBaseURLSchemes):
+        (-[WKWebView _initializeWithConfiguration:]):
+        (-[WKWebView _setupPageConfiguration:]):
+        (-[WKWebView reload]):
+        (-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
+        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+        (defaultShouldDecidePolicyBeforeLoadingQuickLookPreview):
+        (-[WKWebViewConfiguration init]):
+        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
+        (-[WKWebsiteDataStore init]):
+        * UIProcess/API/ios/WKWebViewIOS.mm:
+        (-[WKWebView _computedObscuredInset]):
+        * UIProcess/API/mac/WKWebViewMac.mm:
+        (-[WKWebView _web_dragDestinationActionForDraggingInfo:]):
+        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+        * UIProcess/Inspector/mac/WKInspectorViewController.mm:
+        (-[WKInspectorViewController inspectorWKWebViewReload:]):
+        * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
+        (WebKit::RemoteScrollingCoordinatorProxy::hasScrollableOrZoomedMainFrame const):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
+        (WebKit::WebPageProxy::makeViewBlankIfUnpaintedSinceLastLoadCommit):
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::createWebPage):
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::isMainThreadOrCheckDisabled):
+        * UIProcess/ios/WKContentView.mm:
+        (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView _shouldUseContextMenus]):
+        (applicationIsKnownToIgnoreMouseEvents):
+        * UIProcess/ios/WKScrollView.mm:
+        (-[WKScrollView _systemContentInset]):
+        * UIProcess/ios/WKStylusDeviceObserver.mm:
+        (-[WKStylusDeviceObserver start]):
+        (-[WKStylusDeviceObserver stop]):
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::desktopClassBrowsingRecommended):
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+
 2022-01-06  Wenson Hsieh  <wenson_hs...@apple.com>
 
         Add a helper function that returns the value of a std::optional<T> or constructs T if needed

Modified: trunk/Source/WebKit/NetworkProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm (287736 => 287737)


--- trunk/Source/WebKit/NetworkProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/NetworkProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -28,8 +28,8 @@
 
 #if PLATFORM(IOS_FAMILY)
 
-#import <WebCore/VersionChecks.h>
 #import <wtf/RunLoop.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 
 namespace WebKit {
 

Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (287736 => 287737)


--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -41,7 +41,6 @@
 #import <WebCore/RegistrableDomain.h>
 #import <WebCore/ResourceRequest.h>
 #import <WebCore/TimingAllowOrigin.h>
-#import <WebCore/VersionChecks.h>
 #import <pal/spi/cf/CFNetworkSPI.h>
 #import <wtf/BlockPtr.h>
 #import <wtf/FileSystem.h>
@@ -49,6 +48,7 @@
 #import <wtf/ProcessPrivilege.h>
 #import <wtf/SystemTracing.h>
 #import <wtf/WeakObjCPtr.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #import <wtf/text/Base64.h>
 
 #if HAVE(NW_ACTIVITY)
@@ -496,7 +496,7 @@
         request.clearHTTPOrigin();
 
     } else {
-        if (auto authorization = m_firstRequest.httpHeaderField(WebCore::HTTPHeaderName::Authorization); !authorization.isNull() && linkedOnOrAfter(WebCore::SDKVersion::FirstWithAuthorizationHeaderOnSameOriginRedirects))
+        if (auto authorization = m_firstRequest.httpHeaderField(WebCore::HTTPHeaderName::Authorization); !authorization.isNull() && linkedOnOrAfter(SDKVersion::FirstWithAuthorizationHeaderOnSameOriginRedirects))
             request.setHTTPHeaderField(WebCore::HTTPHeaderName::Authorization, authorization);
 
 #if USE(CREDENTIAL_STORAGE_WITH_NETWORK_SESSION)

Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm (287736 => 287737)


--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -41,7 +41,6 @@
 #import <WebCore/SecurityOrigin.h>
 #import <WebCore/SecurityOriginData.h>
 #import <WebCore/SocketStreamHandleImpl.h>
-#import <WebCore/VersionChecks.h>
 #import <pal/spi/cf/CFNetworkSPI.h>
 #import <wtf/BlockPtr.h>
 #import <wtf/CallbackAggregator.h>

Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (287736 => 287737)


--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -48,7 +48,6 @@
 #import <WebCore/ResourceRequest.h>
 #import <WebCore/ResourceResponse.h>
 #import <WebCore/SharedBuffer.h>
-#import <WebCore/VersionChecks.h>
 #import <WebCore/WebCoreURLResponse.h>
 #import <pal/spi/cf/CFNetworkSPI.h>
 #import <wtf/BlockPtr.h>
@@ -60,6 +59,7 @@
 #import <wtf/SoftLinking.h>
 #import <wtf/URL.h>
 #import <wtf/WeakObjCPtr.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #import <wtf/cocoa/TypeCastsCocoa.h>
 #import <wtf/cocoa/VectorCocoa.h>
 #import <wtf/darwin/WeakLinking.h>
@@ -1107,7 +1107,7 @@
         configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
 
 #if PLATFORM(MAC)
-    bool preventCFNetworkClientCertificateLookup = linkedOnOrAfter(WebCore::SDKVersion::FirstWithoutClientCertificateLookup) || session.isEphemeral();
+    bool preventCFNetworkClientCertificateLookup = linkedOnOrAfter(SDKVersion::FirstWithoutClientCertificateLookup) || session.isEphemeral();
 #else
     bool preventCFNetworkClientCertificateLookup = true;
 #endif

Modified: trunk/Source/WebKit/Shared/Cocoa/CompletionHandlerCallChecker.mm (287736 => 287737)


--- trunk/Source/WebKit/Shared/Cocoa/CompletionHandlerCallChecker.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/Shared/Cocoa/CompletionHandlerCallChecker.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -26,10 +26,10 @@
 #import "config.h"
 #import "CompletionHandlerCallChecker.h"
 
-#import <WebCore/VersionChecks.h>
 #import <mutex>
 #import <objc/runtime.h>
 #import <wtf/Ref.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 
 namespace WebKit {
 
@@ -65,7 +65,7 @@
     static bool shouldThrowException;
     static std::once_flag once;
     std::call_once(once, [] {
-        shouldThrowException = linkedOnOrAfter(WebCore::SDKVersion::FirstWithExceptionsForDuplicateCompletionHandlerCalls);
+        shouldThrowException = linkedOnOrAfter(SDKVersion::FirstWithExceptionsForDuplicateCompletionHandlerCalls);
     });
     return shouldThrowException;
 }

Modified: trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm (287736 => 287737)


--- trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -29,17 +29,18 @@
 #import "AuxiliaryProcess.h"
 #import "Connection.h"
 #import "Logging.h"
-#import "TCCSoftLink.h"
 #import <WebCore/RegistrableDomain.h>
 #import <WebCore/RuntimeApplicationChecks.h>
-#import <WebCore/VersionChecks.h>
 #import <wtf/HashMap.h>
 #import <wtf/NeverDestroyed.h>
 #import <wtf/RunLoop.h>
 #import <wtf/WorkQueue.h>
 #import <wtf/cocoa/Entitlements.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #import <wtf/text/StringHash.h>
 
+#import "TCCSoftLink.h"
+
 namespace WebKit {
 
 static bool isFullWebBrowser(const String&);
@@ -124,7 +125,7 @@
     if (currentITPState != ITPState::Uninitialized)
         return;
 
-    bool appWasLinkedOnOrAfter = linkedOnOrAfter(WebCore::SDKVersion::FirstWithSessionCleanupByDefault);
+    bool appWasLinkedOnOrAfter = linkedOnOrAfter(SDKVersion::FirstWithSessionCleanupByDefault);
 
     itpQueue() = WorkQueue::create("com.apple.WebKit.itpCheckQueue");
     itpQueue()->dispatch([appWasLinkedOnOrAfter, bundleIdentifier = WebCore::applicationBundleIdentifier().isolatedCopy()] {

Modified: trunk/Source/WebKit/Shared/Cocoa/WebKit2InitializeCocoa.mm (287736 => 287737)


--- trunk/Source/WebKit/Shared/Cocoa/WebKit2InitializeCocoa.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/Shared/Cocoa/WebKit2InitializeCocoa.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -27,12 +27,12 @@
 #import "WebKit2Initialize.h"
 
 #import <_javascript_Core/InitializeThreading.h>
-#import <WebCore/VersionChecks.h>
 #import <WebCore/WebCoreJITOperations.h>
 #import <mutex>
 #import <wtf/MainThread.h>
 #import <wtf/RefCounted.h>
 #import <wtf/WorkQueue.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 
 #if PLATFORM(IOS_FAMILY)
 #import <WebCore/WebCoreThreadSystemInterface.h>
@@ -64,7 +64,7 @@
     // Make sure the initialization code is run only once and on the main thread since things like initializeMainThread()
     // are only safe to call on the main thread.
     std::call_once(flag, [] {
-        if ([NSThread isMainThread] || linkedOnOrAfter(WebCore::SDKVersion::FirstWithInitializeWebKit2MainThreadAssertion))
+        if ([NSThread isMainThread] || linkedOnOrAfter(SDKVersion::FirstWithInitializeWebKit2MainThreadAssertion))
             runInitializationCode();
         else
             WorkQueue::main().dispatchSync([] { runInitializationCode(); });

Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (287736 => 287737)


--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -30,7 +30,6 @@
 #include <wtf/text/WTFString.h>
 
 #if PLATFORM(COCOA)
-#include <WebCore/VersionChecks.h>
 #include <pal/spi/cocoa/FeatureFlagsSPI.h>
 #include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #endif
@@ -53,13 +52,13 @@
 
 bool defaultPassiveTouchListenersAsDefaultOnDocument()
 {
-    static bool result = linkedOnOrAfter(WebCore::SDKVersion::FirstThatDefaultsToPassiveTouchListenersOnDocument);
+    static bool result = linkedOnOrAfter(SDKVersion::FirstThatDefaultsToPassiveTouchListenersOnDocument);
     return result;
 }
 
 bool defaultCSSOMViewScrollingAPIEnabled()
 {
-    static bool result = WebCore::IOSApplication::isIMDb() && !linkedOnOrAfter(WebCore::SDKVersion::FirstWithoutIMDbCSSOMViewScrollingQuirk);
+    static bool result = WebCore::IOSApplication::isIMDb() && !linkedOnOrAfter(SDKVersion::FirstWithoutIMDbCSSOMViewScrollingQuirk);
     return !result;
 }
 
@@ -76,13 +75,13 @@
 
 bool defaultPassiveWheelListenersAsDefaultOnDocument()
 {
-    static bool result = linkedOnOrAfter(WebCore::SDKVersion::FirstThatDefaultsToPassiveWheelListenersOnDocument);
+    static bool result = linkedOnOrAfter(SDKVersion::FirstThatDefaultsToPassiveWheelListenersOnDocument);
     return result;
 }
 
 bool defaultWheelEventGesturesBecomeNonBlocking()
 {
-    static bool result = linkedOnOrAfter(WebCore::SDKVersion::FirstThatAllowsWheelEventGesturesToBecomeNonBlocking);
+    static bool result = linkedOnOrAfter(SDKVersion::FirstThatAllowsWheelEventGesturesToBecomeNonBlocking);
     return result;
 }
 
@@ -149,7 +148,7 @@
 bool defaultOfflineWebApplicationCacheEnabled()
 {
 #if PLATFORM(COCOA)
-    static bool newSDK = linkedOnOrAfter(WebCore::SDKVersion::FirstWithApplicationCacheDisabledByDefault);
+    static bool newSDK = linkedOnOrAfter(SDKVersion::FirstWithApplicationCacheDisabledByDefault);
     return !newSDK;
 #else
     // FIXME: Other platforms should consider turning this off.

Modified: trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -98,7 +98,7 @@
 #endif
 
 #if PLATFORM(COCOA)
-#include <WebCore/VersionChecks.h>
+#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #endif
 
 namespace API {
@@ -309,7 +309,7 @@
     CRASH_IF_SUSPENDED;
     OptionSet<WebCore::ReloadOption> reloadOptions;
 #if PLATFORM(COCOA)
-    if (linkedOnOrAfter(WebCore::SDKVersion::FirstWithExpiredOnlyReloadBehavior))
+    if (linkedOnOrAfter(SDKVersion::FirstWithExpiredOnlyReloadBehavior))
         reloadOptions.add(WebCore::ReloadOption::ExpiredOnly);
 #endif
 

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -133,7 +133,6 @@
 #import <WebCore/SharedBuffer.h>
 #import <WebCore/StringUtilities.h>
 #import <WebCore/TextManipulationController.h>
-#import <WebCore/VersionChecks.h>
 #import <WebCore/ViewportArguments.h>
 #import <WebCore/WebCoreObjCExtras.h>
 #import <WebCore/WebViewVisualIdentificationOverlay.h>
@@ -146,6 +145,7 @@
 #import <wtf/RetainPtr.h>
 #import <wtf/SystemTracing.h>
 #import <wtf/UUID.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #import <wtf/cocoa/VectorCocoa.h>
 #import <wtf/spi/darwin/dyldSPI.h>
 #import <wtf/text/TextStream.h>
@@ -240,13 +240,13 @@
 
 static bool shouldAllowPictureInPictureMediaPlayback()
 {
-    static bool shouldAllowPictureInPictureMediaPlayback = WebCore::linkedOnOrAfter(WebCore::SDKVersion::FirstWithPictureInPictureMediaPlayback);
+    static bool shouldAllowPictureInPictureMediaPlayback = linkedOnOrAfter(SDKVersion::FirstWithPictureInPictureMediaPlayback);
     return shouldAllowPictureInPictureMediaPlayback;
 }
 
 static bool shouldAllowSettingAnyXHRHeaderFromFileURLs()
 {
-    static bool shouldAllowSettingAnyXHRHeaderFromFileURLs = (WebCore::IOSApplication::isCardiogram() || WebCore::IOSApplication::isNike()) && !linkedOnOrAfter(WebCore::SDKVersion::FirstThatDisallowsSettingAnyXHRHeaderFromFileURLs);
+    static bool shouldAllowSettingAnyXHRHeaderFromFileURLs = (WebCore::IOSApplication::isCardiogram() || WebCore::IOSApplication::isNike()) && !linkedOnOrAfter(SDKVersion::FirstThatDisallowsSettingAnyXHRHeaderFromFileURLs);
     return shouldAllowSettingAnyXHRHeaderFromFileURLs;
 }
 
@@ -255,7 +255,7 @@
 static bool shouldRequireUserGestureToLoadVideo()
 {
 #if PLATFORM(IOS_FAMILY)
-    static bool shouldRequireUserGestureToLoadVideo = linkedOnOrAfter(WebCore::SDKVersion::FirstThatRequiresUserGestureToLoadVideo);
+    static bool shouldRequireUserGestureToLoadVideo = linkedOnOrAfter(SDKVersion::FirstThatRequiresUserGestureToLoadVideo);
     return shouldRequireUserGestureToLoadVideo;
 #else
     return false;
@@ -264,7 +264,7 @@
 
 static bool shouldRestrictBaseURLSchemes()
 {
-    static bool shouldRestrictBaseURLSchemes = linkedOnOrAfter(WebCore::SDKVersion::FirstThatRestrictsBaseURLSchemes);
+    static bool shouldRestrictBaseURLSchemes = linkedOnOrAfter(SDKVersion::FirstThatRestrictsBaseURLSchemes);
     return shouldRestrictBaseURLSchemes;
 }
 
@@ -340,7 +340,7 @@
         WKProcessPool *relatedWebViewProcessPool = [relatedWebView->_configuration processPool];
         if (processPool && processPool != relatedWebViewProcessPool)
             [NSException raise:NSInvalidArgumentException format:@"Related web view %@ has process pool %@ but configuration specifies a different process pool %@", relatedWebView, relatedWebViewProcessPool, configuration.processPool];
-        if ([relatedWebView->_configuration websiteDataStore] != [_configuration websiteDataStore] && linkedOnOrAfter(WebCore::SDKVersion::FirstWithExceptionsForRelatedWebViewsUsingDifferentDataStores))
+        if ([relatedWebView->_configuration websiteDataStore] != [_configuration websiteDataStore] && linkedOnOrAfter(SDKVersion::FirstWithExceptionsForRelatedWebViewsUsingDifferentDataStores))
             [NSException raise:NSInvalidArgumentException format:@"Related web view %@ has data store %@ but configuration specifies a different data store %@", relatedWebView, [relatedWebView->_configuration websiteDataStore], [_configuration websiteDataStore]];
 
         [_configuration setProcessPool:relatedWebViewProcessPool];
@@ -364,7 +364,7 @@
     _viewportMetaTagWidth = WebCore::ViewportArguments::ValueAuto;
     _initialScaleFactor = 1;
     _allowsViewportShrinkToFit = defaultAllowsViewportShrinkToFit;
-    _allowsLinkPreview = linkedOnOrAfter(WebCore::SDKVersion::FirstWithLinkPreviewEnabledByDefault);
+    _allowsLinkPreview = linkedOnOrAfter(SDKVersion::FirstWithLinkPreviewEnabledByDefault);
 
 #if HAVE(UIFINDINTERACTION)
     _findInteractionEnabled = NO;
@@ -511,7 +511,7 @@
     pageConfiguration->preferences()->setAllowSettingAnyXHRHeaderFromFileURLs(shouldAllowSettingAnyXHRHeaderFromFileURLs());
     pageConfiguration->preferences()->setShouldDecidePolicyBeforeLoadingQuickLookPreview(!![_configuration _shouldDecidePolicyBeforeLoadingQuickLookPreview]);
 #if ENABLE(DEVICE_ORIENTATION)
-    pageConfiguration->preferences()->setDeviceOrientationPermissionAPIEnabled(linkedOnOrAfter(WebCore::SDKVersion::FirstWithDeviceOrientationAndMotionPermissionAPI));
+    pageConfiguration->preferences()->setDeviceOrientationPermissionAPIEnabled(linkedOnOrAfter(SDKVersion::FirstWithDeviceOrientationAndMotionPermissionAPI));
 #endif
 #if USE(SYSTEM_PREVIEW)
     pageConfiguration->preferences()->setSystemPreviewEnabled(!![_configuration _systemPreviewEnabled]);
@@ -566,7 +566,7 @@
     pageConfiguration->preferences()->setSampledPageTopColorMaxDifference([_configuration _sampledPageTopColorMaxDifference]);
     pageConfiguration->preferences()->setSampledPageTopColorMinHeight([_configuration _sampledPageTopColorMinHeight]);
 
-    if (!linkedOnOrAfter(WebCore::SDKVersion::FirstWhereSiteSpecificQuirksAreEnabledByDefault))
+    if (!linkedOnOrAfter(SDKVersion::FirstWhereSiteSpecificQuirksAreEnabledByDefault))
         pageConfiguration->preferences()->setNeedsSiteSpecificQuirks(false);
 
 #if PLATFORM(IOS_FAMILY)
@@ -872,7 +872,7 @@
 {
     THROW_IF_SUSPENDED;
     OptionSet<WebCore::ReloadOption> reloadOptions;
-    if (linkedOnOrAfter(WebCore::SDKVersion::FirstWithExpiredOnlyReloadBehavior))
+    if (linkedOnOrAfter(SDKVersion::FirstWithExpiredOnlyReloadBehavior))
         reloadOptions.add(WebCore::ReloadOption::ExpiredOnly);
 
     return wrapper(_page->reload(reloadOptions));
@@ -1242,7 +1242,7 @@
         }];
     };
 
-    if ((snapshotConfiguration && !snapshotConfiguration.afterScreenUpdates) || !linkedOnOrAfter(WebCore::SDKVersion::FirstWithSnapshotAfterScreenUpdates)) {
+    if ((snapshotConfiguration && !snapshotConfiguration.afterScreenUpdates) || !linkedOnOrAfter(SDKVersion::FirstWithSnapshotAfterScreenUpdates)) {
         callSnapshotRect();
         return;
     }

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -44,10 +44,10 @@
 #import "_WKWebsiteDataStoreInternal.h"
 #import <WebCore/RuntimeApplicationChecks.h>
 #import <WebCore/Settings.h>
-#import <WebCore/VersionChecks.h>
 #import <wtf/RetainPtr.h>
 #import <wtf/URLParser.h>
 #import <wtf/WeakObjCPtr.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #import <wtf/cocoa/VectorCocoa.h>
 
 #if PLATFORM(IOS_FAMILY)
@@ -105,7 +105,7 @@
 static bool defaultShouldDecidePolicyBeforeLoadingQuickLookPreview()
 {
 #if USE(QUICK_LOOK)
-    static bool shouldDecide = linkedOnOrAfter(WebCore::SDKVersion::FirstThatDecidesPolicyBeforeLoadingQuickLookPreview);
+    static bool shouldDecide = linkedOnOrAfter(SDKVersion::FirstThatDecidesPolicyBeforeLoadingQuickLookPreview);
     return shouldDecide;
 #else
     return false;
@@ -202,7 +202,7 @@
     _allowsInlineMediaPlaybackAfterFullscreen = !_allowsInlineMediaPlayback;
     _mediaDataLoadsAutomatically = _allowsInlineMediaPlayback;
 #if !PLATFORM(WATCHOS)
-    if (WebCore::linkedOnOrAfter(WebCore::SDKVersion::FirstWithMediaTypesRequiringUserActionForPlayback))
+    if (linkedOnOrAfter(SDKVersion::FirstWithMediaTypesRequiringUserActionForPlayback))
         _mediaTypesRequiringUserActionForPlayback = WKAudiovisualMediaTypeAudio;
     else
 #endif

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -47,11 +47,11 @@
 #import "_WKWebsiteDataStoreDelegate.h"
 #import <WebCore/Credential.h>
 #import <WebCore/RegistrationDatabase.h>
-#import <WebCore/VersionChecks.h>
 #import <WebCore/WebCoreObjCExtras.h>
 #import <wtf/BlockPtr.h>
 #import <wtf/URL.h>
 #import <wtf/WeakObjCPtr.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 
 class WebsiteDataStoreClient final : public WebKit::WebsiteDataStoreClient {
 public:
@@ -122,7 +122,7 @@
 
 - (instancetype)init
 {
-    if (WebCore::linkedOnOrAfter(WebCore::SDKVersion::FirstWithWKWebsiteDataStoreInitReturningNil))
+    if (linkedOnOrAfter(SDKVersion::FirstWithWKWebsiteDataStoreInitReturningNil))
         [NSException raise:NSGenericException format:@"Calling [WKWebsiteDataStore init] is not supported."];
     
     if (!(self = [super init]))

Modified: trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -59,12 +59,12 @@
 #import <WebCore/LocalCurrentTraitCollection.h>
 #import <WebCore/MIMETypeRegistry.h>
 #import <WebCore/RuntimeApplicationChecks.h>
-#import <WebCore/VersionChecks.h>
 #import <pal/spi/cocoa/QuartzCoreSPI.h>
 #import <pal/spi/ios/GraphicsServicesSPI.h>
 #import <wtf/BlockPtr.h>
 #import <wtf/FixedVector.h>
 #import <wtf/SystemTracing.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #import <wtf/cocoa/VectorCocoa.h>
 
 #if ENABLE(DATA_DETECTION)
@@ -633,7 +633,7 @@
 
 - (UIEdgeInsets)_computedObscuredInset
 {
-    if (!linkedOnOrAfter(WebCore::SDKVersion::FirstWhereScrollViewContentInsetsAreNotObscuringInsets)) {
+    if (!linkedOnOrAfter(SDKVersion::FirstWhereScrollViewContentInsetsAreNotObscuringInsets)) {
         // For binary compability with third party apps, treat scroll view content insets as obscuring insets when the app is compiled
         // against a WebKit version without the fix in r229641.
         return [self _computedContentInset];

Modified: trunk/Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -40,8 +40,8 @@
 #import "WebViewImpl.h"
 #import "_WKFrameHandleInternal.h"
 #import "_WKHitTestResultInternal.h"
-#import <WebCore/VersionChecks.h>
 #import <pal/spi/mac/NSTextFinderSPI.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 
 _WKOverlayScrollbarStyle toAPIScrollbarStyle(std::optional<WebCore::ScrollbarOverlayStyle> coreScrollbarStyle)
 {
@@ -1199,7 +1199,7 @@
     if ([uiDelegate respondsToSelector:@selector(_webView:dragDestinationActionMaskForDraggingInfo:)])
         return [uiDelegate _webView:self dragDestinationActionMaskForDraggingInfo:draggingInfo];
 
-    if (!linkedOnOrAfter(WebCore::SDKVersion::FirstWithDropToNavigateDisallowedByDefault))
+    if (!linkedOnOrAfter(SDKVersion::FirstWithDropToNavigateDisallowedByDefault))
         return WKDragDestinationActionAny;
 
     return WKDragDestinationActionAny & ~WKDragDestinationActionLoad;

Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -63,7 +63,6 @@
 #import <WebCore/RuntimeApplicationChecks.h>
 #import <WebCore/SharedBuffer.h>
 #import <WebCore/UTIUtilities.h>
-#import <WebCore/VersionChecks.h>
 #import <objc/runtime.h>
 #import <pal/spi/cf/CFNetworkSPI.h>
 #import <pal/spi/cf/CFNotificationCenterSPI.h>

Modified: trunk/Source/WebKit/UIProcess/Inspector/mac/WKInspectorViewController.mm (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/Inspector/mac/WKInspectorViewController.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/Inspector/mac/WKInspectorViewController.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -44,8 +44,8 @@
 #import "WebInspectorUtilities.h"
 #import "WebPageProxy.h"
 #import "_WKInspectorConfigurationInternal.h"
-#import <WebCore/VersionChecks.h>
 #import <wtf/WeakObjCPtr.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 
 static NSString * const WKInspectorResourceScheme = @"inspector-resource";
 
@@ -286,7 +286,7 @@
         return;
 
     OptionSet<WebCore::ReloadOption> reloadOptions;
-    if (WebCore::linkedOnOrAfter(WebCore::SDKVersion::FirstWithExpiredOnlyReloadBehavior))
+    if (linkedOnOrAfter(SDKVersion::FirstWithExpiredOnlyReloadBehavior))
         reloadOptions.add(WebCore::ReloadOption::ExpiredOnly);
 
     _inspectedPage->reload(reloadOptions);

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -41,7 +41,7 @@
 #include <WebCore/ScrollingStatePositionedNode.h>
 #include <WebCore/ScrollingStateTree.h>
 #include <WebCore/ScrollingTreeFrameScrollingNode.h>
-#include <WebCore/VersionChecks.h>
+#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 
 namespace WebKit {
 using namespace WebCore;
@@ -272,7 +272,7 @@
         return false;
 
 #if PLATFORM(IOS_FAMILY)
-    if (WebCore::IOSApplication::isEventbrite() && !linkedOnOrAfter(WebCore::SDKVersion::FirstThatSupportsOverflowHiddenOnMainFrame))
+    if (WebCore::IOSApplication::isEventbrite() && !linkedOnOrAfter(SDKVersion::FirstThatSupportsOverflowHiddenOnMainFrame))
         return true;
 #endif
 

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -225,9 +225,9 @@
 #include <WebCore/CoreAudioCaptureDeviceManager.h>
 #include <WebCore/RunLoopObserver.h>
 #include <WebCore/SystemBattery.h>
-#include <WebCore/VersionChecks.h>
 #include <wtf/MachSendRight.h>
 #include <wtf/cocoa/Entitlements.h>
+#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #endif
 
 #if PLATFORM(MAC)
@@ -1327,7 +1327,7 @@
     }
 
 #if PLATFORM(COCOA)
-    if (!linkedOnOrAfter(WebCore::SDKVersion::FirstWithoutUnconditionalUniversalSandboxExtension))
+    if (!linkedOnOrAfter(SDKVersion::FirstWithoutUnconditionalUniversalSandboxExtension))
         willAcquireUniversalFileReadSandboxExtension(process);
 #endif
 
@@ -2637,7 +2637,7 @@
 {
     if (!m_hasUpdatedRenderingAfterDidCommitLoad) {
 #if PLATFORM(COCOA)
-        static bool shouldMakeViewBlank = linkedOnOrAfter(WebCore::SDKVersion::FirstWithBlankViewOnJSPrompt);
+        static bool shouldMakeViewBlank = linkedOnOrAfter(SDKVersion::FirstWithBlankViewOnJSPrompt);
 #else
         static bool shouldMakeViewBlank = true;
 #endif

Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -136,7 +136,7 @@
 #include <WebCore/HIDGamepadProvider.h>
 #include <WebCore/MultiGamepadProvider.h>
 #include <WebCore/PowerSourceNotifier.h>
-#include <WebCore/VersionChecks.h>
+#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #endif
 
 #if PLATFORM(MAC)
@@ -275,7 +275,7 @@
     updateBackForwardCacheCapacity();
 
 #if PLATFORM(IOS)
-    if (WebCore::IOSApplication::isLutron() && !WebCore::linkedOnOrAfter(WebCore::SDKVersion::FirstWithSharedNetworkProcess)) {
+    if (WebCore::IOSApplication::isLutron() && !linkedOnOrAfter(SDKVersion::FirstWithSharedNetworkProcess)) {
         callOnMainRunLoop([] {
             if (WebsiteDataStore::defaultDataStoreExists())
                 WebsiteDataStore::defaultDataStore()->terminateNetworkProcess();
@@ -1124,7 +1124,7 @@
 
     bool enableProcessSwapOnCrossSiteNavigation = page->preferences().processSwapOnCrossSiteNavigationEnabled();
 #if PLATFORM(IOS_FAMILY)
-    if (WebCore::IOSApplication::isFirefox() && !linkedOnOrAfter(WebCore::SDKVersion::FirstWithProcessSwapOnCrossSiteNavigation))
+    if (WebCore::IOSApplication::isFirefox() && !linkedOnOrAfter(SDKVersion::FirstWithProcessSwapOnCrossSiteNavigation))
         enableProcessSwapOnCrossSiteNavigation = false;
 #endif
 

Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp	2022-01-07 04:28:29 UTC (rev 287737)
@@ -81,7 +81,7 @@
 #include "ObjCObjectGraph.h"
 #include "PDFPlugin.h"
 #include "UserMediaCaptureManagerProxy.h"
-#include <WebCore/VersionChecks.h>
+#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #endif
 
 #if PLATFORM(MAC)
@@ -128,9 +128,9 @@
 static bool isMainThreadOrCheckDisabled()
 {
 #if PLATFORM(IOS_FAMILY)
-    return LIKELY(RunLoop::isMain()) || !linkedOnOrAfter(WebCore::SDKVersion::FirstWithMainThreadReleaseAssertionInWebPageProxy);
+    return LIKELY(RunLoop::isMain()) || !linkedOnOrAfter(SDKVersion::FirstWithMainThreadReleaseAssertionInWebPageProxy);
 #elif PLATFORM(MAC)
-    return LIKELY(RunLoop::isMain()) || !linkedOnOrAfter(WebCore::SDKVersion::FirstWithMainThreadReleaseAssertionInWebPageProxy);
+    return LIKELY(RunLoop::isMain()) || !linkedOnOrAfter(SDKVersion::FirstWithMainThreadReleaseAssertionInWebPageProxy);
 #else
     return RunLoop::isMain();
 #endif

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentView.mm (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/ios/WKContentView.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentView.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -64,11 +64,11 @@
 #import <WebCore/Quirks.h>
 #import <WebCore/RuntimeApplicationChecks.h>
 #import <WebCore/VelocityData.h>
-#import <WebCore/VersionChecks.h>
 #import <objc/message.h>
 #import <pal/spi/cocoa/NSAccessibilitySPI.h>
 #import <pal/spi/cocoa/QuartzCoreSPI.h>
 #import <wtf/RetainPtr.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #import <wtf/text/TextStream.h>
 #import "AppKitSoftLink.h"
 
@@ -198,7 +198,7 @@
     [self addSubview:_fixedClippingView.get()];
     [_fixedClippingView addSubview:_rootContentView.get()];
 
-    if (!linkedOnOrAfter(WebCore::SDKVersion::FirstWithLazyGestureRecognizerInstallation))
+    if (!linkedOnOrAfter(SDKVersion::FirstWithLazyGestureRecognizerInstallation))
         [self setUpInteraction];
     [self setUserInteractionEnabled:YES];
 
@@ -222,7 +222,7 @@
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_applicationWillEnterForeground:) name:UIApplicationWillEnterForegroundNotification object:[UIApplication sharedApplication]];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_screenCapturedDidChange:) name:UIScreenCapturedDidChangeNotification object:[UIScreen mainScreen]];
 
-    if (WebCore::IOSApplication::isEvernote() && !linkedOnOrAfter(WebCore::SDKVersion::FirstWhereWKContentViewDoesNotOverrideKeyCommands))
+    if (WebCore::IOSApplication::isEvernote() && !linkedOnOrAfter(SDKVersion::FirstWhereWKContentViewDoesNotOverrideKeyCommands))
         class_addMethod(self.class, @selector(keyCommands), reinterpret_cast<IMP>(&keyCommandsPlaceholderHackForEvernote), method_getTypeEncoding(class_getInstanceMethod(self.class, @selector(keyCommands))));
 
     return self;

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -127,7 +127,6 @@
 #import <WebCore/TextRecognitionResult.h>
 #import <WebCore/TouchAction.h>
 #import <WebCore/UTIUtilities.h>
-#import <WebCore/VersionChecks.h>
 #import <WebCore/VisibleSelection.h>
 #import <WebCore/WebCoreCALayerExtras.h>
 #import <WebCore/WebEvent.h>
@@ -148,6 +147,7 @@
 #import <wtf/SetForScope.h>
 #import <wtf/WeakObjCPtr.h>
 #import <wtf/cocoa/NSURLExtras.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #import <wtf/cocoa/TypeCastsCocoa.h>
 #import <wtf/cocoa/VectorCocoa.h>
 #import <wtf/text/TextStream.h>
@@ -7777,7 +7777,7 @@
 - (BOOL)_shouldUseContextMenus
 {
 #if HAVE(LINK_PREVIEW) && USE(UICONTEXTMENU)
-    return linkedOnOrAfter(WebCore::SDKVersion::FirstThatHasUIContextMenuInteraction);
+    return linkedOnOrAfter(SDKVersion::FirstThatHasUIContextMenuInteraction);
 #endif
     return NO;
 }
@@ -9509,7 +9509,7 @@
         return YES;
     }
 
-    if (!WebCore::linkedOnOrAfter(WebCore::SDKVersion::FirstVersionWithiOSAppsOnMacOS)) {
+    if (!linkedOnOrAfter(SDKVersion::FirstVersionWithiOSAppsOnMacOS)) {
         if (WebCore::IOSApplication::isFIFACompanion() // <rdar://problem/67093487>
             || WebCore::IOSApplication::isNoggin() // <rdar://problem/64830335>
             || WebCore::IOSApplication::isOKCupid() // <rdar://problem/65698496>
@@ -9521,7 +9521,7 @@
         }
     }
 
-    if (!WebCore::linkedOnOrAfter(WebCore::SDKVersion::FirstThatSendsNativeMouseEvents)) {
+    if (!linkedOnOrAfter(SDKVersion::FirstThatSendsNativeMouseEvents)) {
         if (WebCore::IOSApplication::isPocketCity() // <rdar://problem/62273077>
             || WebCore::IOSApplication::isEssentialSkeleton() // <rdar://problem/62694519>
             || WebCore::IOSApplication::isESPNFantasySports() // <rdar://problem/64671543>

Modified: trunk/Source/WebKit/UIProcess/ios/WKScrollView.mm (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/ios/WKScrollView.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/ios/WKScrollView.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -31,9 +31,9 @@
 #import "UIKitSPI.h"
 #import "WKDeferringGestureRecognizer.h"
 #import "WKWebViewIOS.h"
-#import <WebCore/VersionChecks.h>
 #import <pal/spi/cg/CoreGraphicsSPI.h>
 #import <wtf/WeakObjCPtr.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 
 #if HAVE(PEPPER_UI_CORE)
 #import "PepperUICoreSPI.h"
@@ -422,7 +422,7 @@
     // to include keyboard insets in the systemContentInset. We always want
     // keyboard insets applied, even when web content has chosen to disable automatic
     // safe area inset adjustment.
-    if (linkedOnOrAfter(WebCore::SDKVersion::FirstWhereUIScrollViewDoesNotApplyKeyboardInsetsUnconditionally) && self.contentInsetAdjustmentBehavior == UIScrollViewContentInsetAdjustmentNever)
+    if (linkedOnOrAfter(SDKVersion::FirstWhereUIScrollViewDoesNotApplyKeyboardInsetsUnconditionally) && self.contentInsetAdjustmentBehavior == UIScrollViewContentInsetAdjustmentNever)
         systemContentInset.bottom += _keyboardBottomInsetAdjustment;
 
     return systemContentInset;

Modified: trunk/Source/WebKit/UIProcess/ios/WKStylusDeviceObserver.mm (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/ios/WKStylusDeviceObserver.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/ios/WKStylusDeviceObserver.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -30,9 +30,9 @@
 
 #import "WebProcessProxy.h"
 #import <UIKit/UIScribbleInteraction.h>
-#import <WebCore/VersionChecks.h>
 #import <wtf/RetainPtr.h>
 #import <wtf/Seconds.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 
 static Seconds changeTimeInterval { 10_min };
 
@@ -82,7 +82,7 @@
     if (++_startCount > 1)
         return;
 
-    if (WebCore::linkedOnOrAfter(WebCore::SDKVersion::FirstThatObservesClassProperty))
+    if (linkedOnOrAfter(SDKVersion::FirstThatObservesClassProperty))
         [[UIScribbleInteraction class] addObserver:self forKeyPath:@"isPencilInputExpected" options:NSKeyValueObservingOptionInitial context:nil];
 }
 
@@ -92,7 +92,7 @@
     if (!_startCount || --_startCount)
         return;
 
-    if (WebCore::linkedOnOrAfter(WebCore::SDKVersion::FirstThatObservesClassProperty))
+    if (linkedOnOrAfter(SDKVersion::FirstThatObservesClassProperty))
         [[UIScribbleInteraction class] removeObserver:self forKeyPath:@"isPencilInputExpected"];
 }
 

Modified: trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (287736 => 287737)


--- trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -70,8 +70,8 @@
 #import <WebCore/SharedBuffer.h>
 #import <WebCore/UserAgent.h>
 #import <WebCore/ValidationBubble.h>
-#import <WebCore/VersionChecks.h>
 #import <pal/spi/ios/MobileGestaltSPI.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #import <wtf/text/TextStream.h>
 
 #if USE(QUICK_LOOK)
@@ -1371,7 +1371,7 @@
         auto screenClass = MGGetSInt32Answer(kMGQMainScreenClass, MGScreenClassPad2);
         shouldRecommendDesktopClassBrowsing = screenClass != MGScreenClassPad3 && screenClass != MGScreenClassPad4 && desktopClassBrowsingSupported();
 #endif
-        if (ignoreSafeguards == IgnoreAppCompatibilitySafeguards::No && !linkedOnOrAfter(WebCore::SDKVersion::FirstWithModernCompabilityModeByDefault)) {
+        if (ignoreSafeguards == IgnoreAppCompatibilitySafeguards::No && !linkedOnOrAfter(SDKVersion::FirstWithModernCompabilityModeByDefault)) {
             // Opt out apps that haven't yet built against the iOS 13 SDK to limit any incompatibilities as a result of enabling desktop-class browsing by default in
             // WKWebView on appropriately-sized iPad models.
             shouldRecommendDesktopClassBrowsing = false;

Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (287736 => 287737)


--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -80,7 +80,6 @@
 #import <WebCore/SystemBattery.h>
 #import <WebCore/SystemSoundManager.h>
 #import <WebCore/UTIUtilities.h>
-#import <WebCore/VersionChecks.h>
 #import <WebCore/WebMAudioUtilitiesCocoa.h>
 #import <algorithm>
 #import <dispatch/dispatch.h>

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (287736 => 287737)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2022-01-07 04:28:29 UTC (rev 287737)
@@ -1,3 +1,29 @@
+2022-01-06  Tim Horton  <timothy_hor...@apple.com>
+
+        Move linkedOnOrAfter() to WTF
+        https://bugs.webkit.org/show_bug.cgi?id=234942
+
+        Reviewed by Darin Adler.
+
+        * DefaultDelegates/WebDefaultUIDelegate.mm:
+        (-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):
+        * Misc/WebDownload.mm:
+        (shouldCallOnNetworkThread):
+        * Misc/WebIconDatabase.mm:
+        (+[WebIconDatabase sharedIconDatabase]):
+        * WebView/WebPreferencesDefaultValues.mm:
+        (WebKit::defaultAllowsPictureInPictureMediaPlayback):
+        (WebKit::defaultJavaScriptCanOpenWindowsAutomatically):
+        (WebKit::defaultPassiveTouchListenersAsDefaultOnDocument):
+        (WebKit::defaultRequiresUserGestureToLoadVideo):
+        (WebKit::defaultWebSQLEnabled):
+        (WebKit::defaultShouldRestrictBaseURLSchemes):
+        (WebKit::defaultShouldConvertInvalidURLsToBlank):
+        (WebKit::defaultPassiveWheelListenersAsDefaultOnDocument):
+        (WebKit::defaultWheelEventGesturesBecomeNonBlocking):
+        * WebView/WebView.mm:
+        (needsLaBanquePostaleQuirks):
+
 2022-01-06  Alex Christensen  <achristen...@webkit.org>
 
         Start using C++20

Modified: trunk/Source/WebKitLegacy/mac/DefaultDelegates/WebDefaultUIDelegate.mm (287736 => 287737)


--- trunk/Source/WebKitLegacy/mac/DefaultDelegates/WebDefaultUIDelegate.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKitLegacy/mac/DefaultDelegates/WebDefaultUIDelegate.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -35,7 +35,7 @@
 
 #if PLATFORM(MAC)
 #import "WebJavaScriptTextInputPanel.h"
-#import <WebCore/VersionChecks.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #endif
 
 #if PLATFORM(IOS_FAMILY)
@@ -216,7 +216,7 @@
 #if PLATFORM(MAC)
 - (NSUInteger)webView:(WebView *)webView dragDestinationActionMaskForDraggingInfo:(id <NSDraggingInfo>)draggingInfo
 {
-    if (!linkedOnOrAfter(WebCore::SDKVersion::FirstWithDropToNavigateDisallowedByDefault))
+    if (!linkedOnOrAfter(SDKVersion::FirstWithDropToNavigateDisallowedByDefault))
         return WebDragDestinationActionAny;
 
     return WebDragDestinationActionAny & ~WebDragDestinationActionLoad;

Modified: trunk/Source/WebKitLegacy/mac/Misc/WebDownload.mm (287736 => 287737)


--- trunk/Source/WebKitLegacy/mac/Misc/WebDownload.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebDownload.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -36,18 +36,18 @@
 #import <WebCore/NetworkStorageSession.h>
 #import <WebCore/ProtectionSpace.h>
 #import <WebCore/RuntimeApplicationChecks.h>
-#import <WebCore/VersionChecks.h>
 #import <WebKitLegacy/WebPanelAuthenticationHandler.h>
 #import <pal/spi/cocoa/NSURLDownloadSPI.h>
 #import <wtf/Assertions.h>
 #import <wtf/MainThread.h>
 #import <wtf/WorkQueue.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #import <wtf/spi/darwin/dyldSPI.h>
 
 static bool shouldCallOnNetworkThread()
 {
 #if PLATFORM(MAC)
-    static bool isOldEpsonSoftwareUpdater = WebCore::MacApplication::isEpsonSoftwareUpdater() && !linkedOnOrAfter(WebCore::SDKVersion::FirstWithDownloadDelegatesCalledOnTheMainThread);
+    static bool isOldEpsonSoftwareUpdater = WebCore::MacApplication::isEpsonSoftwareUpdater() && !linkedOnOrAfter(SDKVersion::FirstWithDownloadDelegatesCalledOnTheMainThread);
     return isOldEpsonSoftwareUpdater;
 #else
     return false;

Modified: trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm (287736 => 287737)


--- trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -33,11 +33,11 @@
 #import <_javascript_Core/InitializeThreading.h>
 #import <WebCore/Image.h>
 #import <WebCore/ThreadCheck.h>
-#import <WebCore/VersionChecks.h>
 #import <WebCore/WebCoreJITOperations.h>
 #import <wtf/MainThread.h>
 #import <wtf/NeverDestroyed.h>
 #import <wtf/RunLoop.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 
 using namespace WebCore;
 
@@ -108,7 +108,7 @@
     static NeverDestroyed<RetainPtr<WebIconDatabase>> database;
     static dispatch_once_t once;
     dispatch_once(&once, ^ {
-        if (linkedOnOrAfter(WebCore::SDKVersion::FirstWithWebIconDatabaseWarning))
+        if (linkedOnOrAfter(SDKVersion::FirstWithWebIconDatabaseWarning))
             NSLog(@"+[WebIconDatabase sharedIconDatabase] is not API and should not be used. WebIconDatabase no longer handles icon loading and it will be removed in a future release.");
 
         database.get() = adoptNS([[WebIconDatabase alloc] init]);

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm (287736 => 287737)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -28,7 +28,6 @@
 #import "WebKitVersionChecks.h"
 #import <Foundation/NSBundle.h>
 #import <WebCore/RuntimeApplicationChecks.h>
-#import <WebCore/VersionChecks.h>
 #import <mach-o/dyld.h>
 #import <pal/spi/cf/CFUtilitiesSPI.h>
 #import <pal/spi/cocoa/FeatureFlagsSPI.h>
@@ -103,13 +102,13 @@
 
 bool defaultAllowsPictureInPictureMediaPlayback()
 {
-    static bool shouldAllowPictureInPictureMediaPlayback = WebCore::linkedOnOrAfter(WebCore::SDKVersion::FirstWithPictureInPictureMediaPlayback);
+    static bool shouldAllowPictureInPictureMediaPlayback = linkedOnOrAfter(SDKVersion::FirstWithPictureInPictureMediaPlayback);
     return shouldAllowPictureInPictureMediaPlayback;
 }
 
 bool defaultJavaScriptCanOpenWindowsAutomatically()
 {
-    static bool shouldAllowWindowOpenWithoutUserGesture = WebCore::IOSApplication::isTheSecretSocietyHiddenMystery() && !linkedOnOrAfter(WebCore::SDKVersion::FirstWithoutTheSecretSocietyHiddenMysteryWindowOpenQuirk);
+    static bool shouldAllowWindowOpenWithoutUserGesture = WebCore::IOSApplication::isTheSecretSocietyHiddenMystery() && !linkedOnOrAfter(SDKVersion::FirstWithoutTheSecretSocietyHiddenMysteryWindowOpenQuirk);
     return shouldAllowWindowOpenWithoutUserGesture;
 }
 
@@ -120,13 +119,13 @@
 
 bool defaultPassiveTouchListenersAsDefaultOnDocument()
 {
-    static bool result = linkedOnOrAfter(WebCore::SDKVersion::FirstThatDefaultsToPassiveTouchListenersOnDocument);
+    static bool result = linkedOnOrAfter(SDKVersion::FirstThatDefaultsToPassiveTouchListenersOnDocument);
     return result;
 }
 
 bool defaultRequiresUserGestureToLoadVideo()
 {
-    static bool shouldRequireUserGestureToLoadVideo = linkedOnOrAfter(WebCore::SDKVersion::FirstThatRequiresUserGestureToLoadVideo);
+    static bool shouldRequireUserGestureToLoadVideo = linkedOnOrAfter(SDKVersion::FirstThatRequiresUserGestureToLoadVideo);
     return shouldRequireUserGestureToLoadVideo;
 }
 
@@ -133,7 +132,7 @@
 bool defaultWebSQLEnabled()
 {
     // For backward compatibility, keep WebSQL working until apps are rebuilt with the iOS 14 SDK.
-    static bool webSQLEnabled = !linkedOnOrAfter(WebCore::SDKVersion::FirstWithWebSQLDisabledByDefaultInLegacyWebKit);
+    static bool webSQLEnabled = !linkedOnOrAfter(SDKVersion::FirstWithWebSQLDisabledByDefaultInLegacyWebKit);
     return webSQLEnabled;
 }
 
@@ -228,7 +227,7 @@
 
 bool defaultShouldRestrictBaseURLSchemes()
 {
-    static bool shouldRestrictBaseURLSchemes = linkedOnOrAfter(WebCore::SDKVersion::FirstThatRestrictsBaseURLSchemes);
+    static bool shouldRestrictBaseURLSchemes = linkedOnOrAfter(SDKVersion::FirstThatRestrictsBaseURLSchemes);
     return shouldRestrictBaseURLSchemes;
 }
 
@@ -257,7 +256,7 @@
 
 bool defaultShouldConvertInvalidURLsToBlank()
 {
-    static bool shouldConvertInvalidURLsToBlank = linkedOnOrAfter(WebCore::SDKVersion::FirstThatConvertsInvalidURLsToBlank);
+    static bool shouldConvertInvalidURLsToBlank = linkedOnOrAfter(SDKVersion::FirstThatConvertsInvalidURLsToBlank);
     return shouldConvertInvalidURLsToBlank;
 }
 
@@ -265,13 +264,13 @@
 
 bool defaultPassiveWheelListenersAsDefaultOnDocument()
 {
-    static bool result = linkedOnOrAfter(WebCore::SDKVersion::FirstThatDefaultsToPassiveWheelListenersOnDocument);
+    static bool result = linkedOnOrAfter(SDKVersion::FirstThatDefaultsToPassiveWheelListenersOnDocument);
     return result;
 }
 
 bool defaultWheelEventGesturesBecomeNonBlocking()
 {
-    static bool result = linkedOnOrAfter(WebCore::SDKVersion::FirstThatAllowsWheelEventGesturesToBecomeNonBlocking);
+    static bool result = linkedOnOrAfter(SDKVersion::FirstThatAllowsWheelEventGesturesToBecomeNonBlocking);
     return result;
 }
 

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (287736 => 287737)


--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2022-01-07 01:02:51 UTC (rev 287736)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2022-01-07 04:28:29 UTC (rev 287737)
@@ -228,7 +228,6 @@
 #import <WebCore/UserScript.h>
 #import <WebCore/UserStyleSheet.h>
 #import <WebCore/ValidationBubble.h>
-#import <WebCore/VersionChecks.h>
 #import <WebCore/WebCoreJITOperations.h>
 #import <WebCore/WebCoreObjCExtras.h>
 #import <WebCore/WebCoreView.h>
@@ -269,6 +268,7 @@
 #import <wtf/StdLibExtras.h>
 #import <wtf/WeakObjCPtr.h>
 #import <wtf/WorkQueue.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
 #import <wtf/cocoa/VectorCocoa.h>
 #import <wtf/spi/darwin/dyldSPI.h>
 
@@ -1391,7 +1391,7 @@
 #if PLATFORM(IOS)
 static bool needsLaBanquePostaleQuirks()
 {
-    static bool needsQuirks = WebCore::IOSApplication::isLaBanquePostale() && !linkedOnOrAfter(WebCore::SDKVersion::FirstWithoutLaBanquePostaleQuirks);
+    static bool needsQuirks = WebCore::IOSApplication::isLaBanquePostale() && !linkedOnOrAfter(SDKVersion::FirstWithoutLaBanquePostaleQuirks);
     return needsQuirks;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to