<!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>[182894] 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/182894">182894</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2015-04-16 10:32:27 -0700 (Thu, 16 Apr 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>[iOS] Delete hardcoded font fallback tables
https://bugs.webkit.org/show_bug.cgi?id=143583
Reviewed by Darin Adler
Source/WebCore:
Instead of hardcoding which font to use for a particular character, use
CTFontCreatePhysicalFontDescriptorForCharactersWithLanguage().
Updated test expected results:
editing/selection/vertical-rl-rtl-extend-line-backward-br.html
editing/selection/vertical-rl-rtl-extend-line-backward-p.html
editing/selection/vertical-rl-rtl-extend-line-forward-br.html
editing/selection/vertical-rl-rtl-extend-line-forward-p.html
fast/text/international/danda-space.html
fast/text/international/thai-baht-space.html
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::getSystemFontFallbackForCharacters):
(WebCore::FontCache::systemFallbackForCharacters):
* platform/spi/cocoa/CoreTextSPI.h:
LayoutTests:
Updating expected results.
* editing/selection/vertical-rl-rtl-extend-line-backward-br.html: Updating expected results
* editing/selection/vertical-rl-rtl-extend-line-backward-p.html: Updating expected results
* editing/selection/vertical-rl-rtl-extend-line-forward-br.html: Updating expected results
* editing/selection/vertical-rl-rtl-extend-line-forward-p.html: Updating expected results
* fast/text/international/danda-space.html: Updating expected results
* fast/text/international/thai-baht-space.html: Updating expected results</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatoreditingselectionverticalrlrtlextendlinebackwardbrexpectedtxt">trunk/LayoutTests/platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatoreditingselectionverticalrlrtlextendlinebackwardpexpectedtxt">trunk/LayoutTests/platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatoreditingselectionverticalrlrtlextendlineforwardbrexpectedtxt">trunk/LayoutTests/platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatoreditingselectionverticalrlrtlextendlineforwardpexpectedtxt">trunk/LayoutTests/platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorwk2fasttextinternationaldandaspaceexpectedtxt">trunk/LayoutTests/platform/ios-simulator-wk2/fast/text/international/danda-space-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorwk2fasttextinternationalthaibahtspaceexpectedtxt">trunk/LayoutTests/platform/ios-simulator-wk2/fast/text/international/thai-baht-space-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsiosFontCacheIOSmm">trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformspicocoaCoreTextSPIh">trunk/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (182893 => 182894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-04-16 17:30:20 UTC (rev 182893)
+++ trunk/LayoutTests/ChangeLog        2015-04-16 17:32:27 UTC (rev 182894)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-04-16 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [iOS] Delete hardcoded font fallback tables
+ https://bugs.webkit.org/show_bug.cgi?id=143583
+
+ Reviewed by Darin Adler
+
+ Updating expected results.
+
+ * editing/selection/vertical-rl-rtl-extend-line-backward-br.html: Updating expected results
+ * editing/selection/vertical-rl-rtl-extend-line-backward-p.html: Updating expected results
+ * editing/selection/vertical-rl-rtl-extend-line-forward-br.html: Updating expected results
+ * editing/selection/vertical-rl-rtl-extend-line-forward-p.html: Updating expected results
+ * fast/text/international/danda-space.html: Updating expected results
+ * fast/text/international/thai-baht-space.html: Updating expected results
+
</ins><span class="cx"> 2015-04-16 Alexey Proskuryakov <ap@apple.com>
</span><span class="cx">
</span><span class="cx"> More flaky tests in http/tests/security/mixedContent
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatoreditingselectionverticalrlrtlextendlinebackwardbrexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt (182893 => 182894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt        2015-04-16 17:30:20 UTC (rev 182893)
+++ trunk/LayoutTests/platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt        2015-04-16 17:32:27 UTC (rev 182894)
</span><span class="lines">@@ -6,13 +6,13 @@
</span><span class="cx"> RenderBlock {P} at (0,0) size 784x20
</span><span class="cx"> RenderText {#text} at (0,0) size 399x19
</span><span class="cx"> text run at (0,0) width 399: "This tests horizontal caret movement in vertical writing mode."
</span><del>- RenderBlock {DIV} at (0,36) size 86x139
- RenderBlock {P} at (20,0) size 46x139
- RenderText {#text} at (0,52) size 21x87
- text run at (0,52) width 87 RTL: "\x{5D0}\x{5E0}\x{5D9} \x{5D7}\x{5EA}\x{5D5}\x{5DC}."
- RenderBR {BR} at (0,52) size 21x1
- RenderText {#text} at (23,41) size 21x98
- text run at (23,41) width 98 RTL: "\x{5D0}\x{5D9}\x{5DF} \x{5DC}\x{5D9} \x{5E9}\x{5DD}."
</del><ins>+ RenderBlock {DIV} at (0,36) size 88x139
+ RenderBlock {P} at (20,0) size 48x139
+ RenderText {#text} at (1,30) size 21x109
+ text run at (1,30) width 109 RTL: "\x{5D0}\x{5E0}\x{5D9} \x{5D7}\x{5EA}\x{5D5}\x{5DC}."
+ RenderBR {BR} at (1,30) size 21x1
+ RenderText {#text} at (25,18) size 21x121
+ text run at (25,18) width 121 RTL: "\x{5D0}\x{5D9}\x{5DF} \x{5DC}\x{5D9} \x{5E9}\x{5DD}."
</ins><span class="cx"> RenderBlock {PRE} at (0,187) size 784x0
</span><span class="cx"> selection start: position 5 of child 0 {#text} of child 1 {P} of child 3 {DIV} of body
</span><span class="cx"> selection end: position 5 of child 2 {#text} of child 1 {P} of child 3 {DIV} of body
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatoreditingselectionverticalrlrtlextendlinebackwardpexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt (182893 => 182894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt        2015-04-16 17:30:20 UTC (rev 182893)
+++ trunk/LayoutTests/platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt        2015-04-16 17:32:27 UTC (rev 182894)
</span><span class="lines">@@ -6,13 +6,13 @@
</span><span class="cx"> RenderBlock {P} at (0,0) size 784x20
</span><span class="cx"> RenderText {#text} at (0,0) size 399x19
</span><span class="cx"> text run at (0,0) width 399: "This tests horizontal caret movement in vertical writing mode."
</span><del>- RenderBlock {DIV} at (0,36) size 106x139
- RenderBlock {P} at (20,0) size 23x139
- RenderText {#text} at (0,52) size 21x87
- text run at (0,52) width 87 RTL: "\x{5D0}\x{5E0}\x{5D9} \x{5D7}\x{5EA}\x{5D5}\x{5DC}."
- RenderBlock {P} at (63,0) size 23x139
- RenderText {#text} at (0,41) size 21x98
- text run at (0,41) width 98 RTL: "\x{5D0}\x{5D9}\x{5DF} \x{5DC}\x{5D9} \x{5E9}\x{5DD}."
</del><ins>+ RenderBlock {DIV} at (0,36) size 108x139
+ RenderBlock {P} at (20,0) size 24x139
+ RenderText {#text} at (1,30) size 21x109
+ text run at (1,30) width 109 RTL: "\x{5D0}\x{5E0}\x{5D9} \x{5D7}\x{5EA}\x{5D5}\x{5DC}."
+ RenderBlock {P} at (64,0) size 24x139
+ RenderText {#text} at (1,18) size 21x121
+ text run at (1,18) width 121 RTL: "\x{5D0}\x{5D9}\x{5DF} \x{5DC}\x{5D9} \x{5E9}\x{5DD}."
</ins><span class="cx"> RenderBlock {PRE} at (0,187) size 784x0
</span><span class="cx"> selection start: position 5 of child 0 {#text} of child 1 {P} of child 3 {DIV} of body
</span><span class="cx"> selection end: position 5 of child 0 {#text} of child 2 {P} of child 3 {DIV} of body
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatoreditingselectionverticalrlrtlextendlineforwardbrexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.txt (182893 => 182894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.txt        2015-04-16 17:30:20 UTC (rev 182893)
+++ trunk/LayoutTests/platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.txt        2015-04-16 17:32:27 UTC (rev 182894)
</span><span class="lines">@@ -6,13 +6,13 @@
</span><span class="cx"> RenderBlock {P} at (0,0) size 784x20
</span><span class="cx"> RenderText {#text} at (0,0) size 399x19
</span><span class="cx"> text run at (0,0) width 399: "This tests horizontal caret movement in vertical writing mode."
</span><del>- RenderBlock {DIV} at (0,36) size 86x139
- RenderBlock {P} at (20,0) size 46x139
- RenderText {#text} at (0,52) size 21x87
- text run at (0,52) width 87 RTL: "\x{5D0}\x{5E0}\x{5D9} \x{5D7}\x{5EA}\x{5D5}\x{5DC}."
- RenderBR {BR} at (0,52) size 21x1
- RenderText {#text} at (23,41) size 21x98
- text run at (23,41) width 98 RTL: "\x{5D0}\x{5D9}\x{5DF} \x{5DC}\x{5D9} \x{5E9}\x{5DD}."
</del><ins>+ RenderBlock {DIV} at (0,36) size 88x139
+ RenderBlock {P} at (20,0) size 48x139
+ RenderText {#text} at (1,30) size 21x109
+ text run at (1,30) width 109 RTL: "\x{5D0}\x{5E0}\x{5D9} \x{5D7}\x{5EA}\x{5D5}\x{5DC}."
+ RenderBR {BR} at (1,30) size 21x1
+ RenderText {#text} at (25,18) size 21x121
+ text run at (25,18) width 121 RTL: "\x{5D0}\x{5D9}\x{5DF} \x{5DC}\x{5D9} \x{5E9}\x{5DD}."
</ins><span class="cx"> RenderBlock {PRE} at (0,187) size 784x0
</span><span class="cx"> selection start: position 5 of child 0 {#text} of child 1 {P} of child 3 {DIV} of body
</span><del>-selection end: position 6 of child 2 {#text} of child 1 {P} of child 3 {DIV} of body
</del><ins>+selection end: position 5 of child 2 {#text} of child 1 {P} of child 3 {DIV} of body
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatoreditingselectionverticalrlrtlextendlineforwardpexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.txt (182893 => 182894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.txt        2015-04-16 17:30:20 UTC (rev 182893)
+++ trunk/LayoutTests/platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.txt        2015-04-16 17:32:27 UTC (rev 182894)
</span><span class="lines">@@ -6,13 +6,13 @@
</span><span class="cx"> RenderBlock {P} at (0,0) size 784x20
</span><span class="cx"> RenderText {#text} at (0,0) size 399x19
</span><span class="cx"> text run at (0,0) width 399: "This tests horizontal caret movement in vertical writing mode."
</span><del>- RenderBlock {DIV} at (0,36) size 106x139
- RenderBlock {P} at (20,0) size 23x139
- RenderText {#text} at (0,52) size 21x87
- text run at (0,52) width 87 RTL: "\x{5D0}\x{5E0}\x{5D9} \x{5D7}\x{5EA}\x{5D5}\x{5DC}."
- RenderBlock {P} at (63,0) size 23x139
- RenderText {#text} at (0,41) size 21x98
- text run at (0,41) width 98 RTL: "\x{5D0}\x{5D9}\x{5DF} \x{5DC}\x{5D9} \x{5E9}\x{5DD}."
</del><ins>+ RenderBlock {DIV} at (0,36) size 108x139
+ RenderBlock {P} at (20,0) size 24x139
+ RenderText {#text} at (1,30) size 21x109
+ text run at (1,30) width 109 RTL: "\x{5D0}\x{5E0}\x{5D9} \x{5D7}\x{5EA}\x{5D5}\x{5DC}."
+ RenderBlock {P} at (64,0) size 24x139
+ RenderText {#text} at (1,18) size 21x121
+ text run at (1,18) width 121 RTL: "\x{5D0}\x{5D9}\x{5DF} \x{5DC}\x{5D9} \x{5E9}\x{5DD}."
</ins><span class="cx"> RenderBlock {PRE} at (0,187) size 784x0
</span><span class="cx"> selection start: position 5 of child 0 {#text} of child 1 {P} of child 3 {DIV} of body
</span><del>-selection end: position 6 of child 0 {#text} of child 2 {P} of child 3 {DIV} of body
</del><ins>+selection end: position 5 of child 0 {#text} of child 2 {P} of child 3 {DIV} of body
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorwk2fasttextinternationaldandaspaceexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator-wk2/fast/text/international/danda-space-expected.txt (182893 => 182894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator-wk2/fast/text/international/danda-space-expected.txt        2015-04-16 17:30:20 UTC (rev 182893)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/fast/text/international/danda-space-expected.txt        2015-04-16 17:32:27 UTC (rev 182894)
</span><span class="lines">@@ -12,5 +12,5 @@
</span><span class="cx"> RenderText {#text} at (121,0) size 389x19
</span><span class="cx"> text run at (121,0) width 389: ": Test for rendering of Danda (U+0964) followed by a space."
</span><span class="cx"> RenderBlock {P} at (0,36) size 784x25
</span><del>- RenderText {#text} at (0,3) size 269x19
- text run at (0,3) width 269: "\x{A39}\x{A41}\x{A70}\x{A26}\x{A40} \x{A39}\x{A48}\x{964} \x{A07}\x{A38} \x{A32}\x{A3F}\x{A2A}\x{A40} \x{A26}\x{A47} \x{A35}\x{A3F}\x{A1A} \x{A69}\x{A6B} (35) \x{A05}\x{A71}\x{A16}\x{A30} \x{A39}\x{A41}\x{A70}\x{A26}\x{A47} \x{A39}\x{A28}\x{964}"
</del><ins>+ RenderText {#text} at (0,1) size 264x19
+ text run at (0,1) width 264: "\x{A39}\x{A41}\x{A70}\x{A26}\x{A40} \x{A39}\x{A48}\x{964} \x{A07}\x{A38} \x{A32}\x{A3F}\x{A2A}\x{A40} \x{A26}\x{A47} \x{A35}\x{A3F}\x{A1A} \x{A69}\x{A6B} (35) \x{A05}\x{A71}\x{A16}\x{A30} \x{A39}\x{A41}\x{A70}\x{A26}\x{A47} \x{A39}\x{A28}\x{964}"
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorwk2fasttextinternationalthaibahtspaceexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator-wk2/fast/text/international/thai-baht-space-expected.txt (182893 => 182894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator-wk2/fast/text/international/thai-baht-space-expected.txt        2015-04-16 17:30:20 UTC (rev 182893)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/fast/text/international/thai-baht-space-expected.txt        2015-04-16 17:32:27 UTC (rev 182894)
</span><span class="lines">@@ -13,8 +13,8 @@
</span><span class="cx"> text run at (121,0) width 605: ". Characters belonging to 'Common' script followed / preceeded by a space should be rendered"
</span><span class="cx"> text run at (0,20) width 646: "correctly. Two lines below have 4 Thai currency signs (U+0E3F) and all of them should be rendered."
</span><span class="cx"> RenderBlock {P} at (0,56) size 784x48
</span><del>- RenderText {#text} at (0,4) size 286x19
- text run at (0,4) width 286: "abc \x{E25}\x{E07}\x{E17}\x{E38}\x{E19}4000\x{E3F} \x{E23}\x{E31}\x{E1A}\x{E1B}\x{E23}\x{E30}\x{E01}\x{E31}\x{E19}\x{E23}\x{E32}\x{E22}\x{E44}\x{E14}\x{E49} 50000\x{E3F}/M"
- RenderBR {BR} at (285,19) size 1x0
- RenderText {#text} at (0,28) size 286x19
- text run at (0,28) width 286: "abc \x{E25}\x{E07}\x{E17}\x{E38}\x{E19}4000 \x{E3F}\x{E23}\x{E31}\x{E1A}\x{E1B}\x{E23}\x{E30}\x{E01}\x{E31}\x{E19}\x{E23}\x{E32}\x{E22}\x{E44}\x{E14}\x{E49} 50000\x{E3F}/M"
</del><ins>+ RenderText {#text} at (0,4) size 289x19
+ text run at (0,4) width 289: "abc \x{E25}\x{E07}\x{E17}\x{E38}\x{E19}4000\x{E3F} \x{E23}\x{E31}\x{E1A}\x{E1B}\x{E23}\x{E30}\x{E01}\x{E31}\x{E19}\x{E23}\x{E32}\x{E22}\x{E44}\x{E14}\x{E49} 50000\x{E3F}/M"
+ RenderBR {BR} at (288,19) size 1x0
+ RenderText {#text} at (0,28) size 289x19
+ text run at (0,28) width 289: "abc \x{E25}\x{E07}\x{E17}\x{E38}\x{E19}4000 \x{E3F}\x{E23}\x{E31}\x{E1A}\x{E1B}\x{E23}\x{E30}\x{E01}\x{E31}\x{E19}\x{E23}\x{E32}\x{E22}\x{E44}\x{E14}\x{E49} 50000\x{E3F}/M"
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (182893 => 182894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-04-16 17:30:20 UTC (rev 182893)
+++ trunk/Source/WebCore/ChangeLog        2015-04-16 17:32:27 UTC (rev 182894)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2015-04-16 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [iOS] Delete hardcoded font fallback tables
+ https://bugs.webkit.org/show_bug.cgi?id=143583
+
+ Reviewed by Darin Adler
+
+ Instead of hardcoding which font to use for a particular character, use
+ CTFontCreatePhysicalFontDescriptorForCharactersWithLanguage().
+
+ Updated test expected results:
+ editing/selection/vertical-rl-rtl-extend-line-backward-br.html
+ editing/selection/vertical-rl-rtl-extend-line-backward-p.html
+ editing/selection/vertical-rl-rtl-extend-line-forward-br.html
+ editing/selection/vertical-rl-rtl-extend-line-forward-p.html
+ fast/text/international/danda-space.html
+ fast/text/international/thai-baht-space.html
+
+ * platform/graphics/ios/FontCacheIOS.mm:
+ (WebCore::FontCache::getSystemFontFallbackForCharacters):
+ (WebCore::FontCache::systemFallbackForCharacters):
+ * platform/spi/cocoa/CoreTextSPI.h:
+
</ins><span class="cx"> 2015-04-16 Per Arne Vollan <peavo@outlook.com>
</span><span class="cx">
</span><span class="cx"> [WinCairo] Compile error when environment variable WEBKITLIBRARIESDIR is not defined.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsiosFontCacheIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm (182893 => 182894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm        2015-04-16 17:30:20 UTC (rev 182893)
+++ trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm        2015-04-16 17:32:27 UTC (rev 182894)
</span><span class="lines">@@ -53,6 +53,7 @@
</span><span class="cx"> return character == AppleLogo || character == blackCircle || character == narrowNonBreakingSpace;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if __IPHONE_OS_VERSION_MIN_REQUIRED < 90000
</ins><span class="cx"> static CFCharacterSetRef copyFontCharacterSet(CFStringRef fontName)
</span><span class="cx"> {
</span><span class="cx"> // The size, 10, is arbitrary.
</span><span class="lines">@@ -72,6 +73,7 @@
</span><span class="cx"> static CFCharacterSetRef characterSet = copyFontCharacterSet(CFSTR(".PhoneFallback"));
</span><span class="cx"> return characterSet;
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> PassRefPtr<Font> FontCache::getSystemFontFallbackForCharacters(const FontDescription& description, const Font* originalFontData, const UChar* characters, unsigned length)
</span><span class="cx"> {
</span><span class="lines">@@ -81,7 +83,7 @@
</span><span class="cx"> CFIndex coveredLength = 0;
</span><span class="cx"> RetainPtr<CTFontRef> substituteFont = adoptCF(CTFontCreatePhysicalFontForCharactersWithLanguage(ctFont, (const UTF16Char*)characters, (CFIndex)length, 0, &coveredLength));
</span><span class="cx"> if (!substituteFont)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> CTFontSymbolicTraits originalTraits = CTFontGetSymbolicTraits(ctFont);
</span><span class="cx"> CTFontSymbolicTraits actualTraits = 0;
</span><span class="lines">@@ -97,6 +99,7 @@
</span><span class="cx"> return fontForPlatformData(alternateFont);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if __IPHONE_OS_VERSION_MIN_REQUIRED < 90000
</ins><span class="cx"> enum class LanguageSpecificFont {
</span><span class="cx"> None,
</span><span class="cx"> ChineseJapanese,
</span><span class="lines">@@ -193,6 +196,7 @@
</span><span class="cx"> return LanguageSpecificFont::ChineseJapanese;
</span><span class="cx"> return LanguageSpecificFont::None;
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> RefPtr<Font> FontCache::systemFallbackForCharacters(const FontDescription& description, const Font* originalFontData, bool, const UChar* characters, unsigned length)
</span><span class="cx"> {
</span><span class="lines">@@ -216,12 +220,13 @@
</span><span class="cx"> return getSystemFontFallbackForCharacters(description, originalFontData, characters, length);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ RefPtr<Font> font;
+
+#if __IPHONE_OS_VERSION_MIN_REQUIRED < 90000
</ins><span class="cx"> LanguageSpecificFont languageSpecificFont = LanguageSpecificFont::None;
</span><span class="cx"> if (length)
</span><span class="cx"> languageSpecificFont = languageSpecificFallbackFont(c);
</span><span class="cx">
</span><del>- RefPtr<Font> font;
-
</del><span class="cx"> switch (languageSpecificFont) {
</span><span class="cx"> case LanguageSpecificFont::ChineseJapanese: {
</span><span class="cx"> // By default, Chinese font is preferred, fall back on Japanese.
</span><span class="lines">@@ -439,6 +444,11 @@
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+#else
+ RetainPtr<CTFontDescriptorRef> fallbackFontDescriptor = adoptCF(CTFontCreatePhysicalFontDescriptorForCharactersWithLanguage(originalFontData->getCTFont(), characters, length, nullptr, nullptr));
+ if (RetainPtr<CFStringRef> foundFontName = adoptCF(static_cast<CFStringRef>(CTFontDescriptorCopyAttribute(fallbackFontDescriptor.get(), kCTFontNameAttribute))))
+ font = fontForFamily(description, foundFontName.get(), false);
+#endif
</ins><span class="cx">
</span><span class="cx"> if (font)
</span><span class="cx"> return font.release();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformspicocoaCoreTextSPIh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h (182893 => 182894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h        2015-04-16 17:30:20 UTC (rev 182893)
+++ trunk/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h        2015-04-16 17:32:27 UTC (rev 182894)
</span><span class="lines">@@ -108,6 +108,7 @@
</span><span class="cx"> extern const CFStringRef kCTUIFontTextStyleTitle1;
</span><span class="cx"> extern const CFStringRef kCTUIFontTextStyleTitle2;
</span><span class="cx"> extern const CFStringRef kCTUIFontTextStyleTitle3;
</span><ins>+CTFontDescriptorRef CTFontCreatePhysicalFontDescriptorForCharactersWithLanguage(CTFontRef currentFont, const UTF16Char* characters, CFIndex length, CFStringRef language, CFIndex* coveredLength);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> CTFontRef CTFontCreatePhysicalFontForCharactersWithLanguage(CTFontRef, const UTF16Char* characters, CFIndex length, CFStringRef language, CFIndex* coveredLength);
</span></span></pre>
</div>
</div>
</body>
</html>