WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
186572
[watchOS] Audit code that is excluded due to __IPHONE_OS_VERSION_MIN_REQUIRED checks
https://bugs.webkit.org/show_bug.cgi?id=186572
Summary
[watchOS] Audit code that is excluded due to __IPHONE_OS_VERSION_MIN_REQUIRED...
Andy Estes
Reported
2018-06-12 12:07:10 PDT
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Andy Estes
Comment 1
2018-06-12 16:59:57 PDT
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
Andy Estes
Comment 2
2018-06-12 17:03:18 PDT
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
Radar WebKit Bug Importer
Comment 3
2018-06-12 17:08:21 PDT
<
rdar://problem/41067844
>
Jiewen Tan
Comment 4
2018-06-13 11:18:54 PDT
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.
Tim Horton
Comment 5
2018-06-13 11:35:01 PDT
(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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug