<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[186001] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/186001">186001</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2015-06-26 10:27:32 -0700 (Fri, 26 Jun 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Cocoa] Sans-serif generic font family should map to PingFang
https://bugs.webkit.org/show_bug.cgi?id=146333
&lt;rdar://problem/21521217&gt;

Patch by Myles C. Maxfield &lt;mmaxfield@apple.com&gt; on 2015-06-26
Reviewed by Alexey Proskuryakov.

Source/WebCore:

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):

LayoutTests:

* 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:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformeflTestExpectations">trunk/LayoutTests/platform/efl/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformwinTestExpectations">trunk/LayoutTests/platform/win/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepagemacSettingsMacmm">trunk/Source/WebCore/page/mac/SettingsMac.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasttexthangenericfontfamilieshtml">trunk/LayoutTests/fast/text/han-generic-font-families.html</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorfasttexthangenericfontfamiliesexpectedhtml">trunk/LayoutTests/platform/ios-simulator/fast/text/han-generic-font-families-expected.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacfasttexthangenericfontfamiliesexpectedhtml">trunk/LayoutTests/platform/mac/fast/text/han-generic-font-families-expected.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacmavericksfasttexthangenericfontfamiliesexpectedhtml">trunk/LayoutTests/platform/mac-mavericks/fast/text/han-generic-font-families-expected.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacyosemitefasttexthangenericfontfamiliesexpectedhtml">trunk/LayoutTests/platform/mac-yosemite/fast/text/han-generic-font-families-expected.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (186000 => 186001)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-06-26 17:09:57 UTC (rev 186000)
+++ trunk/LayoutTests/ChangeLog        2015-06-26 17:27:32 UTC (rev 186001)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-06-26  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        [Cocoa] Sans-serif generic font family should map to PingFang
+        https://bugs.webkit.org/show_bug.cgi?id=146333
+        &lt;rdar://problem/21521217&gt;
+
+        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:
+
</ins><span class="cx"> 2015-06-26  David Kilzer  &lt;ddkilzer@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r185971): js/dom/global-constructors-attributes.html fails on Windows
</span></span></pre></div>
<a id="trunkLayoutTestsfasttexthangenericfontfamilieshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/han-generic-font-families.html (0 => 186001)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html lang=&quot;zh-HK&quot;&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;/head&gt;
+&lt;body&gt;
+This test is designed to test WebKit's mappings for the generic font families for Han scripts.
+&lt;div style=&quot;font-size: 50px; font-family: serif;&quot;&gt;此段中文简体文本用于浏览器布局测试&lt;/div&gt;
+&lt;div style=&quot;font-size: 50px; font-family: serif;&quot;&gt;此段繁體中文文本用於瀏覽器佈局測試&lt;/div&gt;
+&lt;div style=&quot;font-size: 50px; font-family: sans-serif;&quot;&gt;&amp;#x5d6a;&amp;#x5d6a;&amp;#x50fa;&amp;#x671c;&amp;#x9a5d;&amp;#x9aaa;&amp;#x5e51;&amp;#x8522;&amp;#x54ec;&amp;#x5eeb;&amp;#x85bc;&amp;#x61a0;&amp;#x7641;&amp;#x6f9a;&lt;/div&gt;
+&lt;div style=&quot;font-size: 50px; font-family: sans-serif;&quot;&gt;&amp;#x9fa9;&amp;#x9faf;&amp;#x9fc7;&amp;#x9faa;&amp;#x9fb0;&amp;#x9fc8;&amp;#x9fab;&amp;#x9fb1;&amp;#x9fc9;&amp;#x9fa6;&amp;#x9fac;&amp;#x9fb2;&amp;#x9fca;&amp;#x9fa7;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformeflTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/efl/TestExpectations (186000 => 186001)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -2276,3 +2276,6 @@
</span><span class="cx"> webkit.org/b/146139 fast/css/named-images.html [ Missing ]
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/146233 fast/forms/listbox-visible-size.html [ Failure ]
</span><ins>+
+# Test requires hardcoded font names, which I do not have for this port.
+fast/text/han-generic-font-families.html [ WontFix ]
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (186000 => 186001)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -2399,3 +2399,6 @@
</span><span class="cx"> 
</span><span class="cx"> # This requires a specific font on Mac
</span><span class="cx"> fast/text/hidpi-text-selection-gap-between-words.html [ Skip ]
</span><ins>+
+# Test requires hardcoded font names, which I do not have for this port.
+fast/text/han-generic-font-families.html [ WontFix ]
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorfasttexthangenericfontfamiliesexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-simulator/fast/text/han-generic-font-families-expected.html (0 => 186001)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html lang=&quot;zh-HK&quot;&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;/head&gt;
+&lt;body&gt;
+This test is designed to test WebKit's mappings for the generic font families for Han scripts.
+&lt;div style=&quot;font-size: 50px; font-family: 'PingFang SC';&quot;&gt;此段中文简体文本用于浏览器布局测试&lt;/div&gt;
+&lt;div style=&quot;font-size: 50px; font-family: 'PingFang TC';&quot;&gt;此段繁體中文文本用於瀏覽器佈局測試&lt;/div&gt;
+&lt;div style=&quot;font-size: 50px; font-family: 'PingFang SC';&quot;&gt;&amp;#x5d6a;&amp;#x5d6a;&amp;#x50fa;&amp;#x671c;&amp;#x9a5d;&amp;#x9aaa;&amp;#x5e51;&amp;#x8522;&amp;#x54ec;&amp;#x5eeb;&amp;#x85bc;&amp;#x61a0;&amp;#x7641;&amp;#x6f9a;&lt;/div&gt;
+&lt;div style=&quot;font-size: 50px; font-family: 'PingFang TC';&quot;&gt;&amp;#x9fa9;&amp;#x9faf;&amp;#x9fc7;&amp;#x9faa;&amp;#x9fb0;&amp;#x9fc8;&amp;#x9fab;&amp;#x9fb1;&amp;#x9fc9;&amp;#x9fa6;&amp;#x9fac;&amp;#x9fb2;&amp;#x9fca;&amp;#x9fa7;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfasttexthangenericfontfamiliesexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/text/han-generic-font-families-expected.html (0 => 186001)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html lang=&quot;zh-HK&quot;&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;/head&gt;
+&lt;body&gt;
+This test is designed to test WebKit's mappings for the generic font families for Han scripts.
+&lt;div style=&quot;font-size: 50px; font-family: 'Songti SC';&quot;&gt;此段中文简体文本用于浏览器布局测试&lt;/div&gt;
+&lt;div style=&quot;font-size: 50px; font-family: 'Songti TC';&quot;&gt;此段繁體中文文本用於瀏覽器佈局測試&lt;/div&gt;
+&lt;div style=&quot;font-size: 50px; font-family: 'PingFang SC';&quot;&gt;&amp;#x5d6a;&amp;#x5d6a;&amp;#x50fa;&amp;#x671c;&amp;#x9a5d;&amp;#x9aaa;&amp;#x5e51;&amp;#x8522;&amp;#x54ec;&amp;#x5eeb;&amp;#x85bc;&amp;#x61a0;&amp;#x7641;&amp;#x6f9a;&lt;/div&gt;
+&lt;div style=&quot;font-size: 50px; font-family: 'PingFang TC';&quot;&gt;&amp;#x9fa9;&amp;#x9faf;&amp;#x9fc7;&amp;#x9faa;&amp;#x9fb0;&amp;#x9fc8;&amp;#x9fab;&amp;#x9fb1;&amp;#x9fc9;&amp;#x9fa6;&amp;#x9fac;&amp;#x9fb2;&amp;#x9fca;&amp;#x9fa7;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacmavericksfasttexthangenericfontfamiliesexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-mavericks/fast/text/han-generic-font-families-expected.html (0 => 186001)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html lang=&quot;zh-HK&quot;&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;/head&gt;
+&lt;body&gt;
+This test is designed to test WebKit's mappings for the generic font families for Han scripts.
+&lt;div style=&quot;font-size: 50px; font-family: 'Songti SC';&quot;&gt;此段中文简体文本用于浏览器布局测试&lt;/div&gt;
+&lt;div style=&quot;font-size: 50px; font-family: 'Songti TC';&quot;&gt;此段繁體中文文本用於瀏覽器佈局測試&lt;/div&gt;
+&lt;div style=&quot;font-size: 50px; font-family: 'Heiti SC';&quot;&gt;&amp;#x5d6a;&amp;#x5d6a;&amp;#x50fa;&amp;#x671c;&amp;#x9a5d;&amp;#x9aaa;&amp;#x5e51;&amp;#x8522;&amp;#x54ec;&amp;#x5eeb;&amp;#x85bc;&amp;#x61a0;&amp;#x7641;&amp;#x6f9a;&lt;/div&gt;
+&lt;div style=&quot;font-size: 50px; font-family: 'Heiti TC';&quot;&gt;&amp;#x9fa9;&amp;#x9faf;&amp;#x9fc7;&amp;#x9faa;&amp;#x9fb0;&amp;#x9fc8;&amp;#x9fab;&amp;#x9fb1;&amp;#x9fc9;&amp;#x9fa6;&amp;#x9fac;&amp;#x9fb2;&amp;#x9fca;&amp;#x9fa7;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacyosemitefasttexthangenericfontfamiliesexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-yosemite/fast/text/han-generic-font-families-expected.html (0 => 186001)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html lang=&quot;zh-HK&quot;&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;/head&gt;
+&lt;body&gt;
+This test is designed to test WebKit's mappings for the generic font families for Han scripts.
+&lt;div style=&quot;font-size: 50px; font-family: 'Songti SC';&quot;&gt;此段中文简体文本用于浏览器布局测试&lt;/div&gt;
+&lt;div style=&quot;font-size: 50px; font-family: 'Songti TC';&quot;&gt;此段繁體中文文本用於瀏覽器佈局測試&lt;/div&gt;
+&lt;div style=&quot;font-size: 50px; font-family: 'Heiti SC';&quot;&gt;&amp;#x5d6a;&amp;#x5d6a;&amp;#x50fa;&amp;#x671c;&amp;#x9a5d;&amp;#x9aaa;&amp;#x5e51;&amp;#x8522;&amp;#x54ec;&amp;#x5eeb;&amp;#x85bc;&amp;#x61a0;&amp;#x7641;&amp;#x6f9a;&lt;/div&gt;
+&lt;div style=&quot;font-size: 50px; font-family: 'Heiti TC';&quot;&gt;&amp;#x9fa9;&amp;#x9faf;&amp;#x9fc7;&amp;#x9faa;&amp;#x9fb0;&amp;#x9fc8;&amp;#x9fab;&amp;#x9fb1;&amp;#x9fc9;&amp;#x9fa6;&amp;#x9fac;&amp;#x9fb2;&amp;#x9fca;&amp;#x9fa7;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwinTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/win/TestExpectations (186000 => 186001)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -3110,3 +3110,6 @@
</span><span class="cx"> 
</span><span class="cx"> #Subpixel difference
</span><span class="cx"> fast/text/decorations-vertical-underline.html [ Skip ]
</span><ins>+
+# Test requires hardcoded font names, which I do not have for this port.
+fast/text/han-generic-font-families.html [ WontFix ]
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (186000 => 186001)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-06-26  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        [Cocoa] Sans-serif generic font family should map to PingFang
+        https://bugs.webkit.org/show_bug.cgi?id=146333
+        &lt;rdar://problem/21521217&gt;
+
+        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):
+
</ins><span class="cx"> 2015-06-26  Per Arne Vollan  &lt;peavo@outlook.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Curl] Compile errors; ResourceResponseBase::resourceLoadTiming() has changed return type.
</span></span></pre></div>
<a id="trunkSourceWebCorepagemacSettingsMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/mac/SettingsMac.mm (186000 => 186001)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -28,60 +28,85 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+static inline const char* sansSerifTraditionalHanFontFamily()
+{
+#if (PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000) || (PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 80000)
+    return &quot;PingFang TC&quot;;
+#else
+    return &quot;Heiti TC&quot;;
+#endif
+}
+
+static inline const char* sansSerifSimplifiedHanFontFamily()
+{
+#if (PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000) || (PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 80000)
+    return &quot;PingFang SC&quot;;
+#else
+    return &quot;Heiti SC&quot;;
+#endif
+}
+
+#if PLATFORM(MAC)
</ins><span class="cx"> void Settings::initializeDefaultFontFamilies()
</span><span class="cx"> {
</span><del>-#if !PLATFORM(IOS)
</del><span class="cx">     setStandardFontFamily(&quot;Songti TC&quot;, USCRIPT_TRADITIONAL_HAN);
</span><span class="cx">     setSerifFontFamily(&quot;Songti TC&quot;, USCRIPT_TRADITIONAL_HAN);
</span><del>-#else
-    // There is no serif Chinese font in default iOS installation.
-    setStandardFontFamily(&quot;Heiti TC&quot;, USCRIPT_TRADITIONAL_HAN);
-    setSerifFontFamily(&quot;Heiti TC&quot;, USCRIPT_TRADITIONAL_HAN);
-#endif
-    setFixedFontFamily(&quot;Heiti TC&quot;, USCRIPT_TRADITIONAL_HAN);
-    setSansSerifFontFamily(&quot;Heiti TC&quot;, USCRIPT_TRADITIONAL_HAN);
</del><ins>+    setFixedFontFamily(sansSerifTraditionalHanFontFamily(), USCRIPT_TRADITIONAL_HAN);
+    setSansSerifFontFamily(sansSerifTraditionalHanFontFamily(), USCRIPT_TRADITIONAL_HAN);
</ins><span class="cx"> 
</span><del>-#if !PLATFORM(IOS)
</del><span class="cx">     setStandardFontFamily(&quot;Songti SC&quot;, USCRIPT_SIMPLIFIED_HAN);
</span><span class="cx">     setSerifFontFamily(&quot;Songti SC&quot;, USCRIPT_SIMPLIFIED_HAN);
</span><del>-#else
-    // There is no serif Chinese font in default iOS installation.
-    setStandardFontFamily(&quot;Heiti SC&quot;, USCRIPT_SIMPLIFIED_HAN);
-    setSerifFontFamily(&quot;Heiti SC&quot;, USCRIPT_SIMPLIFIED_HAN);
-#endif
-    setFixedFontFamily(&quot;Heiti SC&quot;, USCRIPT_SIMPLIFIED_HAN);
-    setSansSerifFontFamily(&quot;Heiti SC&quot;, USCRIPT_SIMPLIFIED_HAN);
</del><ins>+    setFixedFontFamily(sansSerifSimplifiedHanFontFamily(), USCRIPT_SIMPLIFIED_HAN);
+    setSansSerifFontFamily(sansSerifSimplifiedHanFontFamily(), USCRIPT_SIMPLIFIED_HAN);
</ins><span class="cx"> 
</span><span class="cx">     setStandardFontFamily(&quot;Hiragino Mincho ProN&quot;, USCRIPT_KATAKANA_OR_HIRAGANA);
</span><del>-#if !PLATFORM(IOS)
</del><span class="cx">     setFixedFontFamily(&quot;Osaka-Mono&quot;, USCRIPT_KATAKANA_OR_HIRAGANA);
</span><del>-#else
-    setFixedFontFamily(&quot;Hiragino Kaku Gothic ProN&quot;, USCRIPT_KATAKANA_OR_HIRAGANA);
-#endif
</del><span class="cx">     setSerifFontFamily(&quot;Hiragino Mincho ProN&quot;, USCRIPT_KATAKANA_OR_HIRAGANA);
</span><span class="cx">     setSansSerifFontFamily(&quot;Hiragino Kaku Gothic ProN&quot;, USCRIPT_KATAKANA_OR_HIRAGANA);
</span><span class="cx"> 
</span><del>-#if !PLATFORM(IOS)
</del><span class="cx">     setStandardFontFamily(&quot;AppleMyungjo&quot;, USCRIPT_HANGUL);
</span><span class="cx">     setSerifFontFamily(&quot;AppleMyungjo&quot;, USCRIPT_HANGUL);
</span><ins>+    setFixedFontFamily(&quot;Apple SD Gothic Neo&quot;, USCRIPT_HANGUL);
+    setSansSerifFontFamily(&quot;Apple SD Gothic Neo&quot;, USCRIPT_HANGUL);
+
+    setStandardFontFamily(&quot;Times&quot;, USCRIPT_COMMON);
+    setFixedFontFamily(&quot;Courier&quot;, USCRIPT_COMMON);
+    setSerifFontFamily(&quot;Times&quot;, USCRIPT_COMMON);
+    setSansSerifFontFamily(&quot;Helvetica&quot;, USCRIPT_COMMON);
+}
+
</ins><span class="cx"> #else
</span><ins>+
+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(&quot;Hiragino Mincho ProN&quot;, USCRIPT_KATAKANA_OR_HIRAGANA);
+    setFixedFontFamily(&quot;Hiragino Kaku Gothic ProN&quot;, USCRIPT_KATAKANA_OR_HIRAGANA);
+    setSerifFontFamily(&quot;Hiragino Mincho ProN&quot;, USCRIPT_KATAKANA_OR_HIRAGANA);
+    setSansSerifFontFamily(&quot;Hiragino Kaku Gothic ProN&quot;, USCRIPT_KATAKANA_OR_HIRAGANA);
+
</ins><span class="cx">     // There is no serif Korean font in default iOS installation.
</span><span class="cx">     setStandardFontFamily(&quot;Apple SD Gothic Neo&quot;, USCRIPT_HANGUL);
</span><span class="cx">     setSerifFontFamily(&quot;Apple SD Gothic Neo&quot;, USCRIPT_HANGUL);
</span><del>-#endif
-#if PLATFORM(COCOA)
-    setFixedFontFamily(&quot;Apple SD Gothic Neo&quot;, USCRIPT_HANGUL);
-    setSansSerifFontFamily(&quot;Apple SD Gothic Neo&quot;, USCRIPT_HANGUL);
-#else
</del><span class="cx">     setFixedFontFamily(&quot;AppleGothic&quot;, USCRIPT_HANGUL);
</span><span class="cx">     setSansSerifFontFamily(&quot;AppleGothic&quot;, USCRIPT_HANGUL);
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx">     setStandardFontFamily(&quot;Times&quot;, USCRIPT_COMMON);
</span><span class="cx">     setFixedFontFamily(&quot;Courier&quot;, USCRIPT_COMMON);
</span><span class="cx">     setSerifFontFamily(&quot;Times&quot;, USCRIPT_COMMON);
</span><span class="cx">     setSansSerifFontFamily(&quot;Helvetica&quot;, USCRIPT_COMMON);
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx"> 
</span><del>-
</del><span class="cx"> } // namespace WebCore
</span></span></pre>
</div>
</div>

</body>
</html>