<!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 "font-synthesis"
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 <mmaxfield@apple.com>
+
+ [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 <simon.fraser@apple.com>
</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>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+/* Only test OpenType fonts for now, because our TrueType font is busted when disabling features. */
+@font-face {
+ /* Opentype. "J" responds to smcp; "K" responds to c2sc */
+ font-family: "testfontotf";
+ src: url("resources/FontWithFeatures.otf") format("opentype");
+}
+@font-face {
+ /* Truetype. "S" responds to smcp; "V" responds to c2sc */
+ font-family: "testfontttf";
+ src: url("resources/FontWithFeatures.ttf") format("truetype");
+}
+@font-face {
+ /* Opentype. "f" responds to smcp; "g" responds to c2sc */
+ font-family: "testfontlowercasesmallcapsotf";
+ src: url("resources/FontWithFeaturesLowercaseSmallCaps.otf") format("opentype");
+}
+@font-face {
+ /* Truetype. "r" responds to smcp; "u" responds to c2sc */
+ font-family: "testfontlowercasesmallcapsttf";
+ src: url("resources/FontWithFeaturesLowercaseSmallCaps.ttf") format("truetype");
+}
+.test {
+ font-size: 20px;
+ display: inline-block;
+}
+</style>
+</head>
+<body>
+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.
+<div style="font-family: testfontotf; border: solid green 1px; margin: 5px; font-feature-settings: 'ntrl';">
+<div class="test" style="">J</div>
+<div class="test" style="">a</div>
+<div class="test" style="font-variant: small-caps;">J</div>
+<div class="test" style="font-variant: small-caps;">aJ</div>
+<div class="test" style="font-variant: small-caps;">aJ</div>
+<div class="test" style="">BA</div>
+<div class="test" style="">BA</div>
+</div>
+<div style="font-family: testfontttf; border: solid green 1px; margin: 5px; font-feature-settings: 'ntrl';">
+<div class="test" style="">S</div>
+<div class="test" style="">a</div>
+<div class="test" style="font-variant: small-caps;">S</div>
+<div class="test" style="font-variant: small-caps;">aS</div>
+<div class="test" style="font-variant: small-caps;">aS</div>
+<div class="test" style="">BA</div>
+<div class="test" style="">BA</div>
+</div>
+<div style="font-family: testfontlowercasesmallcapsotf; border: solid black 1px; margin: 5px; font-feature-settings: 'ntrl';">
+<div class="test" style="">f</div>
+<div class="test" style="">a</div>
+<div class="test" style="font-variant: small-caps;">f</div>
+<div class="test" style="font-variant: small-caps;">af</div>
+<div class="test" style="font-variant: small-caps;">af</div>
+<div class="test" style="">BA</div>
+<div class="test" style="">BA</div>
+</div>
+<div style="font-family: testfontlowercasesmallcapsttf; border: solid blue 1px; margin: 5px; font-feature-settings: 'ntrl';">
+<div class="test" style="">r</div>
+<div class="test" style="">a</div>
+<div class="test" style="font-variant: small-caps;">r</div>
+<div class="test" style="font-variant: small-caps;">ar</div>
+<div class="test" style="font-variant: small-caps;">ar</div>
+<div class="test" style="">BA</div>
+<div class="test" style="">BA</div>
+</div>
+<div style="font-family: testfontotf; border: solid green 1px; margin: 5px; font-feature-settings: 'ntrl';">
+<div class="test" style="">K</div>
+<div class="test" style="">a</div>
+<div class="test" style="font-variant: small-caps;">K</div>
+<div class="test" style="font-variant: small-caps;">aK</div>
+<div class="test" style="font-variant: small-caps;">aK</div>
+<div class="test" style="">BB</div>
+<div class="test" style="">BB</div>
+</div>
+<div style="font-family: testfontttf; border: solid green 1px; margin: 5px; font-feature-settings: 'ntrl';">
+<div class="test" style="">V</div>
+<div class="test" style="">a</div>
+<div class="test" style="font-variant: small-caps;">V</div>
+<div class="test" style="font-variant: small-caps;">aV</div>
+<div class="test" style="font-variant: small-caps;">aV</div>
+<div class="test" style="">BB</div>
+<div class="test" style="">BB</div>
+</div>
+<div style="font-family: testfontlowercasesmallcapsotf; border: solid black 1px; margin: 5px; font-feature-settings: 'ntrl';">
+<div class="test" style="">g</div>
+<div class="test" style="">a</div>
+<div class="test" style="font-variant: small-caps;">g</div>
+<div class="test" style="font-variant: small-caps;">ag</div>
+<div class="test" style="font-variant: small-caps;">ag</div>
+<div class="test" style="">BB</div>
+<div class="test" style="">BB</div>
+</div>
+<div style="font-family: testfontlowercasesmallcapsttf; border: solid blue 1px; margin: 5px; font-feature-settings: 'ntrl';">
+<div class="test" style="">u</div>
+<div class="test" style="">a</div>
+<div class="test" style="font-variant: small-caps;">u</div>
+<div class="test" style="font-variant: small-caps;">au</div>
+<div class="test" style="font-variant: small-caps;">au</div>
+<div class="test" style="">BB</div>
+<div class="test" style="">BB</div>
+</div>
+</body>
+</html>
</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>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+/* Only test OpenType fonts for now, because our TrueType font is busted when disabling features. */
+@font-face {
+ /* Opentype. "J" responds to smcp; "K" responds to c2sc */
+ font-family: "testfontotf";
+ src: url("resources/FontWithFeatures.otf") format("opentype");
+}
+@font-face {
+ /* Truetype. "S" responds to smcp; "V" responds to c2sc */
+ font-family: "testfontttf";
+ src: url("resources/FontWithFeatures.ttf") format("truetype");
+}
+@font-face {
+ /* Opentype. "f" responds to smcp; "g" responds to c2sc */
+ font-family: "testfontlowercasesmallcapsotf";
+ src: url("resources/FontWithFeaturesLowercaseSmallCaps.otf") format("opentype");
+}
+@font-face {
+ /* Truetype. "r" responds to smcp; "u" responds to c2sc */
+ font-family: "testfontlowercasesmallcapsttf";
+ src: url("resources/FontWithFeaturesLowercaseSmallCaps.ttf") format("truetype");
+}
+.test {
+ font-size: 20px;
+ display: inline-block;
+}
+</style>
+</head>
+<body>
+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.
+<div style="font-family: testfontotf; border: solid green 1px; margin: 5px; font-feature-settings: 'ntrl';">
+<div class="test" style="">J</div>
+<div class="test" style="">a</div>
+<div class="test" style="font-variant: small-caps;">J</div>
+<div class="test" style="font-variant: small-caps;">aJ</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: small-caps;">aJ</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: none;">aJ</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: weight;">aJ</div>
+</div>
+<div style="font-family: testfontttf; border: solid green 1px; margin: 5px; font-feature-settings: 'ntrl';">
+<div class="test" style="">S</div>
+<div class="test" style="">a</div>
+<div class="test" style="font-variant: small-caps;">S</div>
+<div class="test" style="font-variant: small-caps;">aS</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: small-caps;">aS</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: none;">aS</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: weight;">aS</div>
+</div>
+<div style="font-family: testfontlowercasesmallcapsotf; border: solid black 1px; margin: 5px; font-feature-settings: 'ntrl';">
+<div class="test" style="">f</div>
+<div class="test" style="">a</div>
+<div class="test" style="font-variant: small-caps;">f</div>
+<div class="test" style="font-variant: small-caps;">af</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: small-caps;">af</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: none;">af</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: weight;">af</div>
+</div>
+<div style="font-family: testfontlowercasesmallcapsttf; border: solid blue 1px; margin: 5px; font-feature-settings: 'ntrl';">
+<div class="test" style="">r</div>
+<div class="test" style="">a</div>
+<div class="test" style="font-variant: small-caps;">r</div>
+<div class="test" style="font-variant: small-caps;">ar</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: small-caps;">ar</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: none;">ar</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: weight;">ar</div>
+</div>
+<div style="font-family: testfontotf; border: solid green 1px; margin: 5px; font-feature-settings: 'ntrl';">
+<div class="test" style="">K</div>
+<div class="test" style="">a</div>
+<div class="test" style="font-variant: small-caps;">K</div>
+<div class="test" style="font-variant: small-caps;">aK</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: small-caps;">aK</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: none;">aK</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: weight;">aK</div>
+</div>
+<div style="font-family: testfontttf; border: solid green 1px; margin: 5px; font-feature-settings: 'ntrl';">
+<div class="test" style="">V</div>
+<div class="test" style="">a</div>
+<div class="test" style="font-variant: small-caps;">V</div>
+<div class="test" style="font-variant: small-caps;">aV</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: small-caps;">aV</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: none;">aV</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: weight;">aV</div>
+</div>
+<div style="font-family: testfontlowercasesmallcapsotf; border: solid black 1px; margin: 5px; font-feature-settings: 'ntrl';">
+<div class="test" style="">g</div>
+<div class="test" style="">a</div>
+<div class="test" style="font-variant: small-caps;">g</div>
+<div class="test" style="font-variant: small-caps;">ag</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: small-caps;">ag</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: none;">ag</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: weight;">ag</div>
+</div>
+<div style="font-family: testfontlowercasesmallcapsttf; border: solid blue 1px; margin: 5px; font-feature-settings: 'ntrl';">
+<div class="test" style="">u</div>
+<div class="test" style="">a</div>
+<div class="test" style="font-variant: small-caps;">u</div>
+<div class="test" style="font-variant: small-caps;">au</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: small-caps;">au</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: none;">au</div>
+<div class="test" style="font-variant: small-caps; font-synthesis: weight;">au</div>
+</div>
+</body>
+</html>
</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 ""
</span><del>-PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is "style weight"
</del><ins>+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is "style weight small-caps"
</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 "initial"
</span><del>-PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is "style weight"
</del><ins>+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is "style weight small-caps"
</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 "weight"
</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 ""
</span><del>-PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is "style weight"
</del><ins>+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is "style weight small-caps"
</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 ""
</span><del>-PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is "style weight"
</del><ins>+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is "style weight small-caps"
</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 ""
</span><del>-PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is "style weight"
</del><ins>+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is "style weight small-caps"
</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 ""
</span><del>-PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is "style weight"
</del><ins>+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is "style weight small-caps"
</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 ""
</span><del>-PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is "style weight"
</del><ins>+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is "style weight small-caps"
</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("declaration.length", "0");
</span><span class="cx"> shouldBeEqualToString("declaration.getPropertyValue('font-synthesis')", "");
</span><span class="cx"> computedStyle = window.getComputedStyle(target, null);
</span><del>- shouldBeEqualToString("computedStyle.getPropertyCSSValue('font-synthesis').cssText", "style weight");
</del><ins>+ shouldBeEqualToString("computedStyle.getPropertyCSSValue('font-synthesis').cssText", "style weight small-caps");
</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("declaration.length", "1");
</span><span class="cx"> shouldBeEqualToString("declaration.getPropertyValue('font-synthesis')", "initial");
</span><span class="cx"> computedStyle = window.getComputedStyle(target, null);
</span><del>- shouldBeEqualToString("computedStyle.getPropertyCSSValue('font-synthesis').cssText", "style weight");
</del><ins>+ shouldBeEqualToString("computedStyle.getPropertyCSSValue('font-synthesis').cssText", "style weight small-caps");
</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 "weight"
+PASS window.getComputedStyle(document.getElementById('test2')).fontSynthesis is "small-caps"
+PASS window.getComputedStyle(document.getElementById('test3')).fontSynthesis is "none"
+PASS window.getComputedStyle(document.getElementById('test4')).fontSynthesis is "style weight small-caps"
+PASS window.getComputedStyle(document.getElementById('test5')).fontSynthesis is "style weight small-caps"
+PASS window.getComputedStyle(document.getElementById('test6')).fontSynthesis is "style small-caps"
+PASS window.getComputedStyle(document.getElementById('test7')).fontSynthesis is "style small-caps"
+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>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<div id="test1" style="font-synthesis: weight;"></div>
+<div id="test2" style="font-synthesis: small-caps;"></div>
+<div id="test3" style="font-synthesis: none;"></div>
+<div id="test4" style="font-synthesis: garbage;"></div>
+<div id="test5" style="font-synthesis: initial;"></div>
+<div id="test6" style="font-synthesis: style small-caps;"></div>
+<div id="test7" style="font-synthesis: small-caps style;"></div>
+<script>
+shouldBeTrue("CSS.supports('font-synthesis', 'small-caps')");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).fontSynthesis", "weight");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).fontSynthesis", "small-caps");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).fontSynthesis", "none");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).fontSynthesis", "style weight small-caps");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).fontSynthesis", "style weight small-caps");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).fontSynthesis", "style small-caps");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test7')).fontSynthesis", "style small-caps");
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</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 <mmaxfield@apple.com>
+
+ [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 "font-synthesis"
+ 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 <beidson@apple.com>
</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() & FontSynthesisWeight)
</span><span class="cx"> list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueWeight));
</span><ins>+ if (style.fontDescription().fontSynthesis() & FontSynthesisSmallCaps)
+ list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueSmallCaps));
</ins><span class="cx"> return Ref<CSSValue>(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<CSSValue> consumeFontSynthesis(CSSParserTokenRange& 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<CSSValueList> list = CSSValueList::createSpaceSeparated();
</span><span class="cx"> while (true) {
</span><del>- auto ident = consumeIdent<CSSValueWeight, CSSValueStyle>(range);
</del><ins>+ auto ident = consumeIdent<CSSValueWeight, CSSValueStyle, CSSValueSmallCaps>(range);
</ins><span class="cx"> if (!ident)
</span><span class="cx"> break;
</span><span class="cx"> if (list->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<unsigned, 2> makeFlagsKey(const FontDescription& description)
</span><span class="cx"> {
</span><span class="cx"> static_assert(USCRIPT_CODE_LIMIT < 0x1000, "Script code must fit in an unsigned along with the other flags");
</span><del>- unsigned first = static_cast<unsigned>(description.script()) << 10
- | static_cast<unsigned>(description.textRenderingMode()) << 8
</del><ins>+ unsigned first = static_cast<unsigned>(description.script()) << 11
+ | static_cast<unsigned>(description.textRenderingMode()) << 9
</ins><span class="cx"> | static_cast<unsigned>(description.fontSynthesis()) << 6
</span><span class="cx"> | static_cast<unsigned>(description.widthVariant()) << 4
</span><span class="cx"> | static_cast<unsigned>(description.nonCJKGlyphOrientation()) << 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<unsigned>(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<unsigned>(FontVariantLigatures::Normal))
</span><span class="cx"> , m_variantDiscretionaryLigatures(static_cast<unsigned>(FontVariantLigatures::Normal))
</span><span class="cx"> , m_variantHistoricalLigatures(static_cast<unsigned>(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<UChar32> capitalizedBase, FontVariantCaps fontVariantCaps, bool engageAllSmallCapsProcessing)
</del><ins>+static bool shouldSynthesize(bool dontSynthesizeSmallCaps, const Font* nextFont, UChar32 baseCharacter, std::optional<UChar32> 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 && 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<bool>(m_font.fontDescription().fontSynthesis() & 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 = &nextFont->noSynthesizableFeaturesFont();
</span><span class="cx"> smallSynthesizedFont = synthesizedFont->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 && shouldSynthesize(nextFont, baseCharacter, capitalizedBase, fontVariantCaps, engageAllSmallCapsProcessing)) {
</del><ins>+ if (!synthesizedFont && shouldSynthesize(dontSynthesizeSmallCaps, nextFont, baseCharacter, capitalizedBase, fontVariantCaps, engageAllSmallCapsProcessing)) {
</ins><span class="cx"> // Rather than synthesize each character individually, we should synthesize the entire "run" if any character requires synthesis.
</span><span class="cx"> synthesizedFont = &nextFont->noSynthesizableFeaturesFont();
</span><span class="cx"> smallSynthesizedFont = synthesizedFont->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>