While PLATFORM(IOS) evaluates to true on watchOS, __IPHONE_OS_VERSION_MIN_REQUIRED is defined as 90000 for compatibility purposes. Therefore, checks such as "PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000" will evaluate to false on watchOS. We should audit these checks to see if there is code being excluded that shouldn't.
Here are things that look suspicious to me at first glance: Platform.h: #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000) || USE(GCRYPT) #define HAVE_RSA_PSS 1 #endif #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000 && !PLATFORM(APPLETV)) #define HAVE_URL_FORMATTING 1 #endif #if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) #define ENABLE_ACCESSIBILITY_EVENTS 1 #define HAVE_SEC_KEY_PROXY 1 #endif WebContentReaderCocoa.mm: #if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) ... stuff for createFragment() FontCacheCoreText.cpp: #define HAS_CORE_TEXT_WIDTH_ATTRIBUTE ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)) #define CAN_DISALLOW_USER_INSTALLED_FONTS ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000)) #if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) CFStringRef nameAttribute = kCTFontPostScriptNameAttribute; #else CFStringRef nameAttribute = kCTFontNameAttribute; #endif #if ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)) optOutFromGXNormalization = CTFontDescriptorIsSystemUIFont(fontDescriptor); #endif FontPlatformDataCocoa.mm: #define WORKAROUND_CORETEXT_VARIATIONS_WITH_FALLBACK_LIST_BUG (ENABLE(VARIATION_FONTS) && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED < 110000))) FontCustomPlatformData.cpp: The check in createFontCustomPlatformData. FontDescription.h: #define USE_PLATFORM_SYSTEM_FALLBACK_LIST ((PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300)) ResourceRequestCFNet.cpp: Stuff about _kCFHTTPCookiePolicyPropertySiteForCookies. CookieCocoa.mm: Same-site cookie stuff. ResourceRequestCocoa.mm: More same-site cookie stuff. CookieJarMac.mm: More same-site cookie stuff. NetworkDataTaskCocoa.mm: More same-site cookie stuff. NetworkProcessCocoa.mm: Implementation of syncAllCookies. NetworkSessionCocoa.mm: Network load metrics that are mysteriously guarded by "(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)" _suppressedAutoAddedHTTPHeaders SPI
Also from WebKit's config.h: #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000) #ifndef ENABLE_SERVER_PRECONNECT #define ENABLE_SERVER_PRECONNECT 1 #endif #endif
<rdar://problem/41067844>
I feel like PLATFORM(IOS) includes watchOS/tvOS is weird. For HAVE_RSA_PSS and HAVE_SEC_KEY_PROXY, they should be available for equivalent watchOS version.
(In reply to Jiewen Tan from comment #4) > I feel like PLATFORM(IOS) includes watchOS/tvOS is weird. Agree, and I think at some point we’ll change that (and introduce a separate macro that explicitly covers all three Cocoa-Touch-based platforms), but not right now.