<!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>[178213] 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/178213">178213</a></dd>
<dt>Author</dt> <dd>enrica@apple.com</dd>
<dt>Date</dt> <dd>2015-01-09 15:36:04 -0800 (Fri, 09 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[iOS] Support additional text styles.
https://bugs.webkit.org/show_bug.cgi?id=140310
rdar://problem/18568864

Reviewed by Joseph Pecoraro.

Source/WebCore:

Add support for three new text styles.

* css/CSSValueKeywords.in:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::systemFont):

Source/WebInspectorUI:

Add support for three new text styles.

* UserInterface/Models/CSSKeywordCompletions.js:

LayoutTests:

Updates the existing test to include the new text styles.

* platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle-expected.txt:
* platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatoriosfasttextopticalFontWithTextStyleexpectedtxt">trunk/LayoutTests/platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatoriosfasttextopticalFontWithTextStylehtml">trunk/LayoutTests/platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueKeywordsin">trunk/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeIOSmm">trunk/Source/WebCore/rendering/RenderThemeIOS.mm</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsCSSKeywordCompletionsjs">trunk/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (178212 => 178213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-01-09 23:35:16 UTC (rev 178212)
+++ trunk/LayoutTests/ChangeLog        2015-01-09 23:36:04 UTC (rev 178213)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-01-09  Enrica Casucci  &lt;enrica@apple.com&gt;
+
+        [iOS] Support additional text styles.
+        https://bugs.webkit.org/show_bug.cgi?id=140310
+        rdar://problem/18568864
+
+        Reviewed by Joseph Pecoraro.
+
+        Updates the existing test to include the new text styles.
+
+        * platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle-expected.txt:
+        * platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle.html:
+
</ins><span class="cx"> 2015-01-09  Eric Carlson  &lt;eric.carlson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         After updating tests to use kerning, ligatures, and printer fonts, some tests fail
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatoriosfasttextopticalFontWithTextStyleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle-expected.txt (178212 => 178213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle-expected.txt        2015-01-09 23:35:16 UTC (rev 178212)
+++ trunk/LayoutTests/platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle-expected.txt        2015-01-09 23:36:04 UTC (rev 178213)
</span><span class="lines">@@ -6,36 +6,45 @@
</span><span class="cx">       RenderBlock {DIV} at (0,0) size 784x24
</span><span class="cx">         RenderText {#text} at (0,1) size 107x22
</span><span class="cx">           text run at (0,1) width 107: &quot;H1 / Headline&quot;
</span><del>-      RenderBlock {DIV} at (0,39) size 784x24
-        RenderText {#text} at (0,1) size 707x22
-          text run at (0,1) width 707: &quot;Body Text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque ornare ornare mi&quot;
-      RenderBlock {DIV} at (0,78) size 784x26
-        RenderText {#text} at (0,2) size 739x22
-          text run at (0,2) width 739: &quot;Tall Body Text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque ornare ornare mi&quot;
-      RenderBlock {DIV} at (0,119) size 784x22
</del><ins>+      RenderBlock {DIV} at (0,39) size 784x35
+        RenderText {#text} at (0,0) size 122x34
+          text run at (0,0) width 122: &quot;T1 / Title1&quot;
+      RenderBlock {DIV} at (0,89) size 784x29
+        RenderText {#text} at (0,1) size 98x27
+          text run at (0,1) width 98: &quot;T2 / Title2&quot;
+      RenderBlock {DIV} at (0,133) size 784x26
+        RenderText {#text} at (0,0) size 89x25
+          text run at (0,0) width 89: &quot;T3 / Title3&quot;
+      RenderBlock {DIV} at (0,174) size 784x24
+        RenderText {#text} at (0,1) size 705x22
+          text run at (0,1) width 705: &quot;Body Text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque ornare ornare mi&quot;
+      RenderBlock {DIV} at (0,213) size 784x26
+        RenderText {#text} at (0,2) size 735x22
+          text run at (0,2) width 735: &quot;Tall Body Text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque ornare ornare mi&quot;
+      RenderBlock {DIV} at (0,254) size 784x22
</ins><span class="cx">         RenderText {#text} at (0,1) size 87x19
</span><span class="cx">           text run at (0,1) width 87: &quot;Subheadline&quot;
</span><del>-      RenderBlock {DIV} at (0,156) size 784x20
</del><ins>+      RenderBlock {DIV} at (0,291) size 784x20
</ins><span class="cx">         RenderText {#text} at (0,1) size 81x17
</span><span class="cx">           text run at (0,1) width 81: &quot;FN / Footnote&quot;
</span><del>-      RenderBlock {DIV} at (0,191) size 784x17
</del><ins>+      RenderBlock {DIV} at (0,326) size 784x17
</ins><span class="cx">         RenderText {#text} at (0,1) size 96x15
</span><span class="cx">           text run at (0,1) width 96: &quot;Cap 1 / Caption 1&quot;
</span><del>-      RenderBlock {DIV} at (0,223) size 784x14
</del><ins>+      RenderBlock {DIV} at (0,358) size 784x14
</ins><span class="cx">         RenderText {#text} at (0,0) size 88x14
</span><span class="cx">           text run at (0,0) width 88: &quot;Cap 2 / Caption 2&quot;
</span><del>-      RenderBlock {DIV} at (0,252) size 784x22
</del><ins>+      RenderBlock {DIV} at (0,387) size 784x22
</ins><span class="cx">         RenderText {#text} at (0,0) size 154x22
</span><span class="cx">           text run at (0,0) width 154: &quot;Short H1 / Headline&quot;
</span><del>-      RenderBlock {DIV} at (0,289) size 784x22
-        RenderText {#text} at (0,0) size 753x22
-          text run at (0,0) width 753: &quot;Short Body Text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque ornare ornare mi&quot;
-      RenderBlock {DIV} at (0,326) size 784x20
</del><ins>+      RenderBlock {DIV} at (0,424) size 784x22
+        RenderText {#text} at (0,0) size 751x22
+          text run at (0,0) width 751: &quot;Short Body Text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque ornare ornare mi&quot;
+      RenderBlock {DIV} at (0,461) size 784x20
</ins><span class="cx">         RenderText {#text} at (0,0) size 128x19
</span><span class="cx">           text run at (0,0) width 128: &quot;Short Subheadline&quot;
</span><del>-      RenderBlock {DIV} at (0,361) size 784x18
</del><ins>+      RenderBlock {DIV} at (0,496) size 784x18
</ins><span class="cx">         RenderText {#text} at (0,0) size 116x17
</span><span class="cx">           text run at (0,0) width 116: &quot;Short FN / Footnote&quot;
</span><del>-      RenderBlock {DIV} at (0,394) size 784x15
</del><ins>+      RenderBlock {DIV} at (0,529) size 784x15
</ins><span class="cx">         RenderText {#text} at (0,0) size 128x15
</span><span class="cx">           text run at (0,0) width 128: &quot;Short Cap 1 / Caption 1&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatoriosfasttextopticalFontWithTextStylehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle.html (178212 => 178213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle.html        2015-01-09 23:35:16 UTC (rev 178212)
+++ trunk/LayoutTests/platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle.html        2015-01-09 23:36:04 UTC (rev 178213)
</span><span class="lines">@@ -5,6 +5,9 @@
</span><span class="cx">     &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx">     &lt;div style=&quot;margin-top: 15px; font: -apple-system-headline&quot;&gt;H1 / Headline&lt;/div&gt;
</span><ins>+    &lt;div style=&quot;margin-top: 15px; font: -apple-system-title1&quot;&gt;T1 / Title1&lt;/div&gt;
+    &lt;div style=&quot;margin-top: 15px; font: -apple-system-title2&quot;&gt;T2 / Title2&lt;/div&gt;
+    &lt;div style=&quot;margin-top: 15px; font: -apple-system-title3&quot;&gt;T3 / Title3&lt;/div&gt;
</ins><span class="cx">     &lt;div style=&quot;margin-top: 15px; font: -apple-system-body&quot;&gt;Body Text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque ornare ornare mi&lt;/div&gt;
</span><span class="cx">     &lt;div style=&quot;margin-top: 15px; font: -apple-system-tall-body&quot;&gt;Tall Body Text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque ornare ornare mi&lt;/div&gt;
</span><span class="cx">     &lt;div style=&quot;margin-top: 15px; font: -apple-system-subheadline&quot;&gt;Subheadline&lt;/div&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (178212 => 178213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-01-09 23:35:16 UTC (rev 178212)
+++ trunk/Source/WebCore/ChangeLog        2015-01-09 23:36:04 UTC (rev 178213)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-01-09  Enrica Casucci  &lt;enrica@apple.com&gt;
+
+        [iOS] Support additional text styles.
+        https://bugs.webkit.org/show_bug.cgi?id=140310
+        rdar://problem/18568864
+
+        Reviewed by Joseph Pecoraro.
+
+        Add support for three new text styles.
+
+        * css/CSSValueKeywords.in:
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::RenderThemeIOS::systemFont):
+
</ins><span class="cx"> 2015-01-09  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix Windows build.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (178212 => 178213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueKeywords.in        2015-01-09 23:35:16 UTC (rev 178212)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in        2015-01-09 23:36:04 UTC (rev 178213)
</span><span class="lines">@@ -45,6 +45,9 @@
</span><span class="cx"> -apple-system-short-footnote
</span><span class="cx"> -apple-system-short-caption1
</span><span class="cx"> -apple-system-tall-body
</span><ins>+-apple-system-title1
+-apple-system-title2
+-apple-system-title3
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> // This has to go after the -apple-system versions.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (178212 => 178213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm        2015-01-09 23:35:16 UTC (rev 178212)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm        2015-01-09 23:36:04 UTC (rev 178213)
</span><span class="lines">@@ -1119,6 +1119,9 @@
</span><span class="cx">     static NeverDestroyed&lt;FontDescription&gt; shortFootnoteFont;
</span><span class="cx">     static NeverDestroyed&lt;FontDescription&gt; shortCaption1Font;
</span><span class="cx">     static NeverDestroyed&lt;FontDescription&gt; tallBodyFont;
</span><ins>+    static NeverDestroyed&lt;FontDescription&gt; title1Font;
+    static NeverDestroyed&lt;FontDescription&gt; title2Font;
+    static NeverDestroyed&lt;FontDescription&gt; title3Font;
</ins><span class="cx"> 
</span><span class="cx">     static CFStringRef userTextSize = contentSizeCategory();
</span><span class="cx"> 
</span><span class="lines">@@ -1155,6 +1158,24 @@
</span><span class="cx">         if (!bodyFont.get().isAbsoluteSize())
</span><span class="cx">             fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
</span><span class="cx">         break;
</span><ins>+    case CSSValueAppleSystemTitle1:
+        cachedDesc = &amp;title1Font.get();
+        textStyle = kCTUIFontTextStyleTitle1;
+        if (!title1Font.get().isAbsoluteSize())
+            fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
+        break;
+    case CSSValueAppleSystemTitle2:
+        cachedDesc = &amp;title2Font.get();
+        textStyle = kCTUIFontTextStyleTitle2;
+        if (!title2Font.get().isAbsoluteSize())
+            fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
+        break;
+    case CSSValueAppleSystemTitle3:
+        cachedDesc = &amp;title3Font.get();
+        textStyle = kCTUIFontTextStyleTitle3;
+        if (!title3Font.get().isAbsoluteSize())
+            fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
+        break;
</ins><span class="cx">     case CSSValueAppleSystemSubheadline:
</span><span class="cx">         cachedDesc = &amp;subheadlineFont.get();
</span><span class="cx">         textStyle = kCTUIFontTextStyleSubhead;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (178212 => 178213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-01-09 23:35:16 UTC (rev 178212)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-01-09 23:36:04 UTC (rev 178213)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-01-09  Enrica Casucci  &lt;enrica@apple.com&gt;
+
+        [iOS] Support additional text styles.
+        https://bugs.webkit.org/show_bug.cgi?id=140310
+        rdar://problem/18568864
+
+        Reviewed by Joseph Pecoraro.
+
+        Add support for three new text styles.
+
+        * UserInterface/Models/CSSKeywordCompletions.js:
+
</ins><span class="cx"> 2015-01-09  Timothy Hatcher  &lt;timothy@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: REGRESSION: Navigation sidebar can show blank next to the Console view
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsCSSKeywordCompletionsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js (178212 => 178213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js        2015-01-09 23:35:16 UTC (rev 178212)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js        2015-01-09 23:36:04 UTC (rev 178213)
</span><span class="lines">@@ -451,7 +451,8 @@
</span><span class="cx">         &quot;-webkit-system-font&quot;, &quot;-apple-system-font&quot;, &quot;-apple-system-headline&quot;, &quot;-apple-system-body&quot;,
</span><span class="cx">         &quot;-apple-system-subheadline&quot;, &quot;-apple-system-footnote&quot;, &quot;-apple-system-caption1&quot;, &quot;-apple-system-caption2&quot;,
</span><span class="cx">         &quot;-apple-system-short-headline&quot;, &quot;-apple-system-short-body&quot;, &quot;-apple-system-short-subheadline&quot;,
</span><del>-        &quot;-apple-system-short-footnote&quot;, &quot;-apple-system-short-caption1&quot;, &quot;-apple-system-tall-body&quot;
</del><ins>+        &quot;-apple-system-short-footnote&quot;, &quot;-apple-system-short-caption1&quot;, &quot;-apple-system-tall-body&quot;,
+        &quot;-apple-system-title1&quot;, &quot;-apple-system-title2&quot;, &quot;-apple-system-title3&quot;
</ins><span class="cx">     ],
</span><span class="cx">     &quot;text-overflow-mode&quot;: [
</span><span class="cx">         &quot;clip&quot;, &quot;ellipsis&quot;
</span></span></pre>
</div>
</div>

</body>
</html>