[Cocoa] font-family:system-ui on Chinese systems don't get Chinese quote marks
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Oct 2019 21:38:55 +0000 (21:38 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Oct 2019 21:38:55 +0000 (21:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=202778
<rdar://problem/52594556>

Reviewed by Simon Fraser.

Source/WebCore:

This was caught by fast/text/international/system-language/han-quotes.html,
but we didn't have time to fix it until now.

Test: fast/text/international/system-language/han-quotes.html

* platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
(WebCore::SystemFontDatabaseCoreText::createSystemUIFont):

LayoutTests:

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250989 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp

index ab96aa0..6a1e376 100644 (file)
@@ -1,3 +1,13 @@
+2019-10-10  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
+        <rdar://problem/52594556>
+
+        Reviewed by Simon Fraser.
+
+        * platform/mac/TestExpectations:
+
 2019-10-10  Chris Dumez  <cdumez@apple.com>
 
         Unreviewed, tweak test to address flakiness on WK1.
index 6576eaa..5b4cbfd 100644 (file)
@@ -1977,9 +1977,6 @@ webkit.org/b/195635 scrollingcoordinator/mac/multiple-fixed.html [ Pass Timeout
 
 webkit.org/b/200258 [ Debug ] imported/w3c/web-platform-tests/wasm/jsapi/interface.any.worker.html [ Pass Failure ]
 
-# rdar://52594556 (Layout test fast/text/international/system-language/han-quotes.html is failing)
-[ Catalina+ ] fast/text/international/system-language/han-quotes.html [ ImageOnlyFailure ]
-
 webkit.org/b/200128 imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_timeupdate_on_seek.html [ Timeout Pass ]
 
 # rdar://52557916 (REGRESSION: fast/css/paint-order.html and fast/css/paint-order-shadow.html are failing)
index a55e099..b85c1b7 100644 (file)
@@ -1,5 +1,21 @@
 2019-10-10  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
+        <rdar://problem/52594556>
+
+        Reviewed by Simon Fraser.
+
+        This was caught by fast/text/international/system-language/han-quotes.html,
+        but we didn't have time to fix it until now.
+
+        Test: fast/text/international/system-language/han-quotes.html
+
+        * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
+        (WebCore::SystemFontDatabaseCoreText::createSystemUIFont):
+
+2019-10-10  Myles C. Maxfield  <mmaxfield@apple.com>
+
         FontFaceSet's ready promise is not always resolved
         https://bugs.webkit.org/show_bug.cgi?id=202548
 
index ac0e34b..e49ba1a 100644 (file)
@@ -49,6 +49,8 @@ SystemFontDatabaseCoreText::SystemFontDatabaseCoreText()
 
 RetainPtr<CTFontRef> SystemFontDatabaseCoreText::createSystemUIFont(const CascadeListParameters& parameters, CFStringRef locale)
 {
+    if (locale && !CFStringGetLength(locale))
+        locale = nullptr;
     auto result = adoptCF(CTFontCreateUIFontForLanguage(kCTFontUIFontSystem, parameters.size, locale));
     ASSERT(result);
     return createFontByApplyingWeightItalicsAndFallbackBehavior(result.get(), parameters.weight, parameters.italic, parameters.size, parameters.allowUserInstalledFonts);