<!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>[214242] 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/214242">214242</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2017-03-22 00:15:16 -0700 (Wed, 22 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[iOS] Migrate off of CTFontCreateForCSS
https://bugs.webkit.org/show_bug.cgi?id=168894

Reviewed by Antti Koivisto.

Source/WebCore:

Use the new font selection algorithm introduced in <a href="http://trac.webkit.org/projects/webkit/changeset/213163">r213163</a> on iOS.

Test: fast/text/font-weights.html

* platform/graphics/cocoa/FontCacheCoreText.cpp:
* platform/graphics/cocoa/FontCocoa.mm: On iOS only, CTFontCreateForCSS()
will return a 0-sized font if the passed size parameter is 0. However, all
other CT APIs will create a 12-px-sized font if the passed size parameter is
0. Most of our code knows and understands this (because this is how it works
on the Mac). However, this one place needs to be updated to understand this.

LayoutTests:

* platform/ios-simulator/fast/text/font-weights-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorfasttextfontweightsexpectedtxt">trunk/LayoutTests/platform/ios-simulator/fast/text/font-weights-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaFontCacheCoreTextcpp">trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaFontCocoamm">trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (214241 => 214242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-03-22 03:49:50 UTC (rev 214241)
+++ trunk/LayoutTests/ChangeLog        2017-03-22 07:15:16 UTC (rev 214242)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2017-03-21  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        [iOS] Migrate off of CTFontCreateForCSS
+        https://bugs.webkit.org/show_bug.cgi?id=168894
+
+        Reviewed by Antti Koivisto.
+
+        * platform/ios-simulator/fast/text/font-weights-expected.txt:
+
</ins><span class="cx"> 2017-03-21  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Disable all virtual tables.
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorfasttextfontweightsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/fast/text/font-weights-expected.txt (214241 => 214242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/fast/text/font-weights-expected.txt        2017-03-22 03:49:50 UTC (rev 214241)
+++ trunk/LayoutTests/platform/ios-simulator/fast/text/font-weights-expected.txt        2017-03-22 07:15:16 UTC (rev 214242)
</span><span class="lines">@@ -193,17 +193,17 @@
</span><span class="cx">         RenderText {#text} at (0,0) size 388x19
</span><span class="cx">           text run at (0,0) width 388: &quot;Font: HelveticaNeue-UltraLightItalic Weight: 500 Style: normal&quot;
</span><span class="cx">       RenderBlock {DIV} at (0,1388) size 784x21
</span><del>-        RenderText {#text} at (0,0) size 472x20
-          text run at (0,0) width 472: &quot;Font: HelveticaNeue-UltraLightItalic Weight: 600 Style: normal&quot;
</del><ins>+        RenderText {#text} at (0,0) size 470x20
+          text run at (0,0) width 470: &quot;Font: HelveticaNeue-UltraLightItalic Weight: 600 Style: normal&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,1409) size 784x21
</span><del>-        RenderText {#text} at (0,0) size 472x20
-          text run at (0,0) width 472: &quot;Font: HelveticaNeue-UltraLightItalic Weight: 700 Style: normal&quot;
</del><ins>+        RenderText {#text} at (0,0) size 470x20
+          text run at (0,0) width 470: &quot;Font: HelveticaNeue-UltraLightItalic Weight: 700 Style: normal&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,1430) size 784x21
</span><del>-        RenderText {#text} at (0,0) size 472x20
-          text run at (0,0) width 472: &quot;Font: HelveticaNeue-UltraLightItalic Weight: 800 Style: normal&quot;
</del><ins>+        RenderText {#text} at (0,0) size 470x20
+          text run at (0,0) width 470: &quot;Font: HelveticaNeue-UltraLightItalic Weight: 800 Style: normal&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,1451) size 784x21
</span><del>-        RenderText {#text} at (0,0) size 472x20
-          text run at (0,0) width 472: &quot;Font: HelveticaNeue-UltraLightItalic Weight: 900 Style: normal&quot;
</del><ins>+        RenderText {#text} at (0,0) size 470x20
+          text run at (0,0) width 470: &quot;Font: HelveticaNeue-UltraLightItalic Weight: 900 Style: normal&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,1472) size 784x21
</span><span class="cx">         RenderText {#text} at (0,0) size 391x20
</span><span class="cx">           text run at (0,0) width 391: &quot;Font: HelveticaNeue-LightItalic Weight: 100 Style: normal&quot;
</span><span class="lines">@@ -220,17 +220,17 @@
</span><span class="cx">         RenderText {#text} at (0,0) size 391x20
</span><span class="cx">           text run at (0,0) width 391: &quot;Font: HelveticaNeue-LightItalic Weight: 500 Style: normal&quot;
</span><span class="cx">       RenderBlock {DIV} at (0,1577) size 784x21
</span><del>-        RenderText {#text} at (0,0) size 435x20
-          text run at (0,0) width 435: &quot;Font: HelveticaNeue-LightItalic Weight: 600 Style: normal&quot;
</del><ins>+        RenderText {#text} at (0,0) size 433x20
+          text run at (0,0) width 433: &quot;Font: HelveticaNeue-LightItalic Weight: 600 Style: normal&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,1598) size 784x21
</span><del>-        RenderText {#text} at (0,0) size 435x20
-          text run at (0,0) width 435: &quot;Font: HelveticaNeue-LightItalic Weight: 700 Style: normal&quot;
</del><ins>+        RenderText {#text} at (0,0) size 433x20
+          text run at (0,0) width 433: &quot;Font: HelveticaNeue-LightItalic Weight: 700 Style: normal&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,1619) size 784x21
</span><del>-        RenderText {#text} at (0,0) size 435x20
-          text run at (0,0) width 435: &quot;Font: HelveticaNeue-LightItalic Weight: 800 Style: normal&quot;
</del><ins>+        RenderText {#text} at (0,0) size 433x20
+          text run at (0,0) width 433: &quot;Font: HelveticaNeue-LightItalic Weight: 800 Style: normal&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,1640) size 784x21
</span><del>-        RenderText {#text} at (0,0) size 435x20
-          text run at (0,0) width 435: &quot;Font: HelveticaNeue-LightItalic Weight: 900 Style: normal&quot;
</del><ins>+        RenderText {#text} at (0,0) size 433x20
+          text run at (0,0) width 433: &quot;Font: HelveticaNeue-LightItalic Weight: 900 Style: normal&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,1661) size 784x21
</span><span class="cx">         RenderText {#text} at (0,0) size 371x20
</span><span class="cx">           text run at (0,0) width 371: &quot;Font: HelveticaNeue-Italic Weight: 100 Style: normal&quot;
</span><span class="lines">@@ -247,17 +247,17 @@
</span><span class="cx">         RenderText {#text} at (0,0) size 371x20
</span><span class="cx">           text run at (0,0) width 371: &quot;Font: HelveticaNeue-Italic Weight: 500 Style: normal&quot;
</span><span class="cx">       RenderBlock {DIV} at (0,1766) size 784x21
</span><del>-        RenderText {#text} at (0,0) size 396x20
-          text run at (0,0) width 396: &quot;Font: HelveticaNeue-Italic Weight: 600 Style: normal&quot;
</del><ins>+        RenderText {#text} at (0,0) size 394x20
+          text run at (0,0) width 394: &quot;Font: HelveticaNeue-Italic Weight: 600 Style: normal&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,1787) size 784x21
</span><del>-        RenderText {#text} at (0,0) size 396x20
-          text run at (0,0) width 396: &quot;Font: HelveticaNeue-Italic Weight: 700 Style: normal&quot;
</del><ins>+        RenderText {#text} at (0,0) size 394x20
+          text run at (0,0) width 394: &quot;Font: HelveticaNeue-Italic Weight: 700 Style: normal&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,1808) size 784x21
</span><del>-        RenderText {#text} at (0,0) size 396x20
-          text run at (0,0) width 396: &quot;Font: HelveticaNeue-Italic Weight: 800 Style: normal&quot;
</del><ins>+        RenderText {#text} at (0,0) size 394x20
+          text run at (0,0) width 394: &quot;Font: HelveticaNeue-Italic Weight: 800 Style: normal&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,1829) size 784x21
</span><del>-        RenderText {#text} at (0,0) size 396x20
-          text run at (0,0) width 396: &quot;Font: HelveticaNeue-Italic Weight: 900 Style: normal&quot;
</del><ins>+        RenderText {#text} at (0,0) size 394x20
+          text run at (0,0) width 394: &quot;Font: HelveticaNeue-Italic Weight: 900 Style: normal&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,1850) size 784x21
</span><span class="cx">         RenderText {#text} at (0,0) size 431x20
</span><span class="cx">           text run at (0,0) width 431: &quot;Font: HelveticaNeue-BoldItalic Weight: 100 Style: normal&quot;
</span><span class="lines">@@ -315,126 +315,126 @@
</span><span class="cx">       RenderBlock {DIV} at (0,2227) size 784x20
</span><span class="cx">         RenderText {#text} at (0,0) size 345x19
</span><span class="cx">           text run at (0,0) width 345: &quot;Font: HelveticaNeue-UltraLight Weight: 100 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2247) size 784x20
-        RenderText {#text} at (0,0) size 345x19
-          text run at (0,0) width 345: &quot;Font: HelveticaNeue-UltraLight Weight: 200 Style: italic&quot;
-      RenderBlock {DIV} at (0,2267) size 784x20
-        RenderText {#text} at (0,0) size 345x19
-          text run at (0,0) width 345: &quot;Font: HelveticaNeue-UltraLight Weight: 300 Style: italic&quot;
-      RenderBlock {DIV} at (0,2287) size 784x20
-        RenderText {#text} at (0,0) size 345x19
-          text run at (0,0) width 345: &quot;Font: HelveticaNeue-UltraLight Weight: 400 Style: italic&quot;
-      RenderBlock {DIV} at (0,2307) size 784x20
-        RenderText {#text} at (0,0) size 345x19
-          text run at (0,0) width 345: &quot;Font: HelveticaNeue-UltraLight Weight: 500 Style: italic&quot;
-      RenderBlock {DIV} at (0,2327) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2247) size 784x21
+        RenderText {#text} at (0,0) size 361x20
+          text run at (0,0) width 361: &quot;Font: HelveticaNeue-UltraLight Weight: 200 Style: italic&quot;
+      RenderBlock {DIV} at (0,2268) size 784x21
+        RenderText {#text} at (0,0) size 376x20
+          text run at (0,0) width 376: &quot;Font: HelveticaNeue-UltraLight Weight: 300 Style: italic&quot;
+      RenderBlock {DIV} at (0,2289) size 784x21
+        RenderText {#text} at (0,0) size 391x20
+          text run at (0,0) width 391: &quot;Font: HelveticaNeue-UltraLight Weight: 400 Style: italic&quot;
+      RenderBlock {DIV} at (0,2310) size 784x21
+        RenderText {#text} at (0,0) size 404x20
+          text run at (0,0) width 404: &quot;Font: HelveticaNeue-UltraLight Weight: 500 Style: italic&quot;
+      RenderBlock {DIV} at (0,2331) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 418x20
</span><span class="cx">           text run at (0,0) width 418: &quot;Font: HelveticaNeue-UltraLight Weight: 600 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2348) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2352) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 418x20
</span><span class="cx">           text run at (0,0) width 418: &quot;Font: HelveticaNeue-UltraLight Weight: 700 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2369) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2373) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 418x20
</span><span class="cx">           text run at (0,0) width 418: &quot;Font: HelveticaNeue-UltraLight Weight: 800 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2390) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2394) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 418x20
</span><span class="cx">           text run at (0,0) width 418: &quot;Font: HelveticaNeue-UltraLight Weight: 900 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2411) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2415) size 784x20
+        RenderText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: &quot;Font: HelveticaNeue-Light Weight: 100 Style: italic&quot;
+      RenderBlock {DIV} at (0,2435) size 784x21
+        RenderText {#text} at (0,0) size 331x20
+          text run at (0,0) width 331: &quot;Font: HelveticaNeue-Light Weight: 200 Style: italic&quot;
+      RenderBlock {DIV} at (0,2456) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 344x20
</span><del>-          text run at (0,0) width 344: &quot;Font: HelveticaNeue-Light Weight: 100 Style: italic&quot;
-      RenderBlock {DIV} at (0,2432) size 784x21
-        RenderText {#text} at (0,0) size 344x20
-          text run at (0,0) width 344: &quot;Font: HelveticaNeue-Light Weight: 200 Style: italic&quot;
-      RenderBlock {DIV} at (0,2453) size 784x21
-        RenderText {#text} at (0,0) size 344x20
</del><span class="cx">           text run at (0,0) width 344: &quot;Font: HelveticaNeue-Light Weight: 300 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2474) size 784x21
-        RenderText {#text} at (0,0) size 344x20
-          text run at (0,0) width 344: &quot;Font: HelveticaNeue-Light Weight: 400 Style: italic&quot;
-      RenderBlock {DIV} at (0,2495) size 784x21
-        RenderText {#text} at (0,0) size 344x20
-          text run at (0,0) width 344: &quot;Font: HelveticaNeue-Light Weight: 500 Style: italic&quot;
-      RenderBlock {DIV} at (0,2516) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2477) size 784x21
+        RenderText {#text} at (0,0) size 357x20
+          text run at (0,0) width 357: &quot;Font: HelveticaNeue-Light Weight: 400 Style: italic&quot;
+      RenderBlock {DIV} at (0,2498) size 784x21
+        RenderText {#text} at (0,0) size 368x20
+          text run at (0,0) width 368: &quot;Font: HelveticaNeue-Light Weight: 500 Style: italic&quot;
+      RenderBlock {DIV} at (0,2519) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 381x20
</span><span class="cx">           text run at (0,0) width 381: &quot;Font: HelveticaNeue-Light Weight: 600 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2537) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2540) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 381x20
</span><span class="cx">           text run at (0,0) width 381: &quot;Font: HelveticaNeue-Light Weight: 700 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2558) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2561) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 381x20
</span><span class="cx">           text run at (0,0) width 381: &quot;Font: HelveticaNeue-Light Weight: 800 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2579) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2582) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 381x20
</span><span class="cx">           text run at (0,0) width 381: &quot;Font: HelveticaNeue-Light Weight: 900 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2600) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2603) size 784x20
+        RenderText {#text} at (0,0) size 282x19
+          text run at (0,0) width 282: &quot;Font: HelveticaNeue Weight: 100 Style: italic&quot;
+      RenderBlock {DIV} at (0,2623) size 784x21
+        RenderText {#text} at (0,0) size 294x20
+          text run at (0,0) width 294: &quot;Font: HelveticaNeue Weight: 200 Style: italic&quot;
+      RenderBlock {DIV} at (0,2644) size 784x21
+        RenderText {#text} at (0,0) size 304x20
+          text run at (0,0) width 304: &quot;Font: HelveticaNeue Weight: 300 Style: italic&quot;
+      RenderBlock {DIV} at (0,2665) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 315x20
</span><del>-          text run at (0,0) width 315: &quot;Font: HelveticaNeue Weight: 100 Style: italic&quot;
-      RenderBlock {DIV} at (0,2621) size 784x21
-        RenderText {#text} at (0,0) size 315x20
-          text run at (0,0) width 315: &quot;Font: HelveticaNeue Weight: 200 Style: italic&quot;
-      RenderBlock {DIV} at (0,2642) size 784x21
-        RenderText {#text} at (0,0) size 315x20
-          text run at (0,0) width 315: &quot;Font: HelveticaNeue Weight: 300 Style: italic&quot;
-      RenderBlock {DIV} at (0,2663) size 784x21
-        RenderText {#text} at (0,0) size 315x20
</del><span class="cx">           text run at (0,0) width 315: &quot;Font: HelveticaNeue Weight: 400 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2684) size 784x21
-        RenderText {#text} at (0,0) size 315x20
-          text run at (0,0) width 315: &quot;Font: HelveticaNeue Weight: 500 Style: italic&quot;
-      RenderBlock {DIV} at (0,2705) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2686) size 784x21
+        RenderText {#text} at (0,0) size 325x20
+          text run at (0,0) width 325: &quot;Font: HelveticaNeue Weight: 500 Style: italic&quot;
+      RenderBlock {DIV} at (0,2707) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 336x20
</span><span class="cx">           text run at (0,0) width 336: &quot;Font: HelveticaNeue Weight: 600 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2726) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2728) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 336x20
</span><span class="cx">           text run at (0,0) width 336: &quot;Font: HelveticaNeue Weight: 700 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2747) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2749) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 336x20
</span><span class="cx">           text run at (0,0) width 336: &quot;Font: HelveticaNeue Weight: 800 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2768) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2770) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 336x20
</span><span class="cx">           text run at (0,0) width 336: &quot;Font: HelveticaNeue Weight: 900 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2789) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2791) size 784x20
+        RenderText {#text} at (0,0) size 339x19
+          text run at (0,0) width 339: &quot;Font: HelveticaNeue-Medium Weight: 100 Style: italic&quot;
+      RenderBlock {DIV} at (0,2811) size 784x21
+        RenderText {#text} at (0,0) size 354x20
+          text run at (0,0) width 354: &quot;Font: HelveticaNeue-Medium Weight: 200 Style: italic&quot;
+      RenderBlock {DIV} at (0,2832) size 784x21
+        RenderText {#text} at (0,0) size 366x20
+          text run at (0,0) width 366: &quot;Font: HelveticaNeue-Medium Weight: 300 Style: italic&quot;
+      RenderBlock {DIV} at (0,2853) size 784x21
+        RenderText {#text} at (0,0) size 379x20
+          text run at (0,0) width 379: &quot;Font: HelveticaNeue-Medium Weight: 400 Style: italic&quot;
+      RenderBlock {DIV} at (0,2874) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 391x20
</span><del>-          text run at (0,0) width 391: &quot;Font: HelveticaNeue-Medium Weight: 100 Style: italic&quot;
-      RenderBlock {DIV} at (0,2810) size 784x21
-        RenderText {#text} at (0,0) size 391x20
-          text run at (0,0) width 391: &quot;Font: HelveticaNeue-Medium Weight: 200 Style: italic&quot;
-      RenderBlock {DIV} at (0,2831) size 784x21
-        RenderText {#text} at (0,0) size 391x20
-          text run at (0,0) width 391: &quot;Font: HelveticaNeue-Medium Weight: 300 Style: italic&quot;
-      RenderBlock {DIV} at (0,2852) size 784x21
-        RenderText {#text} at (0,0) size 391x20
-          text run at (0,0) width 391: &quot;Font: HelveticaNeue-Medium Weight: 400 Style: italic&quot;
-      RenderBlock {DIV} at (0,2873) size 784x21
-        RenderText {#text} at (0,0) size 391x20
</del><span class="cx">           text run at (0,0) width 391: &quot;Font: HelveticaNeue-Medium Weight: 500 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2894) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2895) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 404x20
</span><span class="cx">           text run at (0,0) width 404: &quot;Font: HelveticaNeue-Medium Weight: 600 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2915) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2916) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 404x20
</span><span class="cx">           text run at (0,0) width 404: &quot;Font: HelveticaNeue-Medium Weight: 700 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2936) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2937) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 404x20
</span><span class="cx">           text run at (0,0) width 404: &quot;Font: HelveticaNeue-Medium Weight: 800 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2957) size 784x21
</del><ins>+      RenderBlock {DIV} at (0,2958) size 784x21
</ins><span class="cx">         RenderText {#text} at (0,0) size 404x20
</span><span class="cx">           text run at (0,0) width 404: &quot;Font: HelveticaNeue-Medium Weight: 900 Style: italic&quot;
</span><del>-      RenderBlock {DIV} at (0,2978) size 784x21
-        RenderText {#text} at (0,0) size 377x20
-          text run at (0,0) width 377: &quot;Font: HelveticaNeue-Bold Weight: 100 Style: italic&quot;
</del><ins>+      RenderBlock {DIV} at (0,2979) size 784x20
+        RenderText {#text} at (0,0) size 316x19
+          text run at (0,0) width 316: &quot;Font: HelveticaNeue-Bold Weight: 100 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,2999) size 784x21
</span><del>-        RenderText {#text} at (0,0) size 377x20
-          text run at (0,0) width 377: &quot;Font: HelveticaNeue-Bold Weight: 200 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 330x20
+          text run at (0,0) width 330: &quot;Font: HelveticaNeue-Bold Weight: 200 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,3020) size 784x21
</span><del>-        RenderText {#text} at (0,0) size 377x20
-          text run at (0,0) width 377: &quot;Font: HelveticaNeue-Bold Weight: 300 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 342x20
+          text run at (0,0) width 342: &quot;Font: HelveticaNeue-Bold Weight: 300 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,3041) size 784x21
</span><del>-        RenderText {#text} at (0,0) size 377x20
-          text run at (0,0) width 377: &quot;Font: HelveticaNeue-Bold Weight: 400 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 355x20
+          text run at (0,0) width 355: &quot;Font: HelveticaNeue-Bold Weight: 400 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,3062) size 784x21
</span><del>-        RenderText {#text} at (0,0) size 377x20
-          text run at (0,0) width 377: &quot;Font: HelveticaNeue-Bold Weight: 500 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 365x20
+          text run at (0,0) width 365: &quot;Font: HelveticaNeue-Bold Weight: 500 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,3083) size 784x21
</span><span class="cx">         RenderText {#text} at (0,0) size 377x20
</span><span class="cx">           text run at (0,0) width 377: &quot;Font: HelveticaNeue-Bold Weight: 600 Style: italic&quot;
</span><span class="lines">@@ -769,8 +769,8 @@
</span><span class="cx">         RenderText {#text} at (0,0) size 399x22
</span><span class="cx">           text run at (0,0) width 399: &quot;Font: Avenir-BookOblique Weight: 800 Style: normal&quot;
</span><span class="cx">       RenderBlock {DIV} at (0,5480) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 395x22
-          text run at (0,0) width 395: &quot;Font: Avenir-BookOblique Weight: 900 Style: normal&quot;
</del><ins>+        RenderText {#text} at (0,0) size 396x22
+          text run at (0,0) width 396: &quot;Font: Avenir-BookOblique Weight: 900 Style: normal&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,5502) size 784x22
</span><span class="cx">         RenderText {#text} at (0,0) size 402x22
</span><span class="cx">           text run at (0,0) width 402: &quot;Font: Avenir-MediumOblique Weight: 100 Style: normal&quot;
</span><span class="lines">@@ -796,8 +796,8 @@
</span><span class="cx">         RenderText {#text} at (0,0) size 422x22
</span><span class="cx">           text run at (0,0) width 422: &quot;Font: Avenir-MediumOblique Weight: 800 Style: normal&quot;
</span><span class="cx">       RenderBlock {DIV} at (0,5678) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 418x22
-          text run at (0,0) width 418: &quot;Font: Avenir-MediumOblique Weight: 900 Style: normal&quot;
</del><ins>+        RenderText {#text} at (0,0) size 419x22
+          text run at (0,0) width 419: &quot;Font: Avenir-MediumOblique Weight: 900 Style: normal&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,5700) size 784x22
</span><span class="cx">         RenderText {#text} at (0,0) size 400x22
</span><span class="cx">           text run at (0,0) width 400: &quot;Font: Avenir-BlackOblique Weight: 100 Style: normal&quot;
</span><span class="lines">@@ -862,11 +862,11 @@
</span><span class="cx">         RenderText {#text} at (0,0) size 295x22
</span><span class="cx">           text run at (0,0) width 295: &quot;Font: Avenir-Light Weight: 300 Style: italic&quot;
</span><span class="cx">       RenderBlock {DIV} at (0,6162) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 295x22
-          text run at (0,0) width 295: &quot;Font: Avenir-Light Weight: 400 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 300x22
+          text run at (0,0) width 300: &quot;Font: Avenir-Light Weight: 400 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6184) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 295x22
-          text run at (0,0) width 295: &quot;Font: Avenir-Light Weight: 500 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 305x22
+          text run at (0,0) width 305: &quot;Font: Avenir-Light Weight: 500 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6206) size 784x22
</span><span class="cx">         RenderText {#text} at (0,0) size 322x22
</span><span class="cx">           text run at (0,0) width 322: &quot;Font: Avenir-Light Weight: 600 Style: italic&quot;
</span><span class="lines">@@ -880,20 +880,20 @@
</span><span class="cx">         RenderText {#text} at (0,0) size 318x22
</span><span class="cx">           text run at (0,0) width 318: &quot;Font: Avenir-Light Weight: 900 Style: italic&quot;
</span><span class="cx">       RenderBlock {DIV} at (0,6294) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 301x22
-          text run at (0,0) width 301: &quot;Font: Avenir-Book Weight: 100 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 296x22
+          text run at (0,0) width 296: &quot;Font: Avenir-Book Weight: 100 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6316) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 301x22
-          text run at (0,0) width 301: &quot;Font: Avenir-Book Weight: 200 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 296x22
+          text run at (0,0) width 296: &quot;Font: Avenir-Book Weight: 200 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6338) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 301x22
-          text run at (0,0) width 301: &quot;Font: Avenir-Book Weight: 300 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 296x22
+          text run at (0,0) width 296: &quot;Font: Avenir-Book Weight: 300 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6360) size 784x22
</span><span class="cx">         RenderText {#text} at (0,0) size 301x22
</span><span class="cx">           text run at (0,0) width 301: &quot;Font: Avenir-Book Weight: 400 Style: italic&quot;
</span><span class="cx">       RenderBlock {DIV} at (0,6382) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 301x22
-          text run at (0,0) width 301: &quot;Font: Avenir-Book Weight: 500 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 305x22
+          text run at (0,0) width 305: &quot;Font: Avenir-Book Weight: 500 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6404) size 784x22
</span><span class="cx">         RenderText {#text} at (0,0) size 322x22
</span><span class="cx">           text run at (0,0) width 322: &quot;Font: Avenir-Book Weight: 600 Style: italic&quot;
</span><span class="lines">@@ -907,17 +907,17 @@
</span><span class="cx">         RenderText {#text} at (0,0) size 318x22
</span><span class="cx">           text run at (0,0) width 318: &quot;Font: Avenir-Book Weight: 900 Style: italic&quot;
</span><span class="cx">       RenderBlock {DIV} at (0,6492) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 327x22
-          text run at (0,0) width 327: &quot;Font: Avenir-Medium Weight: 100 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 319x22
+          text run at (0,0) width 319: &quot;Font: Avenir-Medium Weight: 100 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6514) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 327x22
-          text run at (0,0) width 327: &quot;Font: Avenir-Medium Weight: 200 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 319x22
+          text run at (0,0) width 319: &quot;Font: Avenir-Medium Weight: 200 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6536) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 327x22
-          text run at (0,0) width 327: &quot;Font: Avenir-Medium Weight: 300 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 319x22
+          text run at (0,0) width 319: &quot;Font: Avenir-Medium Weight: 300 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6558) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 327x22
-          text run at (0,0) width 327: &quot;Font: Avenir-Medium Weight: 400 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 323x22
+          text run at (0,0) width 323: &quot;Font: Avenir-Medium Weight: 400 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6580) size 784x22
</span><span class="cx">         RenderText {#text} at (0,0) size 327x22
</span><span class="cx">           text run at (0,0) width 327: &quot;Font: Avenir-Medium Weight: 500 Style: italic&quot;
</span><span class="lines">@@ -934,20 +934,20 @@
</span><span class="cx">         RenderText {#text} at (0,0) size 341x22
</span><span class="cx">           text run at (0,0) width 341: &quot;Font: Avenir-Medium Weight: 900 Style: italic&quot;
</span><span class="cx">       RenderBlock {DIV} at (0,6690) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 323x22
-          text run at (0,0) width 323: &quot;Font: Avenir-Black Weight: 100 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 297x22
+          text run at (0,0) width 297: &quot;Font: Avenir-Black Weight: 100 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6712) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 323x22
-          text run at (0,0) width 323: &quot;Font: Avenir-Black Weight: 200 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 297x22
+          text run at (0,0) width 297: &quot;Font: Avenir-Black Weight: 200 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6734) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 323x22
-          text run at (0,0) width 323: &quot;Font: Avenir-Black Weight: 300 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 297x22
+          text run at (0,0) width 297: &quot;Font: Avenir-Black Weight: 300 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6756) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 323x22
-          text run at (0,0) width 323: &quot;Font: Avenir-Black Weight: 400 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 302x22
+          text run at (0,0) width 302: &quot;Font: Avenir-Black Weight: 400 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6778) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 323x22
-          text run at (0,0) width 323: &quot;Font: Avenir-Black Weight: 500 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 306x22
+          text run at (0,0) width 306: &quot;Font: Avenir-Black Weight: 500 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6800) size 784x22
</span><span class="cx">         RenderText {#text} at (0,0) size 323x22
</span><span class="cx">           text run at (0,0) width 323: &quot;Font: Avenir-Black Weight: 600 Style: italic&quot;
</span><span class="lines">@@ -958,32 +958,32 @@
</span><span class="cx">         RenderText {#text} at (0,0) size 323x22
</span><span class="cx">           text run at (0,0) width 323: &quot;Font: Avenir-Black Weight: 800 Style: italic&quot;
</span><span class="cx">       RenderBlock {DIV} at (0,6866) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 323x22
-          text run at (0,0) width 323: &quot;Font: Avenir-Black Weight: 900 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 319x22
+          text run at (0,0) width 319: &quot;Font: Avenir-Black Weight: 900 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6888) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 326x22
-          text run at (0,0) width 326: &quot;Font: Avenir-Heavy Weight: 100 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 303x22
+          text run at (0,0) width 303: &quot;Font: Avenir-Heavy Weight: 100 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6910) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 326x22
-          text run at (0,0) width 326: &quot;Font: Avenir-Heavy Weight: 200 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 303x22
+          text run at (0,0) width 303: &quot;Font: Avenir-Heavy Weight: 200 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6932) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 326x22
-          text run at (0,0) width 326: &quot;Font: Avenir-Heavy Weight: 300 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 303x22
+          text run at (0,0) width 303: &quot;Font: Avenir-Heavy Weight: 300 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6954) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 326x22
-          text run at (0,0) width 326: &quot;Font: Avenir-Heavy Weight: 400 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 308x22
+          text run at (0,0) width 308: &quot;Font: Avenir-Heavy Weight: 400 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6976) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 326x22
-          text run at (0,0) width 326: &quot;Font: Avenir-Heavy Weight: 500 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 313x22
+          text run at (0,0) width 313: &quot;Font: Avenir-Heavy Weight: 500 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,6998) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 326x22
-          text run at (0,0) width 326: &quot;Font: Avenir-Heavy Weight: 600 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 331x22
+          text run at (0,0) width 331: &quot;Font: Avenir-Heavy Weight: 600 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,7020) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 326x22
-          text run at (0,0) width 326: &quot;Font: Avenir-Heavy Weight: 700 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 331x22
+          text run at (0,0) width 331: &quot;Font: Avenir-Heavy Weight: 700 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,7042) size 784x22
</span><del>-        RenderText {#text} at (0,0) size 326x22
-          text run at (0,0) width 326: &quot;Font: Avenir-Heavy Weight: 800 Style: italic&quot;
</del><ins>+        RenderText {#text} at (0,0) size 331x22
+          text run at (0,0) width 331: &quot;Font: Avenir-Heavy Weight: 800 Style: italic&quot;
</ins><span class="cx">       RenderBlock {DIV} at (0,7064) size 784x22
</span><span class="cx">         RenderText {#text} at (0,0) size 326x22
</span><span class="cx">           text run at (0,0) width 326: &quot;Font: Avenir-Heavy Weight: 900 Style: italic&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (214241 => 214242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-22 03:49:50 UTC (rev 214241)
+++ trunk/Source/WebCore/ChangeLog        2017-03-22 07:15:16 UTC (rev 214242)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2017-03-21  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        [iOS] Migrate off of CTFontCreateForCSS
+        https://bugs.webkit.org/show_bug.cgi?id=168894
+
+        Reviewed by Antti Koivisto.
+
+        Use the new font selection algorithm introduced in r213163 on iOS.
+
+        Test: fast/text/font-weights.html
+
+        * platform/graphics/cocoa/FontCacheCoreText.cpp:
+        * platform/graphics/cocoa/FontCocoa.mm: On iOS only, CTFontCreateForCSS()
+        will return a 0-sized font if the passed size parameter is 0. However, all
+        other CT APIs will create a 12-px-sized font if the passed size parameter is
+        0. Most of our code knows and understands this (because this is how it works
+        on the Mac). However, this one place needs to be updated to understand this.
+
</ins><span class="cx"> 2017-03-21  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Make non-decoded image flashing less intrusive
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaFontCacheCoreTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (214241 => 214242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp        2017-03-22 03:49:50 UTC (rev 214241)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp        2017-03-22 07:15:16 UTC (rev 214242)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> #include &lt;wtf/MainThread.h&gt;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> 
</span><del>-#define SHOULD_USE_CORE_TEXT_FONT_LOOKUP ((PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &lt; 101200) || PLATFORM(IOS))
</del><ins>+#define SHOULD_USE_CORE_TEXT_FONT_LOOKUP (PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &lt; 101200)
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaFontCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm (214241 => 214242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm        2017-03-22 03:49:50 UTC (rev 214241)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm        2017-03-22 07:15:16 UTC (rev 214242)
</span><span class="lines">@@ -132,10 +132,10 @@
</span><span class="cx"> 
</span><span class="cx">     unsigned unitsPerEm = CTFontGetUnitsPerEm(m_platformData.font());
</span><span class="cx">     float pointSize = m_platformData.size();
</span><del>-    CGFloat capHeight = CTFontGetCapHeight(m_platformData.font());
-    CGFloat lineGap = CTFontGetLeading(m_platformData.font());
-    CGFloat ascent = m_platformData.size() ? CTFontGetAscent(m_platformData.font()) : 0;
-    CGFloat descent = m_platformData.size() ? CTFontGetDescent(m_platformData.font()) : 0;
</del><ins>+    CGFloat capHeight = pointSize ? CTFontGetCapHeight(m_platformData.font()) : 0;
+    CGFloat lineGap = pointSize ? CTFontGetLeading(m_platformData.font()) : 0;
+    CGFloat ascent = pointSize ? CTFontGetAscent(m_platformData.font()) : 0;
+    CGFloat descent = pointSize ? CTFontGetDescent(m_platformData.font()) : 0;
</ins><span class="cx"> 
</span><span class="cx">     // The Open Font Format describes the OS/2 USE_TYPO_METRICS flag as follows:
</span><span class="cx">     // &quot;If set, it is strongly recommended to use OS/2.sTypoAscender - OS/2.sTypoDescender+ OS/2.sTypoLineGap as a value for default line spacing for this font.&quot;
</span></span></pre>
</div>
</div>

</body>
</html>