Changeset 258658 in webkit
- Timestamp:
- Mar 18, 2020 12:28:39 PM (4 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r258564 r258658 1 2020-03-18 Myles C. Maxfield <mmaxfield@apple.com> 2 3 REGRESSION(r254389): Cordova throws an exception because it expects a hyphen inside navigator.locale 4 https://bugs.webkit.org/show_bug.cgi?id=208969 5 <rdar://problem/59845517> 6 7 Reviewed by Darin Adler. 8 9 We want to thwart fingerprinting by minimizing the list of locales, but we also don't want to break existing apps. 10 We can achieve both by a linked-on-or-after check. 11 12 * wtf/cocoa/LanguageCocoa.mm: 13 (WTF::canMinimizeLanguages): 14 1 15 2020-03-17 Alex Christensen <achristensen@webkit.org> 2 16 -
trunk/Source/WTF/wtf/cocoa/LanguageCocoa.mm
r254413 r258658 28 28 29 29 #import <wtf/NeverDestroyed.h> 30 #import <wtf/cocoa/RuntimeApplicationChecksCocoa.h> 30 31 #import <wtf/spi/cocoa/NSLocaleSPI.h> 31 32 … … 34 35 bool canMinimizeLanguages() 35 36 { 36 static bool result = [NSLocale respondsToSelector:@selector(minimizedLanguagesFromLanguages:)]; 37 static const bool result = []() -> bool { 38 #if PLATFORM(MAC) 39 if (applicationSDKVersion() < DYLD_MACOSX_VERSION_10_15_4) 40 return false; 41 #endif 42 #if PLATFORM(IOS) 43 if (applicationSDKVersion() < DYLD_IOS_VERSION_13_4) 44 return false; 45 #endif 46 return [NSLocale respondsToSelector:@selector(minimizedLanguagesFromLanguages:)]; 47 }(); 37 48 return result; 38 49 }
Note: See TracChangeset
for help on using the changeset viewer.