<!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>[209875] 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/209875">209875</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2016-12-15 14:12:21 -0800 (Thu, 15 Dec 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Cocoa] Implement font-synthesis: small-caps
https://bugs.webkit.org/show_bug.cgi?id=165892

Reviewed by David Hyatt.

Source/WebCore:

The CSS Fonts level 4 spec adds a new value to the &quot;font-synthesis&quot;
property which controls whether or not small-caps is allowed to be
synthesized. Luckily, we already have an implementation of this
straightforward, so the implementation is quite simple.

Tests: css3/font-synthesis-small-caps.html
       fast/text/font-synthesis-parsing.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::fontSynthesisFromStyle):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertFontSynthesis):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeFontSynthesis):
* platform/graphics/FontCache.h:
(WebCore::FontDescriptionKey::makeFlagsKey):
* platform/graphics/FontDescription.cpp:
(WebCore::FontDescription::FontDescription):
* platform/graphics/FontDescription.h:
(WebCore::FontCascadeDescription::initialFontSynthesis):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::shouldSynthesize):
(WebCore::ComplexTextController::collectComplexTextRuns):

LayoutTests:

* fast/text/font-synthesis-parsing-expected.txt: Added.
* fast/text/font-synthesis-parsing.html: Added.
* css3/font-synthesis-small-caps-expected.html: Added.
* css3/font-synthesis-small-caps.html: Added.
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-font-family-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css3-text/font-synthesis-parse-expected.txt:
* fast/css3-text/font-synthesis-parse.html:
* svg/css/getComputedStyle-basic-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcssgetComputedStylecomputedstyleexpectedtxt">trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgetComputedStylecomputedstylefontfamilyexpectedtxt">trunk/LayoutTests/fast/css/getComputedStyle/computed-style-font-family-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgetComputedStylecomputedstylewithoutrendererexpectedtxt">trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcss3textfontsynthesisparseexpectedtxt">trunk/LayoutTests/fast/css3-text/font-synthesis-parse-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcss3textfontsynthesisparsehtml">trunk/LayoutTests/fast/css3-text/font-synthesis-parse.html</a></li>
<li><a href="#trunkLayoutTestssvgcssgetComputedStylebasicexpectedtxt">trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSPropertyParsercpp">trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontCacheh">trunk/Source/WebCore/platform/graphics/FontCache.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontDescriptioncpp">trunk/Source/WebCore/platform/graphics/FontDescription.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontDescriptionh">trunk/Source/WebCore/platform/graphics/FontDescription.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacComplexTextControllercpp">trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformtextTextFlagsh">trunk/Source/WebCore/platform/text/TextFlags.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscss3fontsynthesissmallcapsexpectedhtml">trunk/LayoutTests/css3/font-synthesis-small-caps-expected.html</a></li>
<li><a href="#trunkLayoutTestscss3fontsynthesissmallcapshtml">trunk/LayoutTests/css3/font-synthesis-small-caps.html</a></li>
<li><a href="#trunkLayoutTestsfasttextfontsynthesisparsingexpectedtxt">trunk/LayoutTests/fast/text/font-synthesis-parsing-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasttextfontsynthesisparsinghtml">trunk/LayoutTests/fast/text/font-synthesis-parsing.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (209874 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-12-15 22:08:38 UTC (rev 209874)
+++ trunk/LayoutTests/ChangeLog        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2016-12-15  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        [Cocoa] Implement font-synthesis: small-caps
+        https://bugs.webkit.org/show_bug.cgi?id=165892
+
+        Reviewed by David Hyatt.
+
+        * fast/text/font-synthesis-parsing-expected.txt: Added.
+        * fast/text/font-synthesis-parsing.html: Added.
+        * css3/font-synthesis-small-caps-expected.html: Added.
+        * css3/font-synthesis-small-caps.html: Added.
+        * fast/css/getComputedStyle/computed-style-expected.txt:
+        * fast/css/getComputedStyle/computed-style-font-family-expected.txt:
+        * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+        * fast/css3-text/font-synthesis-parse-expected.txt:
+        * fast/css3-text/font-synthesis-parse.html:
+        * svg/css/getComputedStyle-basic-expected.txt:
+
</ins><span class="cx"> 2016-12-15  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS WK2] Don't disable position:fixed when a form element has focus
</span></span></pre></div>
<a id="trunkLayoutTestscss3fontsynthesissmallcapsexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/font-synthesis-small-caps-expected.html (0 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/font-synthesis-small-caps-expected.html                                (rev 0)
+++ trunk/LayoutTests/css3/font-synthesis-small-caps-expected.html        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -0,0 +1,107 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+/* Only test OpenType fonts for now, because our TrueType font is busted when disabling features. */
+@font-face {
+    /* Opentype. &quot;J&quot; responds to smcp; &quot;K&quot; responds to c2sc */
+    font-family: &quot;testfontotf&quot;;
+    src: url(&quot;resources/FontWithFeatures.otf&quot;) format(&quot;opentype&quot;);
+}
+@font-face {
+    /* Truetype. &quot;S&quot; responds to smcp; &quot;V&quot; responds to c2sc */
+    font-family: &quot;testfontttf&quot;;
+    src: url(&quot;resources/FontWithFeatures.ttf&quot;) format(&quot;truetype&quot;);
+}
+@font-face {
+    /* Opentype. &quot;f&quot; responds to smcp; &quot;g&quot; responds to c2sc */
+    font-family: &quot;testfontlowercasesmallcapsotf&quot;;
+    src: url(&quot;resources/FontWithFeaturesLowercaseSmallCaps.otf&quot;) format(&quot;opentype&quot;);
+}
+@font-face {
+    /* Truetype. &quot;r&quot; responds to smcp; &quot;u&quot; responds to c2sc */
+    font-family: &quot;testfontlowercasesmallcapsttf&quot;;
+    src: url(&quot;resources/FontWithFeaturesLowercaseSmallCaps.ttf&quot;) format(&quot;truetype&quot;);
+}
+.test {
+    font-size: 20px;
+    display: inline-block;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+This test makes sure that the font-synthesis: none value gets correctly applied. The test passes when a particular pattern of Xs and checks appear below. Also note that the correct size of the character is required.
+&lt;div style=&quot;font-family: testfontotf; border: solid green 1px; margin: 5px; font-feature-settings: 'ntrl';&quot;&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;J&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;a&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;J&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;aJ&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;aJ&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;BA&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;BA&lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;font-family: testfontttf; border: solid green 1px; margin: 5px; font-feature-settings: 'ntrl';&quot;&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;S&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;a&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;S&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;aS&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;aS&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;BA&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;BA&lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;font-family: testfontlowercasesmallcapsotf; border: solid black 1px; margin: 5px; font-feature-settings: 'ntrl';&quot;&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;f&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;a&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;f&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;af&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;af&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;BA&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;BA&lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;font-family: testfontlowercasesmallcapsttf; border: solid blue 1px; margin: 5px; font-feature-settings: 'ntrl';&quot;&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;r&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;a&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;r&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;ar&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;ar&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;BA&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;BA&lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;font-family: testfontotf; border: solid green 1px; margin: 5px; font-feature-settings: 'ntrl';&quot;&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;K&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;a&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;K&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;aK&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;aK&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;BB&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;BB&lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;font-family: testfontttf; border: solid green 1px; margin: 5px; font-feature-settings: 'ntrl';&quot;&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;V&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;a&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;V&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;aV&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;aV&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;BB&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;BB&lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;font-family: testfontlowercasesmallcapsotf; border: solid black 1px; margin: 5px; font-feature-settings: 'ntrl';&quot;&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;g&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;a&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;g&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;ag&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;ag&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;BB&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;BB&lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;font-family: testfontlowercasesmallcapsttf; border: solid blue 1px; margin: 5px; font-feature-settings: 'ntrl';&quot;&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;u&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;a&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;u&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;au&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;au&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;BB&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;BB&lt;/div&gt;
+&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscss3fontsynthesissmallcapshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/font-synthesis-small-caps.html (0 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/font-synthesis-small-caps.html                                (rev 0)
+++ trunk/LayoutTests/css3/font-synthesis-small-caps.html        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -0,0 +1,107 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+/* Only test OpenType fonts for now, because our TrueType font is busted when disabling features. */
+@font-face {
+    /* Opentype. &quot;J&quot; responds to smcp; &quot;K&quot; responds to c2sc */
+    font-family: &quot;testfontotf&quot;;
+    src: url(&quot;resources/FontWithFeatures.otf&quot;) format(&quot;opentype&quot;);
+}
+@font-face {
+    /* Truetype. &quot;S&quot; responds to smcp; &quot;V&quot; responds to c2sc */
+    font-family: &quot;testfontttf&quot;;
+    src: url(&quot;resources/FontWithFeatures.ttf&quot;) format(&quot;truetype&quot;);
+}
+@font-face {
+    /* Opentype. &quot;f&quot; responds to smcp; &quot;g&quot; responds to c2sc */
+    font-family: &quot;testfontlowercasesmallcapsotf&quot;;
+    src: url(&quot;resources/FontWithFeaturesLowercaseSmallCaps.otf&quot;) format(&quot;opentype&quot;);
+}
+@font-face {
+    /* Truetype. &quot;r&quot; responds to smcp; &quot;u&quot; responds to c2sc */
+    font-family: &quot;testfontlowercasesmallcapsttf&quot;;
+    src: url(&quot;resources/FontWithFeaturesLowercaseSmallCaps.ttf&quot;) format(&quot;truetype&quot;);
+}
+.test {
+    font-size: 20px;
+    display: inline-block;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+This test makes sure that the font-synthesis: none value gets correctly applied. The test passes when a particular pattern of Xs and checks appear below. Also note that the correct size of the character is required.
+&lt;div style=&quot;font-family: testfontotf; border: solid green 1px; margin: 5px; font-feature-settings: 'ntrl';&quot;&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;J&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;a&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;J&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;aJ&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: small-caps;&quot;&gt;aJ&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: none;&quot;&gt;aJ&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: weight;&quot;&gt;aJ&lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;font-family: testfontttf; border: solid green 1px; margin: 5px; font-feature-settings: 'ntrl';&quot;&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;S&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;a&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;S&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;aS&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: small-caps;&quot;&gt;aS&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: none;&quot;&gt;aS&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: weight;&quot;&gt;aS&lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;font-family: testfontlowercasesmallcapsotf; border: solid black 1px; margin: 5px; font-feature-settings: 'ntrl';&quot;&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;f&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;a&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;f&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;af&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: small-caps;&quot;&gt;af&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: none;&quot;&gt;af&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: weight;&quot;&gt;af&lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;font-family: testfontlowercasesmallcapsttf; border: solid blue 1px; margin: 5px; font-feature-settings: 'ntrl';&quot;&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;r&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;a&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;r&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;ar&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: small-caps;&quot;&gt;ar&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: none;&quot;&gt;ar&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: weight;&quot;&gt;ar&lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;font-family: testfontotf; border: solid green 1px; margin: 5px; font-feature-settings: 'ntrl';&quot;&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;K&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;a&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;K&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;aK&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: small-caps;&quot;&gt;aK&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: none;&quot;&gt;aK&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: weight;&quot;&gt;aK&lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;font-family: testfontttf; border: solid green 1px; margin: 5px; font-feature-settings: 'ntrl';&quot;&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;V&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;a&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;V&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;aV&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: small-caps;&quot;&gt;aV&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: none;&quot;&gt;aV&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: weight;&quot;&gt;aV&lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;font-family: testfontlowercasesmallcapsotf; border: solid black 1px; margin: 5px; font-feature-settings: 'ntrl';&quot;&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;g&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;a&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;g&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;ag&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: small-caps;&quot;&gt;ag&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: none;&quot;&gt;ag&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: weight;&quot;&gt;ag&lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;font-family: testfontlowercasesmallcapsttf; border: solid blue 1px; margin: 5px; font-feature-settings: 'ntrl';&quot;&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;u&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;&quot;&gt;a&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;u&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps;&quot;&gt;au&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: small-caps;&quot;&gt;au&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: none;&quot;&gt;au&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-variant: small-caps; font-synthesis: weight;&quot;&gt;au&lt;/div&gt;
+&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssgetComputedStylecomputedstyleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt (209874 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt        2016-12-15 22:08:38 UTC (rev 209874)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> float: none;
</span><span class="cx"> font-size: 16px;
</span><span class="cx"> font-style: normal;
</span><del>-font-synthesis: style weight;
</del><ins>+font-synthesis: style weight small-caps;
</ins><span class="cx"> font-variant: normal;
</span><span class="cx"> font-weight: normal;
</span><span class="cx"> height: 576px;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgetComputedStylecomputedstylefontfamilyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-font-family-expected.txt (209874 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-font-family-expected.txt        2016-12-15 22:08:38 UTC (rev 209874)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-font-family-expected.txt        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> font-family: monospace, 'Lucida Grande', sans-serif;
</span><span class="cx"> font-size: 16px;
</span><span class="cx"> font-style: normal;
</span><del>-font-synthesis: style weight;
</del><ins>+font-synthesis: style weight small-caps;
</ins><span class="cx"> font-variant: normal;
</span><span class="cx"> font-weight: normal;
</span><span class="cx"> font-variant-ligatures: normal;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgetComputedStylecomputedstylewithoutrendererexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (209874 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt        2016-12-15 22:08:38 UTC (rev 209874)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> float: none
</span><span class="cx"> font-size: 16px
</span><span class="cx"> font-style: normal
</span><del>-font-synthesis: style weight
</del><ins>+font-synthesis: style weight small-caps
</ins><span class="cx"> font-variant: normal
</span><span class="cx"> font-weight: normal
</span><span class="cx"> height: 100px
</span></span></pre></div>
<a id="trunkLayoutTestsfastcss3textfontsynthesisparseexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css3-text/font-synthesis-parse-expected.txt (209874 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css3-text/font-synthesis-parse-expected.txt        2016-12-15 22:08:38 UTC (rev 209874)
+++ trunk/LayoutTests/fast/css3-text/font-synthesis-parse-expected.txt        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -1,11 +1,11 @@
</span><span class="cx"> PASS cssRule.type is cssRule.STYLE_RULE
</span><span class="cx"> PASS declaration.length is 0
</span><span class="cx"> PASS declaration.getPropertyValue('font-synthesis') is &quot;&quot;
</span><del>-PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight&quot;
</del><ins>+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight small-caps&quot;
</ins><span class="cx"> PASS cssRule.type is cssRule.STYLE_RULE
</span><span class="cx"> PASS declaration.length is 1
</span><span class="cx"> PASS declaration.getPropertyValue('font-synthesis') is &quot;initial&quot;
</span><del>-PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight&quot;
</del><ins>+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight small-caps&quot;
</ins><span class="cx"> PASS cssRule.type is cssRule.STYLE_RULE
</span><span class="cx"> PASS declaration.length is 1
</span><span class="cx"> PASS declaration.getPropertyValue('font-synthesis') is &quot;weight&quot;
</span><span class="lines">@@ -25,23 +25,23 @@
</span><span class="cx"> PASS cssRule.type is cssRule.STYLE_RULE
</span><span class="cx"> PASS declaration.length is 0
</span><span class="cx"> PASS declaration.getPropertyValue('font-synthesis') is &quot;&quot;
</span><del>-PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight&quot;
</del><ins>+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight small-caps&quot;
</ins><span class="cx"> PASS cssRule.type is cssRule.STYLE_RULE
</span><span class="cx"> PASS declaration.length is 0
</span><span class="cx"> PASS declaration.getPropertyValue('font-synthesis') is &quot;&quot;
</span><del>-PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight&quot;
</del><ins>+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight small-caps&quot;
</ins><span class="cx"> PASS cssRule.type is cssRule.STYLE_RULE
</span><span class="cx"> PASS declaration.length is 0
</span><span class="cx"> PASS declaration.getPropertyValue('font-synthesis') is &quot;&quot;
</span><del>-PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight&quot;
</del><ins>+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight small-caps&quot;
</ins><span class="cx"> PASS cssRule.type is cssRule.STYLE_RULE
</span><span class="cx"> PASS declaration.length is 0
</span><span class="cx"> PASS declaration.getPropertyValue('font-synthesis') is &quot;&quot;
</span><del>-PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight&quot;
</del><ins>+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight small-caps&quot;
</ins><span class="cx"> PASS cssRule.type is cssRule.STYLE_RULE
</span><span class="cx"> PASS declaration.length is 0
</span><span class="cx"> PASS declaration.getPropertyValue('font-synthesis') is &quot;&quot;
</span><del>-PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight&quot;
</del><ins>+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight small-caps&quot;
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsfastcss3textfontsynthesisparsehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css3-text/font-synthesis-parse.html (209874 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css3-text/font-synthesis-parse.html        2016-12-15 22:08:38 UTC (rev 209874)
+++ trunk/LayoutTests/fast/css3-text/font-synthesis-parse.html        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx">       shouldBe(&quot;declaration.length&quot;, &quot;0&quot;);
</span><span class="cx">       shouldBeEqualToString(&quot;declaration.getPropertyValue('font-synthesis')&quot;, &quot;&quot;);
</span><span class="cx">       computedStyle = window.getComputedStyle(target, null);
</span><del>-      shouldBeEqualToString(&quot;computedStyle.getPropertyCSSValue('font-synthesis').cssText&quot;, &quot;style weight&quot;);
</del><ins>+      shouldBeEqualToString(&quot;computedStyle.getPropertyCSSValue('font-synthesis').cssText&quot;, &quot;style weight small-caps&quot;);
</ins><span class="cx">       stylesheet.deleteRule(0);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx">       shouldBe(&quot;declaration.length&quot;, &quot;1&quot;);
</span><span class="cx">       shouldBeEqualToString(&quot;declaration.getPropertyValue('font-synthesis')&quot;, &quot;initial&quot;);
</span><span class="cx">       computedStyle = window.getComputedStyle(target, null);
</span><del>-      shouldBeEqualToString(&quot;computedStyle.getPropertyCSSValue('font-synthesis').cssText&quot;, &quot;style weight&quot;);
</del><ins>+      shouldBeEqualToString(&quot;computedStyle.getPropertyCSSValue('font-synthesis').cssText&quot;, &quot;style weight small-caps&quot;);
</ins><span class="cx">       stylesheet.deleteRule(0);
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontsynthesisparsingexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/font-synthesis-parsing-expected.txt (0 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-synthesis-parsing-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/text/font-synthesis-parsing-expected.txt        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+PASS CSS.supports('font-synthesis', 'small-caps') is true
+PASS window.getComputedStyle(document.getElementById('test1')).fontSynthesis is &quot;weight&quot;
+PASS window.getComputedStyle(document.getElementById('test2')).fontSynthesis is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('test3')).fontSynthesis is &quot;none&quot;
+PASS window.getComputedStyle(document.getElementById('test4')).fontSynthesis is &quot;style weight small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('test5')).fontSynthesis is &quot;style weight small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('test6')).fontSynthesis is &quot;style small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('test7')).fontSynthesis is &quot;style small-caps&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/text/font-synthesis-parsing-expected.txt
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Author Date Id Rev URL
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsfasttextfontsynthesisparsinghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/font-synthesis-parsing.html (0 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-synthesis-parsing.html                                (rev 0)
+++ trunk/LayoutTests/fast/text/font-synthesis-parsing.html        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;test1&quot; style=&quot;font-synthesis: weight;&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;test2&quot; style=&quot;font-synthesis: small-caps;&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;test3&quot; style=&quot;font-synthesis: none;&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;test4&quot; style=&quot;font-synthesis: garbage;&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;test5&quot; style=&quot;font-synthesis: initial;&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;test6&quot; style=&quot;font-synthesis: style small-caps;&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;test7&quot; style=&quot;font-synthesis: small-caps style;&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+shouldBeTrue(&quot;CSS.supports('font-synthesis', 'small-caps')&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test1')).fontSynthesis&quot;, &quot;weight&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test2')).fontSynthesis&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test3')).fontSynthesis&quot;, &quot;none&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test4')).fontSynthesis&quot;, &quot;style weight small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test5')).fontSynthesis&quot;, &quot;style weight small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test6')).fontSynthesis&quot;, &quot;style small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test7')).fontSynthesis&quot;, &quot;style small-caps&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcssgetComputedStylebasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt (209874 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt        2016-12-15 22:08:38 UTC (rev 209874)
+++ trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx"> rect: style.getPropertyCSSValue(font-size) : [object CSSPrimitiveValue]
</span><span class="cx"> rect: style.getPropertyValue(font-style) : normal
</span><span class="cx"> rect: style.getPropertyCSSValue(font-style) : [object CSSPrimitiveValue]
</span><del>-rect: style.getPropertyValue(font-synthesis) : style weight
</del><ins>+rect: style.getPropertyValue(font-synthesis) : style weight small-caps
</ins><span class="cx"> rect: style.getPropertyCSSValue(font-synthesis) : [object CSSValueList]
</span><span class="cx"> rect: style.getPropertyValue(font-variant) : normal
</span><span class="cx"> rect: style.getPropertyCSSValue(font-variant) : [object CSSPrimitiveValue]
</span><span class="lines">@@ -596,7 +596,7 @@
</span><span class="cx"> g: style.getPropertyCSSValue(font-size) : [object CSSPrimitiveValue]
</span><span class="cx"> g: style.getPropertyValue(font-style) : normal
</span><span class="cx"> g: style.getPropertyCSSValue(font-style) : [object CSSPrimitiveValue]
</span><del>-g: style.getPropertyValue(font-synthesis) : style weight
</del><ins>+g: style.getPropertyValue(font-synthesis) : style weight small-caps
</ins><span class="cx"> g: style.getPropertyCSSValue(font-synthesis) : [object CSSValueList]
</span><span class="cx"> g: style.getPropertyValue(font-variant) : normal
</span><span class="cx"> g: style.getPropertyCSSValue(font-variant) : [object CSSPrimitiveValue]
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (209874 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-12-15 22:08:38 UTC (rev 209874)
+++ trunk/Source/WebCore/ChangeLog        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2016-12-15  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        [Cocoa] Implement font-synthesis: small-caps
+        https://bugs.webkit.org/show_bug.cgi?id=165892
+
+        Reviewed by David Hyatt.
+
+        The CSS Fonts level 4 spec adds a new value to the &quot;font-synthesis&quot;
+        property which controls whether or not small-caps is allowed to be
+        synthesized. Luckily, we already have an implementation of this
+        straightforward, so the implementation is quite simple.
+
+        Tests: css3/font-synthesis-small-caps.html
+               fast/text/font-synthesis-parsing.html
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::fontSynthesisFromStyle):
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::convertFontSynthesis):
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::consumeFontSynthesis):
+        * platform/graphics/FontCache.h:
+        (WebCore::FontDescriptionKey::makeFlagsKey):
+        * platform/graphics/FontDescription.cpp:
+        (WebCore::FontDescription::FontDescription):
+        * platform/graphics/FontDescription.h:
+        (WebCore::FontCascadeDescription::initialFontSynthesis):
+        * platform/graphics/mac/ComplexTextController.cpp:
+        (WebCore::shouldSynthesize):
+        (WebCore::ComplexTextController::collectComplexTextRuns):
+
</ins><span class="cx"> 2016-12-15  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add a new Logging Channel for IndexedDB Operation scheduling.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (209874 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-12-15 22:08:38 UTC (rev 209874)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -2144,6 +2144,8 @@
</span><span class="cx">         list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueStyle));
</span><span class="cx">     if (style.fontDescription().fontSynthesis() &amp; FontSynthesisWeight)
</span><span class="cx">         list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueWeight));
</span><ins>+    if (style.fontDescription().fontSynthesis() &amp; FontSynthesisSmallCaps)
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueSmallCaps));
</ins><span class="cx">     return Ref&lt;CSSValue&gt;(list.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (209874 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2016-12-15 22:08:38 UTC (rev 209874)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -1441,6 +1441,9 @@
</span><span class="cx">         case CSSValueStyle:
</span><span class="cx">             result |= FontSynthesisStyle;
</span><span class="cx">             break;
</span><ins>+        case CSSValueSmallCaps:
+            result |= FontSynthesisSmallCaps;
+            break;
</ins><span class="cx">         default:
</span><span class="cx">             ASSERT_NOT_REACHED();
</span><span class="cx">             break;
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (209874 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2016-12-15 22:08:38 UTC (rev 209874)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -948,7 +948,7 @@
</span><span class="cx"> 
</span><span class="cx"> static RefPtr&lt;CSSValue&gt; consumeFontSynthesis(CSSParserTokenRange&amp; range)
</span><span class="cx"> {
</span><del>-    // none | [ weight || style ]
</del><ins>+    // none | [ weight || style || small-caps ]
</ins><span class="cx">     CSSValueID id = range.peek().id();
</span><span class="cx">     if (id == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -955,7 +955,7 @@
</span><span class="cx">     
</span><span class="cx">     RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
</span><span class="cx">     while (true) {
</span><del>-        auto ident = consumeIdent&lt;CSSValueWeight, CSSValueStyle&gt;(range);
</del><ins>+        auto ident = consumeIdent&lt;CSSValueWeight, CSSValueStyle, CSSValueSmallCaps&gt;(range);
</ins><span class="cx">         if (!ident)
</span><span class="cx">             break;
</span><span class="cx">         if (list-&gt;hasValue(ident.get()))
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontCache.h (209874 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCache.h        2016-12-15 22:08:38 UTC (rev 209874)
+++ trunk/Source/WebCore/platform/graphics/FontCache.h        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -121,8 +121,8 @@
</span><span class="cx">     static std::array&lt;unsigned, 2&gt; makeFlagsKey(const FontDescription&amp; description)
</span><span class="cx">     {
</span><span class="cx">         static_assert(USCRIPT_CODE_LIMIT &lt; 0x1000, &quot;Script code must fit in an unsigned along with the other flags&quot;);
</span><del>-        unsigned first = static_cast&lt;unsigned&gt;(description.script()) &lt;&lt; 10
-            | static_cast&lt;unsigned&gt;(description.textRenderingMode()) &lt;&lt; 8
</del><ins>+        unsigned first = static_cast&lt;unsigned&gt;(description.script()) &lt;&lt; 11
+            | static_cast&lt;unsigned&gt;(description.textRenderingMode()) &lt;&lt; 9
</ins><span class="cx">             | static_cast&lt;unsigned&gt;(description.fontSynthesis()) &lt;&lt; 6
</span><span class="cx">             | static_cast&lt;unsigned&gt;(description.widthVariant()) &lt;&lt; 4
</span><span class="cx">             | static_cast&lt;unsigned&gt;(description.nonCJKGlyphOrientation()) &lt;&lt; 3
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontDescriptioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontDescription.cpp (209874 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontDescription.cpp        2016-12-15 22:08:38 UTC (rev 209874)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.cpp        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">     , m_renderingMode(static_cast&lt;unsigned&gt;(FontRenderingMode::Normal))
</span><span class="cx">     , m_textRendering(AutoTextRendering)
</span><span class="cx">     , m_script(USCRIPT_COMMON)
</span><del>-    , m_fontSynthesis(FontSynthesisWeight | FontSynthesisStyle)
</del><ins>+    , m_fontSynthesis(FontSynthesisWeight | FontSynthesisStyle | FontSynthesisSmallCaps)
</ins><span class="cx">     , m_variantCommonLigatures(static_cast&lt;unsigned&gt;(FontVariantLigatures::Normal))
</span><span class="cx">     , m_variantDiscretionaryLigatures(static_cast&lt;unsigned&gt;(FontVariantLigatures::Normal))
</span><span class="cx">     , m_variantHistoricalLigatures(static_cast&lt;unsigned&gt;(FontVariantLigatures::Normal))
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontDescriptionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontDescription.h (209874 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontDescription.h        2016-12-15 22:08:38 UTC (rev 209874)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.h        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx">     unsigned m_renderingMode : 1; // Used to switch between CG and GDI text on Windows.
</span><span class="cx">     unsigned m_textRendering : 2; // TextRenderingMode
</span><span class="cx">     unsigned m_script : 7; // Used to help choose an appropriate font for generic font families.
</span><del>-    unsigned m_fontSynthesis : 2; // FontSynthesis type
</del><ins>+    unsigned m_fontSynthesis : 3; // FontSynthesis type
</ins><span class="cx">     unsigned m_variantCommonLigatures : 2; // FontVariantLigatures
</span><span class="cx">     unsigned m_variantDiscretionaryLigatures : 2; // FontVariantLigatures
</span><span class="cx">     unsigned m_variantHistoricalLigatures : 2; // FontVariantLigatures
</span><span class="lines">@@ -265,7 +265,7 @@
</span><span class="cx">     static Kerning initialKerning() { return Kerning::Auto; }
</span><span class="cx">     static FontSmoothingMode initialFontSmoothing() { return AutoSmoothing; }
</span><span class="cx">     static TextRenderingMode initialTextRenderingMode() { return AutoTextRendering; }
</span><del>-    static FontSynthesis initialFontSynthesis() { return FontSynthesisWeight | FontSynthesisStyle; }
</del><ins>+    static FontSynthesis initialFontSynthesis() { return FontSynthesisWeight | FontSynthesisStyle | FontSynthesisSmallCaps; }
</ins><span class="cx">     static FontVariantPosition initialVariantPosition() { return FontVariantPosition::Normal; }
</span><span class="cx">     static FontVariantCaps initialVariantCaps() { return FontVariantCaps::Normal; }
</span><span class="cx">     static FontVariantAlternates initialVariantAlternates() { return FontVariantAlternates::Normal; }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacComplexTextControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp (209874 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp        2016-12-15 22:08:38 UTC (rev 209874)
+++ trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -288,8 +288,10 @@
</span><span class="cx">     return std::nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool shouldSynthesize(const Font* nextFont, UChar32 baseCharacter, std::optional&lt;UChar32&gt; capitalizedBase, FontVariantCaps fontVariantCaps, bool engageAllSmallCapsProcessing)
</del><ins>+static bool shouldSynthesize(bool dontSynthesizeSmallCaps, const Font* nextFont, UChar32 baseCharacter, std::optional&lt;UChar32&gt; capitalizedBase, FontVariantCaps fontVariantCaps, bool engageAllSmallCapsProcessing)
</ins><span class="cx"> {
</span><ins>+    if (dontSynthesizeSmallCaps)
+        return false;
</ins><span class="cx">     if (!nextFont || nextFont == Font::systemFallback())
</span><span class="cx">         return false;
</span><span class="cx">     if (engageAllSmallCapsProcessing &amp;&amp; isASCIISpace(baseCharacter))
</span><span class="lines">@@ -315,6 +317,7 @@
</span><span class="cx">         cp = m_run.characters16();
</span><span class="cx"> 
</span><span class="cx">     auto fontVariantCaps = m_font.fontDescription().variantCaps();
</span><ins>+    bool dontSynthesizeSmallCaps = !static_cast&lt;bool&gt;(m_font.fontDescription().fontSynthesis() &amp; FontSynthesisSmallCaps);
</ins><span class="cx">     bool engageAllSmallCapsProcessing = fontVariantCaps == FontVariantCaps::AllSmall || fontVariantCaps == FontVariantCaps::AllPetite;
</span><span class="cx">     bool engageSmallCapsProcessing = engageAllSmallCapsProcessing || fontVariantCaps == FontVariantCaps::Small || fontVariantCaps == FontVariantCaps::Petite;
</span><span class="cx"> 
</span><span class="lines">@@ -341,7 +344,7 @@
</span><span class="cx">     bool nextIsSmallCaps = false;
</span><span class="cx"> 
</span><span class="cx">     auto capitalizedBase = capitalized(baseCharacter);
</span><del>-    if (shouldSynthesize(nextFont, baseCharacter, capitalizedBase, fontVariantCaps, engageAllSmallCapsProcessing)) {
</del><ins>+    if (shouldSynthesize(dontSynthesizeSmallCaps, nextFont, baseCharacter, capitalizedBase, fontVariantCaps, engageAllSmallCapsProcessing)) {
</ins><span class="cx">         synthesizedFont = &amp;nextFont-&gt;noSynthesizableFeaturesFont();
</span><span class="cx">         smallSynthesizedFont = synthesizedFont-&gt;smallCapsFont(m_font.fontDescription());
</span><span class="cx">         UChar32 characterToWrite = capitalizedBase ? capitalizedBase.value() : cp[0];
</span><span class="lines">@@ -382,7 +385,7 @@
</span><span class="cx">             nextFont = m_font.fontForCombiningCharacterSequence(cp + index, curr - cp - index);
</span><span class="cx"> 
</span><span class="cx">         capitalizedBase = capitalized(baseCharacter);
</span><del>-        if (!synthesizedFont &amp;&amp; shouldSynthesize(nextFont, baseCharacter, capitalizedBase, fontVariantCaps, engageAllSmallCapsProcessing)) {
</del><ins>+        if (!synthesizedFont &amp;&amp; shouldSynthesize(dontSynthesizeSmallCaps, nextFont, baseCharacter, capitalizedBase, fontVariantCaps, engageAllSmallCapsProcessing)) {
</ins><span class="cx">             // Rather than synthesize each character individually, we should synthesize the entire &quot;run&quot; if any character requires synthesis.
</span><span class="cx">             synthesizedFont = &amp;nextFont-&gt;noSynthesizableFeaturesFont();
</span><span class="cx">             smallSynthesizedFont = synthesizedFont-&gt;smallCapsFont(m_font.fontDescription());
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformtextTextFlagsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/TextFlags.h (209874 => 209875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/TextFlags.h        2016-12-15 22:08:38 UTC (rev 209874)
+++ trunk/Source/WebCore/platform/text/TextFlags.h        2016-12-15 22:12:21 UTC (rev 209875)
</span><span class="lines">@@ -60,10 +60,11 @@
</span><span class="cx"> enum FontSynthesisValues {
</span><span class="cx">     FontSynthesisNone = 0x0,
</span><span class="cx">     FontSynthesisWeight = 0x1,
</span><del>-    FontSynthesisStyle = 0x2
</del><ins>+    FontSynthesisStyle = 0x2,
+    FontSynthesisSmallCaps = 0x4
</ins><span class="cx"> };
</span><span class="cx"> typedef unsigned FontSynthesis;
</span><del>-const unsigned FontSynthesisWidth = 2;
</del><ins>+const unsigned FontSynthesisWidth = 3;
</ins><span class="cx"> 
</span><span class="cx"> enum class FontVariantLigatures {
</span><span class="cx">     Normal,
</span></span></pre>
</div>
</div>

</body>
</html>