[Cocoa] font-family:system-ui on Chinese systems don't get Chinese quote marks
https://bugs.webkit.org/show_bug.cgi?id=202778
Unreviewed.
Addressing post-review comment.
* platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
(WebCore::SystemFontDatabaseCoreText::createSystemUIFont):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@251093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 92df240..117b129 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2019-10-14 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [Cocoa] font-family:system-ui on Chinese systems don't get Chinese quote marks
+ https://bugs.webkit.org/show_bug.cgi?id=202778
+
+ Unreviewed.
+
+ Addressing post-review comment.
+
+ * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
+ (WebCore::SystemFontDatabaseCoreText::createSystemUIFont):
+
2019-10-14 Alex Christensen <achristensen@webkit.org>
REGRESSION: [iOS 13?] TestWebKitAPI.SharedBufferTest.tryCreateArrayBufferLargeSegments is failing
diff --git a/Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp b/Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp
index e49ba1a..7b86ce0 100644
--- a/Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp
+++ b/Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp
@@ -49,6 +49,10 @@
RetainPtr<CTFontRef> SystemFontDatabaseCoreText::createSystemUIFont(const CascadeListParameters& parameters, CFStringRef locale)
{
+ // Work around a quirk of the platform API.
+ // If the passed string is empty instead of null,
+ // CoreText doesn't use the system's locale instead.
+ // We need to use the system locale in this case.
if (locale && !CFStringGetLength(locale))
locale = nullptr;
auto result = adoptCF(CTFontCreateUIFontForLanguage(kCTFontUIFontSystem, parameters.size, locale));