Diff
Modified: trunk/LayoutTests/ChangeLog (186000 => 186001)
--- trunk/LayoutTests/ChangeLog 2015-06-26 17:09:57 UTC (rev 186000)
+++ trunk/LayoutTests/ChangeLog 2015-06-26 17:27:32 UTC (rev 186001)
@@ -1,3 +1,20 @@
+2015-06-26 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ [Cocoa] Sans-serif generic font family should map to PingFang
+ https://bugs.webkit.org/show_bug.cgi?id=146333
+ <rdar://problem/21521217>
+
+ Reviewed by Alexey Proskuryakov.
+
+ * fast/text/han-generic-font-families.html: Added.
+ * platform/efl/TestExpectations:
+ * platform/gtk/TestExpectations:
+ * platform/ios-simulator/fast/text/han-generic-font-families-expected.html: Added.
+ * platform/mac-mavericks/fast/text/han-generic-font-families-expected.html: Added.
+ * platform/mac-yosemite/fast/text/han-generic-font-families-expected.html: Added.
+ * platform/mac/fast/text/han-generic-font-families-expected.html: Added.
+ * platform/win/TestExpectations:
+
2015-06-26 David Kilzer <ddkil...@apple.com>
REGRESSION (r185971): js/dom/global-constructors-attributes.html fails on Windows
Added: trunk/LayoutTests/fast/text/han-generic-font-families.html (0 => 186001)
--- trunk/LayoutTests/fast/text/han-generic-font-families.html (rev 0)
+++ trunk/LayoutTests/fast/text/han-generic-font-families.html 2015-06-26 17:27:32 UTC (rev 186001)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html lang="zh-HK">
+<head>
+<meta charset="utf-8">
+</head>
+<body>
+This test is designed to test WebKit's mappings for the generic font families for Han scripts.
+<div style="font-size: 50px; font-family: serif;">此段中文简体文本用于浏览器布局测试</div>
+<div style="font-size: 50px; font-family: serif;">此段繁體中文文本用於瀏覽器佈局測試</div>
+<div style="font-size: 50px; font-family: sans-serif;">嵪嵪僺朜驝骪幑蔢哬廫薼憠癁澚</div>
+<div style="font-size: 50px; font-family: sans-serif;">龩龯鿇龪龰鿈龫龱鿉龦龬龲鿊龧</div>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/efl/TestExpectations (186000 => 186001)
--- trunk/LayoutTests/platform/efl/TestExpectations 2015-06-26 17:09:57 UTC (rev 186000)
+++ trunk/LayoutTests/platform/efl/TestExpectations 2015-06-26 17:27:32 UTC (rev 186001)
@@ -2276,3 +2276,6 @@
webkit.org/b/146139 fast/css/named-images.html [ Missing ]
webkit.org/b/146233 fast/forms/listbox-visible-size.html [ Failure ]
+
+# Test requires hardcoded font names, which I do not have for this port.
+fast/text/han-generic-font-families.html [ WontFix ]
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (186000 => 186001)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2015-06-26 17:09:57 UTC (rev 186000)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2015-06-26 17:27:32 UTC (rev 186001)
@@ -2399,3 +2399,6 @@
# This requires a specific font on Mac
fast/text/hidpi-text-selection-gap-between-words.html [ Skip ]
+
+# Test requires hardcoded font names, which I do not have for this port.
+fast/text/han-generic-font-families.html [ WontFix ]
Added: trunk/LayoutTests/platform/ios-simulator/fast/text/han-generic-font-families-expected.html (0 => 186001)
--- trunk/LayoutTests/platform/ios-simulator/fast/text/han-generic-font-families-expected.html (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/fast/text/han-generic-font-families-expected.html 2015-06-26 17:27:32 UTC (rev 186001)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html lang="zh-HK">
+<head>
+<meta charset="utf-8">
+</head>
+<body>
+This test is designed to test WebKit's mappings for the generic font families for Han scripts.
+<div style="font-size: 50px; font-family: 'PingFang SC';">此段中文简体文本用于浏览器布局测试</div>
+<div style="font-size: 50px; font-family: 'PingFang TC';">此段繁體中文文本用於瀏覽器佈局測試</div>
+<div style="font-size: 50px; font-family: 'PingFang SC';">嵪嵪僺朜驝骪幑蔢哬廫薼憠癁澚</div>
+<div style="font-size: 50px; font-family: 'PingFang TC';">龩龯鿇龪龰鿈龫龱鿉龦龬龲鿊龧</div>
+</body>
+</html>
Added: trunk/LayoutTests/platform/mac/fast/text/han-generic-font-families-expected.html (0 => 186001)
--- trunk/LayoutTests/platform/mac/fast/text/han-generic-font-families-expected.html (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/text/han-generic-font-families-expected.html 2015-06-26 17:27:32 UTC (rev 186001)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html lang="zh-HK">
+<head>
+<meta charset="utf-8">
+</head>
+<body>
+This test is designed to test WebKit's mappings for the generic font families for Han scripts.
+<div style="font-size: 50px; font-family: 'Songti SC';">此段中文简体文本用于浏览器布局测试</div>
+<div style="font-size: 50px; font-family: 'Songti TC';">此段繁體中文文本用於瀏覽器佈局測試</div>
+<div style="font-size: 50px; font-family: 'PingFang SC';">嵪嵪僺朜驝骪幑蔢哬廫薼憠癁澚</div>
+<div style="font-size: 50px; font-family: 'PingFang TC';">龩龯鿇龪龰鿈龫龱鿉龦龬龲鿊龧</div>
+</body>
+</html>
Added: trunk/LayoutTests/platform/mac-mavericks/fast/text/han-generic-font-families-expected.html (0 => 186001)
--- trunk/LayoutTests/platform/mac-mavericks/fast/text/han-generic-font-families-expected.html (rev 0)
+++ trunk/LayoutTests/platform/mac-mavericks/fast/text/han-generic-font-families-expected.html 2015-06-26 17:27:32 UTC (rev 186001)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html lang="zh-HK">
+<head>
+<meta charset="utf-8">
+</head>
+<body>
+This test is designed to test WebKit's mappings for the generic font families for Han scripts.
+<div style="font-size: 50px; font-family: 'Songti SC';">此段中文简体文本用于浏览器布局测试</div>
+<div style="font-size: 50px; font-family: 'Songti TC';">此段繁體中文文本用於瀏覽器佈局測試</div>
+<div style="font-size: 50px; font-family: 'Heiti SC';">嵪嵪僺朜驝骪幑蔢哬廫薼憠癁澚</div>
+<div style="font-size: 50px; font-family: 'Heiti TC';">龩龯鿇龪龰鿈龫龱鿉龦龬龲鿊龧</div>
+</body>
+</html>
Added: trunk/LayoutTests/platform/mac-yosemite/fast/text/han-generic-font-families-expected.html (0 => 186001)
--- trunk/LayoutTests/platform/mac-yosemite/fast/text/han-generic-font-families-expected.html (rev 0)
+++ trunk/LayoutTests/platform/mac-yosemite/fast/text/han-generic-font-families-expected.html 2015-06-26 17:27:32 UTC (rev 186001)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html lang="zh-HK">
+<head>
+<meta charset="utf-8">
+</head>
+<body>
+This test is designed to test WebKit's mappings for the generic font families for Han scripts.
+<div style="font-size: 50px; font-family: 'Songti SC';">此段中文简体文本用于浏览器布局测试</div>
+<div style="font-size: 50px; font-family: 'Songti TC';">此段繁體中文文本用於瀏覽器佈局測試</div>
+<div style="font-size: 50px; font-family: 'Heiti SC';">嵪嵪僺朜驝骪幑蔢哬廫薼憠癁澚</div>
+<div style="font-size: 50px; font-family: 'Heiti TC';">龩龯鿇龪龰鿈龫龱鿉龦龬龲鿊龧</div>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/win/TestExpectations (186000 => 186001)
--- trunk/LayoutTests/platform/win/TestExpectations 2015-06-26 17:09:57 UTC (rev 186000)
+++ trunk/LayoutTests/platform/win/TestExpectations 2015-06-26 17:27:32 UTC (rev 186001)
@@ -3110,3 +3110,6 @@
#Subpixel difference
fast/text/decorations-vertical-underline.html [ Skip ]
+
+# Test requires hardcoded font names, which I do not have for this port.
+fast/text/han-generic-font-families.html [ WontFix ]
Modified: trunk/Source/WebCore/ChangeLog (186000 => 186001)
--- trunk/Source/WebCore/ChangeLog 2015-06-26 17:09:57 UTC (rev 186000)
+++ trunk/Source/WebCore/ChangeLog 2015-06-26 17:27:32 UTC (rev 186001)
@@ -1,3 +1,20 @@
+2015-06-26 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ [Cocoa] Sans-serif generic font family should map to PingFang
+ https://bugs.webkit.org/show_bug.cgi?id=146333
+ <rdar://problem/21521217>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Also performs a little bit of cleanup.
+
+ Test: fast/text/han-generic-font-families.html
+
+ * page/mac/SettingsMac.mm:
+ (WebCore::sansSerifTraditionalHanFontFamily):
+ (WebCore::sansSerifSimplifiedHanFontFamily):
+ (WebCore::Settings::initializeDefaultFontFamilies):
+
2015-06-26 Per Arne Vollan <pe...@outlook.com>
[Curl] Compile errors; ResourceResponseBase::resourceLoadTiming() has changed return type.
Modified: trunk/Source/WebCore/page/mac/SettingsMac.mm (186000 => 186001)
--- trunk/Source/WebCore/page/mac/SettingsMac.mm 2015-06-26 17:09:57 UTC (rev 186000)
+++ trunk/Source/WebCore/page/mac/SettingsMac.mm 2015-06-26 17:27:32 UTC (rev 186001)
@@ -28,60 +28,85 @@
namespace WebCore {
+static inline const char* sansSerifTraditionalHanFontFamily()
+{
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000)
+ return "PingFang TC";
+#else
+ return "Heiti TC";
+#endif
+}
+
+static inline const char* sansSerifSimplifiedHanFontFamily()
+{
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000)
+ return "PingFang SC";
+#else
+ return "Heiti SC";
+#endif
+}
+
+#if PLATFORM(MAC)
void Settings::initializeDefaultFontFamilies()
{
-#if !PLATFORM(IOS)
setStandardFontFamily("Songti TC", USCRIPT_TRADITIONAL_HAN);
setSerifFontFamily("Songti TC", USCRIPT_TRADITIONAL_HAN);
-#else
- // There is no serif Chinese font in default iOS installation.
- setStandardFontFamily("Heiti TC", USCRIPT_TRADITIONAL_HAN);
- setSerifFontFamily("Heiti TC", USCRIPT_TRADITIONAL_HAN);
-#endif
- setFixedFontFamily("Heiti TC", USCRIPT_TRADITIONAL_HAN);
- setSansSerifFontFamily("Heiti TC", USCRIPT_TRADITIONAL_HAN);
+ setFixedFontFamily(sansSerifTraditionalHanFontFamily(), USCRIPT_TRADITIONAL_HAN);
+ setSansSerifFontFamily(sansSerifTraditionalHanFontFamily(), USCRIPT_TRADITIONAL_HAN);
-#if !PLATFORM(IOS)
setStandardFontFamily("Songti SC", USCRIPT_SIMPLIFIED_HAN);
setSerifFontFamily("Songti SC", USCRIPT_SIMPLIFIED_HAN);
-#else
- // There is no serif Chinese font in default iOS installation.
- setStandardFontFamily("Heiti SC", USCRIPT_SIMPLIFIED_HAN);
- setSerifFontFamily("Heiti SC", USCRIPT_SIMPLIFIED_HAN);
-#endif
- setFixedFontFamily("Heiti SC", USCRIPT_SIMPLIFIED_HAN);
- setSansSerifFontFamily("Heiti SC", USCRIPT_SIMPLIFIED_HAN);
+ setFixedFontFamily(sansSerifSimplifiedHanFontFamily(), USCRIPT_SIMPLIFIED_HAN);
+ setSansSerifFontFamily(sansSerifSimplifiedHanFontFamily(), USCRIPT_SIMPLIFIED_HAN);
setStandardFontFamily("Hiragino Mincho ProN", USCRIPT_KATAKANA_OR_HIRAGANA);
-#if !PLATFORM(IOS)
setFixedFontFamily("Osaka-Mono", USCRIPT_KATAKANA_OR_HIRAGANA);
-#else
- setFixedFontFamily("Hiragino Kaku Gothic ProN", USCRIPT_KATAKANA_OR_HIRAGANA);
-#endif
setSerifFontFamily("Hiragino Mincho ProN", USCRIPT_KATAKANA_OR_HIRAGANA);
setSansSerifFontFamily("Hiragino Kaku Gothic ProN", USCRIPT_KATAKANA_OR_HIRAGANA);
-#if !PLATFORM(IOS)
setStandardFontFamily("AppleMyungjo", USCRIPT_HANGUL);
setSerifFontFamily("AppleMyungjo", USCRIPT_HANGUL);
+ setFixedFontFamily("Apple SD Gothic Neo", USCRIPT_HANGUL);
+ setSansSerifFontFamily("Apple SD Gothic Neo", USCRIPT_HANGUL);
+
+ setStandardFontFamily("Times", USCRIPT_COMMON);
+ setFixedFontFamily("Courier", USCRIPT_COMMON);
+ setSerifFontFamily("Times", USCRIPT_COMMON);
+ setSansSerifFontFamily("Helvetica", USCRIPT_COMMON);
+}
+
#else
+
+void Settings::initializeDefaultFontFamilies()
+{
+ // There is no serif Chinese font in default iOS installation.
+ setStandardFontFamily(sansSerifTraditionalHanFontFamily(), USCRIPT_TRADITIONAL_HAN);
+ setSerifFontFamily(sansSerifTraditionalHanFontFamily(), USCRIPT_TRADITIONAL_HAN);
+ setFixedFontFamily(sansSerifTraditionalHanFontFamily(), USCRIPT_TRADITIONAL_HAN);
+ setSansSerifFontFamily(sansSerifTraditionalHanFontFamily(), USCRIPT_TRADITIONAL_HAN);
+
+ // There is no serif Chinese font in default iOS installation.
+ setStandardFontFamily(sansSerifSimplifiedHanFontFamily(), USCRIPT_SIMPLIFIED_HAN);
+ setSerifFontFamily(sansSerifSimplifiedHanFontFamily(), USCRIPT_SIMPLIFIED_HAN);
+ setFixedFontFamily(sansSerifSimplifiedHanFontFamily(), USCRIPT_SIMPLIFIED_HAN);
+ setSansSerifFontFamily(sansSerifSimplifiedHanFontFamily(), USCRIPT_SIMPLIFIED_HAN);
+
+ setStandardFontFamily("Hiragino Mincho ProN", USCRIPT_KATAKANA_OR_HIRAGANA);
+ setFixedFontFamily("Hiragino Kaku Gothic ProN", USCRIPT_KATAKANA_OR_HIRAGANA);
+ setSerifFontFamily("Hiragino Mincho ProN", USCRIPT_KATAKANA_OR_HIRAGANA);
+ setSansSerifFontFamily("Hiragino Kaku Gothic ProN", USCRIPT_KATAKANA_OR_HIRAGANA);
+
// There is no serif Korean font in default iOS installation.
setStandardFontFamily("Apple SD Gothic Neo", USCRIPT_HANGUL);
setSerifFontFamily("Apple SD Gothic Neo", USCRIPT_HANGUL);
-#endif
-#if PLATFORM(COCOA)
- setFixedFontFamily("Apple SD Gothic Neo", USCRIPT_HANGUL);
- setSansSerifFontFamily("Apple SD Gothic Neo", USCRIPT_HANGUL);
-#else
setFixedFontFamily("AppleGothic", USCRIPT_HANGUL);
setSansSerifFontFamily("AppleGothic", USCRIPT_HANGUL);
-#endif
setStandardFontFamily("Times", USCRIPT_COMMON);
setFixedFontFamily("Courier", USCRIPT_COMMON);
setSerifFontFamily("Times", USCRIPT_COMMON);
setSansSerifFontFamily("Helvetica", USCRIPT_COMMON);
}
+#endif
-
} // namespace WebCore