Log Message
Move more linked-on-or-after checks to WebCore::linkedOnOrAfter() https://bugs.webkit.org/show_bug.cgi?id=230694
Reviewed by Wenson Hsieh. Source/WebCore: * platform/cocoa/VersionChecks.h: Add more versions, move DYLD_IOS_VERSION_FIRST_WITH_IOS_APPS_ON_MACOS inline, and sort some that are out of order. Source/WebKit: * UIProcess/API/Cocoa/WKWebView.mm: (shouldRequireUserGestureToLoadVideo): (-[WKWebView _initializeWithConfiguration:]): Source/WebKitLegacy/mac: * Misc/WebDownload.mm: (shouldCallOnNetworkThread): * WebView/WebPreferencesDefaultValues.mm: (WebKit::defaultRequiresUserGestureToLoadVideo): (WebKit::defaultWebSQLEnabled): (WebKit::defaultShouldConvertInvalidURLsToBlank): Source/WTF: * wtf/spi/darwin/dyldSPI.h:
Modified Paths
- trunk/Source/WTF/ChangeLog
- trunk/Source/WTF/wtf/spi/darwin/dyldSPI.h
- trunk/Source/WebCore/ChangeLog
- trunk/Source/WebCore/platform/cocoa/VersionChecks.h
- trunk/Source/WebKit/ChangeLog
- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
- trunk/Source/WebKitLegacy/mac/ChangeLog
- trunk/Source/WebKitLegacy/mac/Misc/WebDownload.mm
- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm
Diff
Modified: trunk/Source/WTF/ChangeLog (282987 => 282988)
--- trunk/Source/WTF/ChangeLog 2021-09-23 19:45:31 UTC (rev 282987)
+++ trunk/Source/WTF/ChangeLog 2021-09-23 20:05:18 UTC (rev 282988)
@@ -1,3 +1,12 @@
+2021-09-23 Tim Horton <[email protected]>
+
+ Move more linked-on-or-after checks to WebCore::linkedOnOrAfter()
+ https://bugs.webkit.org/show_bug.cgi?id=230694
+
+ Reviewed by Wenson Hsieh.
+
+ * wtf/spi/darwin/dyldSPI.h:
+
2021-09-23 Jean-Yves Avenard <[email protected]>
Opus and Vorbis codecs aren't available on iPad.
Modified: trunk/Source/WTF/wtf/spi/darwin/dyldSPI.h (282987 => 282988)
--- trunk/Source/WTF/wtf/spi/darwin/dyldSPI.h 2021-09-23 19:45:31 UTC (rev 282987)
+++ trunk/Source/WTF/wtf/spi/darwin/dyldSPI.h 2021-09-23 20:05:18 UTC (rev 282988)
@@ -61,6 +61,10 @@
#define DYLD_IOS_VERSION_14_0 0x000E0000
#endif
+#ifndef DYLD_IOS_VERSION_14_2
+#define DYLD_IOS_VERSION_14_2 0x000E0200
+#endif
+
#ifndef DYLD_IOS_VERSION_14_5
#define DYLD_IOS_VERSION_14_5 0x000E0500
#endif
@@ -126,6 +130,7 @@
#define DYLD_IOS_VERSION_13_2 0x000D0200
#define DYLD_IOS_VERSION_13_4 0x000D0400
#define DYLD_IOS_VERSION_14_0 0x000E0000
+#define DYLD_IOS_VERSION_14_2 0x000E0200
#define DYLD_IOS_VERSION_14_5 0x000E0500
#define DYLD_IOS_VERSION_15_0 0x000f0000
#define DYLD_IOS_VERSION_16_0 0x00100000
Modified: trunk/Source/WebCore/ChangeLog (282987 => 282988)
--- trunk/Source/WebCore/ChangeLog 2021-09-23 19:45:31 UTC (rev 282987)
+++ trunk/Source/WebCore/ChangeLog 2021-09-23 20:05:18 UTC (rev 282988)
@@ -1,3 +1,14 @@
+2021-09-23 Tim Horton <[email protected]>
+
+ Move more linked-on-or-after checks to WebCore::linkedOnOrAfter()
+ https://bugs.webkit.org/show_bug.cgi?id=230694
+
+ Reviewed by Wenson Hsieh.
+
+ * platform/cocoa/VersionChecks.h:
+ Add more versions, move DYLD_IOS_VERSION_FIRST_WITH_IOS_APPS_ON_MACOS
+ inline, and sort some that are out of order.
+
2021-09-23 Devin Rousso <[email protected]>
Web Inspector: Graphics: add instrumentation for new `CanvasRenderingContext2DSettings`
Modified: trunk/Source/WebCore/platform/cocoa/VersionChecks.h (282987 => 282988)
--- trunk/Source/WebCore/platform/cocoa/VersionChecks.h 2021-09-23 19:45:31 UTC (rev 282987)
+++ trunk/Source/WebCore/platform/cocoa/VersionChecks.h 2021-09-23 20:05:18 UTC (rev 282988)
@@ -27,12 +27,6 @@
#import <wtf/spi/darwin/dyldSPI.h>
-#if USE(APPLE_INTERNAL_SDK)
-#import <WebKitAdditions/VersionChecksAdditions.h>
-#else
-#define DYLD_IOS_VERSION_FIRST_WITH_IOS_APPS_ON_MACOS 0
-#endif
-
namespace WebCore {
enum class SDKVersion : uint32_t {
@@ -39,6 +33,9 @@
#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,
FirstWithExceptionsForDuplicateCompletionHandlerCalls = DYLD_IOS_VERSION_11_0,
FirstWithExpiredOnlyReloadBehavior = DYLD_IOS_VERSION_11_0,
FirstThatDisallowsSettingAnyXHRHeaderFromFileURLs = DYLD_IOS_VERSION_11_3,
@@ -46,9 +43,9 @@
FirstWhereScrollViewContentInsetsAreNotObscuringInsets = DYLD_IOS_VERSION_12_0,
FirstWhereUIScrollViewDoesNotApplyKeyboardInsetsUnconditionally = DYLD_IOS_VERSION_12_0,
FirstWithMainThreadReleaseAssertionInWebPageProxy = DYLD_IOS_VERSION_12_0,
- FirstWithoutUnconditionalUniversalSandboxExtension = DYLD_IOS_VERSION_13_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,
@@ -59,33 +56,34 @@
FirstThatSupportsOverflowHiddenOnMainFrame = 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,
- FirstThatSendsNativeMouseEvents = DYLD_IOS_VERSION_13_4,
FirstWithInitializeWebKit2MainThreadAssertion = DYLD_IOS_VERSION_14_0,
FirstWithWKWebsiteDataStoreInitReturningNil = DYLD_IOS_VERSION_14_0,
- FirstVersionWithiOSAppsOnMacOS = DYLD_IOS_VERSION_FIRST_WITH_IOS_APPS_ON_MACOS,
+ FirstWithWebSQLDisabledByDefaultInLegacyWebKit = 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,
- FirstWithNullOriginForNonSpecialSchemedURLs = DYLD_IOS_VERSION_15_0,
FirstWithoutWeChatScrollingQuirk = DYLD_IOS_VERSION_14_5,
- FirstWithDOMWindowReuseRestriction = DYLD_IOS_VERSION_15_0,
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,
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,
- FirstThatDefaultsToPassiveWheelListenersOnDocument = DYLD_MACOSX_VERSION_11_3,
- FirstThatAllowsWheelEventGesturesToBecomeNonBlocking = DYLD_MACOSX_VERSION_11_3,
FirstWithWebIconDatabaseWarning = DYLD_MACOSX_VERSION_10_13,
FirstWithMainThreadReleaseAssertionInWebPageProxy = 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,
@@ -97,6 +95,8 @@
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,
FirstForbiddingDotPrefixedFonts = DYLD_MACOSX_VERSION_13_0,
Modified: trunk/Source/WebKit/ChangeLog (282987 => 282988)
--- trunk/Source/WebKit/ChangeLog 2021-09-23 19:45:31 UTC (rev 282987)
+++ trunk/Source/WebKit/ChangeLog 2021-09-23 20:05:18 UTC (rev 282988)
@@ -1,5 +1,16 @@
2021-09-23 Tim Horton <[email protected]>
+ Move more linked-on-or-after checks to WebCore::linkedOnOrAfter()
+ https://bugs.webkit.org/show_bug.cgi?id=230694
+
+ Reviewed by Wenson Hsieh.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (shouldRequireUserGestureToLoadVideo):
+ (-[WKWebView _initializeWithConfiguration:]):
+
+2021-09-23 Tim Horton <[email protected]>
+
shouldAllowPictureInPictureMediaPlayback should use WebCore's linkedOnOrAfter()
https://bugs.webkit.org/show_bug.cgi?id=230674
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (282987 => 282988)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2021-09-23 19:45:31 UTC (rev 282987)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2021-09-23 20:05:18 UTC (rev 282988)
@@ -186,18 +186,14 @@
#import <WebCore/ColorMac.h>
#endif
-#if PLATFORM(IOS_FAMILY)
#if PLATFORM(WATCHOS)
static const BOOL defaultAllowsViewportShrinkToFit = YES;
static const BOOL defaultFastClickingEnabled = YES;
-#else
+#elif PLATFORM(IOS_FAMILY)
static const BOOL defaultAllowsViewportShrinkToFit = NO;
static const BOOL defaultFastClickingEnabled = NO;
#endif
-static const uint32_t firstSDKVersionWithLinkPreviewEnabledByDefault = 0xA0000;
-#endif // PLATFORM(IOS_FAMILY)
-
#define THROW_IF_SUSPENDED if (UNLIKELY(_page && _page->isSuspended())) \
[NSException raise:NSInternalInconsistencyException format:@"The WKWebView is suspended"]
@@ -260,7 +256,7 @@
static bool shouldRequireUserGestureToLoadVideo()
{
#if PLATFORM(IOS_FAMILY)
- static bool shouldRequireUserGestureToLoadVideo = dyld_get_program_sdk_version() >= DYLD_IOS_VERSION_10_0;
+ static bool shouldRequireUserGestureToLoadVideo = linkedOnOrAfter(WebCore::SDKVersion::FirstThatRequiresUserGestureToLoadVideo);
return shouldRequireUserGestureToLoadVideo;
#else
return false;
@@ -369,10 +365,8 @@
_viewportMetaTagWidth = WebCore::ViewportArguments::ValueAuto;
_initialScaleFactor = 1;
_allowsViewportShrinkToFit = defaultAllowsViewportShrinkToFit;
+ _allowsLinkPreview = linkedOnOrAfter(WebCore::SDKVersion::FirstWithLinkPreviewEnabledByDefault);
- static uint32_t programSDKVersion = dyld_get_program_sdk_version();
- _allowsLinkPreview = programSDKVersion >= firstSDKVersionWithLinkPreviewEnabledByDefault;
-
auto fastClickingEnabled = []() {
if (NSNumber *enabledValue = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitFastClickingDisabled"])
return enabledValue.boolValue;
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (282987 => 282988)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2021-09-23 19:45:31 UTC (rev 282987)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2021-09-23 20:05:18 UTC (rev 282988)
@@ -1,5 +1,19 @@
2021-09-23 Tim Horton <[email protected]>
+ Move more linked-on-or-after checks to WebCore::linkedOnOrAfter()
+ https://bugs.webkit.org/show_bug.cgi?id=230694
+
+ Reviewed by Wenson Hsieh.
+
+ * Misc/WebDownload.mm:
+ (shouldCallOnNetworkThread):
+ * WebView/WebPreferencesDefaultValues.mm:
+ (WebKit::defaultRequiresUserGestureToLoadVideo):
+ (WebKit::defaultWebSQLEnabled):
+ (WebKit::defaultShouldConvertInvalidURLsToBlank):
+
+2021-09-23 Tim Horton <[email protected]>
+
shouldAllowPictureInPictureMediaPlayback should use WebCore's linkedOnOrAfter()
https://bugs.webkit.org/show_bug.cgi?id=230674
Modified: trunk/Source/WebKitLegacy/mac/Misc/WebDownload.mm (282987 => 282988)
--- trunk/Source/WebKitLegacy/mac/Misc/WebDownload.mm 2021-09-23 19:45:31 UTC (rev 282987)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebDownload.mm 2021-09-23 20:05:18 UTC (rev 282988)
@@ -36,6 +36,7 @@
#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>
@@ -46,7 +47,7 @@
static bool shouldCallOnNetworkThread()
{
#if PLATFORM(MAC)
- static bool isOldEpsonSoftwareUpdater = WebCore::MacApplication::isEpsonSoftwareUpdater() && dyld_get_program_sdk_version() < DYLD_MACOSX_VERSION_10_15;
+ static bool isOldEpsonSoftwareUpdater = WebCore::MacApplication::isEpsonSoftwareUpdater() && !linkedOnOrAfter(WebCore::SDKVersion::FirstWithDownloadDelegatesCalledOnTheMainThread);
return isOldEpsonSoftwareUpdater;
#else
return false;
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm (282987 => 282988)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm 2021-09-23 19:45:31 UTC (rev 282987)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm 2021-09-23 20:05:18 UTC (rev 282988)
@@ -126,7 +126,7 @@
bool defaultRequiresUserGestureToLoadVideo()
{
- static bool shouldRequireUserGestureToLoadVideo = dyld_get_program_sdk_version() >= DYLD_IOS_VERSION_10_0;
+ static bool shouldRequireUserGestureToLoadVideo = linkedOnOrAfter(WebCore::SDKVersion::FirstThatRequiresUserGestureToLoadVideo);
return shouldRequireUserGestureToLoadVideo;
}
@@ -133,7 +133,7 @@
bool defaultWebSQLEnabled()
{
// For backward compatibility, keep WebSQL working until apps are rebuilt with the iOS 14 SDK.
- static bool webSQLEnabled = dyld_get_program_sdk_version() < DYLD_IOS_VERSION_14_0;
+ static bool webSQLEnabled = !linkedOnOrAfter(WebCore::SDKVersion::FirstWithWebSQLDisabledByDefaultInLegacyWebKit);
return webSQLEnabled;
}
@@ -251,11 +251,7 @@
bool defaultShouldConvertInvalidURLsToBlank()
{
-#if PLATFORM(IOS_FAMILY)
- static bool shouldConvertInvalidURLsToBlank = dyld_get_program_sdk_version() >= DYLD_IOS_VERSION_10_0;
-#else
- static bool shouldConvertInvalidURLsToBlank = dyld_get_program_sdk_version() >= DYLD_MACOSX_VERSION_10_12;
-#endif
+ static bool shouldConvertInvalidURLsToBlank = linkedOnOrAfter(WebCore::SDKVersion::FirstThatConvertsInvalidURLsToBlank);
return shouldConvertInvalidURLsToBlank;
}
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
