<!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>[183304] 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/183304">183304</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2015-04-24 20:29:23 -0700 (Fri, 24 Apr 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Implement parsing support for font-synthesis CSS property
https://bugs.webkit.org/show_bug.cgi?id=144180
Source/WebCore:

&lt;rdar://problem/20692791&gt;
&lt;rdar://problem/20625024&gt;

Reviewed by Tim Horton.

See http://www.w3.org/TR/css-fonts-3/#font-synthesis-prop

This property allows web authors to opt out of font synthesis. This patch only
implements parsing support for the property.

Test: fast/css3-text/font-synthesis-parse.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::fontSynthesisFromStyle): Create a CSSValue for the existing style object.
(WebCore::ComputedStyleExtractor::propertyValue): Call fontSynthesisFromStyle().
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Call parseFontSynthesis().
(WebCore::CSSParser::parseFontSynthesis): Accept the grammar
&quot;none | [ weight || style ]&quot;
* css/CSSParser.h: Function signature.
* css/CSSPropertyNames.in: New CSS property name.
* css/CSSValueKeywords.in: New CSS value names.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueFontSynthesis): Construct an internal
representation of font-synthesis for a given CSSValue.
* rendering/style/RenderStyle.h: Function signature.
* rendering/style/RenderStyleConstants.h: Internal representation of
font-synthesis.
* rendering/style/StyleRareInheritedData.h: Where we actually store the bits
related to this internal representation.

LayoutTests:

Reviewed by Tim Horton.

* fast/css3-text/font-synthesis-parse-expected.txt: Added.
* fast/css3-text/font-synthesis-parse.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</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="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserh">trunk/Source/WebCore/css/CSSParser.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPropertyNamesin">trunk/Source/WebCore/css/CSSPropertyNames.in</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueKeywordsin">trunk/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderCustomh">trunk/Source/WebCore/css/StyleBuilderCustom.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleConstantsh">trunk/Source/WebCore/rendering/style/RenderStyleConstants.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareInheritedDatah">trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<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>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (183303 => 183304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-04-25 01:31:05 UTC (rev 183303)
+++ trunk/LayoutTests/ChangeLog        2015-04-25 03:29:23 UTC (rev 183304)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2015-04-24  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Implement parsing support for font-synthesis CSS property
+        https://bugs.webkit.org/show_bug.cgi?id=144180
+
+        Reviewed by Tim Horton.
+
+        * fast/css3-text/font-synthesis-parse-expected.txt: Added.
+        * fast/css3-text/font-synthesis-parse.html: Added.
+
</ins><span class="cx"> 2015-04-24  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Track a coverage rect through GraphicsLayerCA flushes, use it to mark backing store attached
</span></span></pre></div>
<a id="trunkLayoutTestsfastcss3textfontsynthesisparseexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css3-text/font-synthesis-parse-expected.txt (0 => 183304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css3-text/font-synthesis-parse-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/css3-text/font-synthesis-parse-expected.txt        2015-04-25 03:29:23 UTC (rev 183304)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+PASS cssRule.type is cssRule.STYLE_RULE
+PASS declaration.length is 0
+PASS declaration.getPropertyValue('font-synthesis') is null
+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;none&quot;
+PASS cssRule.type is cssRule.STYLE_RULE
+PASS declaration.length is 1
+PASS declaration.getPropertyValue('font-synthesis') is &quot;initial&quot;
+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;none&quot;
+PASS cssRule.type is cssRule.STYLE_RULE
+PASS declaration.length is 1
+PASS declaration.getPropertyValue('font-synthesis') is &quot;weight&quot;
+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;weight&quot;
+PASS cssRule.type is cssRule.STYLE_RULE
+PASS declaration.length is 1
+PASS declaration.getPropertyValue('font-synthesis') is &quot;style&quot;
+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style&quot;
+PASS cssRule.type is cssRule.STYLE_RULE
+PASS declaration.length is 1
+PASS declaration.getPropertyValue('font-synthesis') is &quot;style&quot;
+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style&quot;
+PASS cssRule.type is cssRule.STYLE_RULE
+PASS declaration.length is 1
+PASS declaration.getPropertyValue('font-synthesis') is &quot;weight style&quot;
+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight&quot;
+PASS cssRule.type is cssRule.STYLE_RULE
+PASS declaration.length is 1
+PASS declaration.getPropertyValue('font-synthesis') is &quot;weight style&quot;
+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight&quot;
+PASS cssRule.type is cssRule.STYLE_RULE
+PASS declaration.length is 1
+PASS declaration.getPropertyValue('font-synthesis') is &quot;weight style&quot;
+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;style weight&quot;
+PASS cssRule.type is cssRule.STYLE_RULE
+PASS declaration.length is 0
+PASS declaration.getPropertyValue('font-synthesis') is null
+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;none&quot;
+PASS cssRule.type is cssRule.STYLE_RULE
+PASS declaration.length is 0
+PASS declaration.getPropertyValue('font-synthesis') is null
+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;none&quot;
+PASS cssRule.type is cssRule.STYLE_RULE
+PASS declaration.length is 0
+PASS declaration.getPropertyValue('font-synthesis') is null
+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;none&quot;
+PASS cssRule.type is cssRule.STYLE_RULE
+PASS declaration.length is 0
+PASS declaration.getPropertyValue('font-synthesis') is null
+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;none&quot;
+PASS cssRule.type is cssRule.STYLE_RULE
+PASS declaration.length is 0
+PASS declaration.getPropertyValue('font-synthesis') is null
+PASS computedStyle.getPropertyCSSValue('font-synthesis').cssText is &quot;none&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcss3textfontsynthesisparsehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css3-text/font-synthesis-parse.html (0 => 183304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css3-text/font-synthesis-parse.html                                (rev 0)
+++ trunk/LayoutTests/fast/css3-text/font-synthesis-parse.html        2015-04-25 03:29:23 UTC (rev 183304)
</span><span class="lines">@@ -0,0 +1,123 @@
</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;p&quot;&gt;&lt;/div&gt;
+  &lt;div id=&quot;q&quot;&gt;&lt;div id=&quot;r&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+  &lt;script type=&quot;text/javascript&quot;&gt;
+    function testEmptyIsNone(stylesheet, target) {
+      cssRule = stylesheet.cssRules.item(0);
+      shouldBe(&quot;cssRule.type&quot;, &quot;cssRule.STYLE_RULE&quot;);
+      declaration = cssRule.style;
+      shouldBe(&quot;declaration.length&quot;, &quot;0&quot;);
+      shouldBe(&quot;declaration.getPropertyValue('font-synthesis')&quot;, &quot;null&quot;);
+      computedStyle = window.getComputedStyle(target, null);
+      shouldBeEqualToString(&quot;computedStyle.getPropertyCSSValue('font-synthesis').cssText&quot;, &quot;none&quot;);
+      stylesheet.deleteRule(0);
+    }
+
+    function testInitialIsNone(stylesheet, target) {
+      cssRule = stylesheet.cssRules.item(0);
+      shouldBe(&quot;cssRule.type&quot;, &quot;cssRule.STYLE_RULE&quot;);
+      declaration = cssRule.style;
+      shouldBe(&quot;declaration.length&quot;, &quot;1&quot;);
+      shouldBeEqualToString(&quot;declaration.getPropertyValue('font-synthesis')&quot;, &quot;initial&quot;);
+      computedStyle = window.getComputedStyle(target, null);
+      shouldBeEqualToString(&quot;computedStyle.getPropertyCSSValue('font-synthesis').cssText&quot;, &quot;none&quot;);
+      stylesheet.deleteRule(0);
+    }
+
+    function testWeight(stylesheet, target) {
+      cssRule = stylesheet.cssRules.item(0);
+      shouldBe(&quot;cssRule.type&quot;, &quot;cssRule.STYLE_RULE&quot;);
+      declaration = cssRule.style;
+      shouldBe(&quot;declaration.length&quot;, &quot;1&quot;);
+      shouldBeEqualToString(&quot;declaration.getPropertyValue('font-synthesis')&quot;, &quot;weight&quot;);
+      computedStyle = window.getComputedStyle(target, null);
+      shouldBeEqualToString(&quot;computedStyle.getPropertyCSSValue('font-synthesis').cssText&quot;, &quot;weight&quot;);
+      stylesheet.deleteRule(0);
+    }
+
+    function testStyle(stylesheet, target) {
+      cssRule = stylesheet.cssRules.item(0);
+      shouldBe(&quot;cssRule.type&quot;, &quot;cssRule.STYLE_RULE&quot;);
+      declaration = cssRule.style;
+      shouldBe(&quot;declaration.length&quot;, &quot;1&quot;);
+      shouldBeEqualToString(&quot;declaration.getPropertyValue('font-synthesis')&quot;, &quot;style&quot;);
+      computedStyle = window.getComputedStyle(target, null);
+      shouldBeEqualToString(&quot;computedStyle.getPropertyCSSValue('font-synthesis').cssText&quot;, &quot;style&quot;);
+      stylesheet.deleteRule(0);
+    }
+
+    function testWeightAndStyle(stylesheet, target) {
+      cssRule = stylesheet.cssRules.item(0);
+      shouldBe(&quot;cssRule.type&quot;, &quot;cssRule.STYLE_RULE&quot;);
+      declaration = cssRule.style;
+      shouldBe(&quot;declaration.length&quot;, &quot;1&quot;);
+      shouldBeEqualToString(&quot;declaration.getPropertyValue('font-synthesis')&quot;, &quot;weight style&quot;);
+      computedStyle = window.getComputedStyle(target, null);
+      shouldBeEqualToString(&quot;computedStyle.getPropertyCSSValue('font-synthesis').cssText&quot;, &quot;style weight&quot;);
+      stylesheet.deleteRule(0);
+    }
+
+    function testStyleAndWeight(stylesheet, target) {
+      cssRule = stylesheet.cssRules.item(0);
+      shouldBe(&quot;cssRule.type&quot;, &quot;cssRule.STYLE_RULE&quot;);
+      declaration = cssRule.style;
+      shouldBe(&quot;declaration.length&quot;, &quot;1&quot;);
+      shouldBeEqualToString(&quot;declaration.getPropertyValue('font-synthesis')&quot;, &quot;weight style&quot;);
+      computedStyle = window.getComputedStyle(target, null);
+      shouldBeEqualToString(&quot;computedStyle.getPropertyCSSValue('font-synthesis').cssText&quot;, &quot;style weight&quot;);
+      stylesheet.deleteRule(0);
+    }
+
+    var styleElement = document.createElement(&quot;style&quot;);
+    document.head.appendChild(styleElement);
+    stylesheet = styleElement.sheet;
+    var target = document.getElementById(&quot;p&quot;);
+
+    stylesheet.insertRule(&quot;#p { }&quot;, 0);
+    testEmptyIsNone(stylesheet, target);
+
+    stylesheet.insertRule(&quot;#p { font-synthesis: initial; }&quot;, 0);
+    testInitialIsNone(stylesheet, target);
+
+    stylesheet.insertRule(&quot;#p { font-synthesis: weight }&quot;, 0);
+    testWeight(stylesheet, target);
+
+    stylesheet.insertRule(&quot;#p { font-synthesis: style style }&quot;, 0);
+    testStyle(stylesheet, target);
+
+    stylesheet.insertRule(&quot;#p { font-synthesis: style }&quot;, 0);
+    testStyle(stylesheet, target);
+
+    stylesheet.insertRule(&quot;#p { font-synthesis: weight style }&quot;, 0);
+    testWeightAndStyle(stylesheet, target);
+
+    stylesheet.insertRule(&quot;#p { font-synthesis: style weight weight}&quot;, 0);
+    testStyleAndWeight(stylesheet, target);
+
+    stylesheet.insertRule(&quot;#p { font-synthesis: style weight }&quot;, 0);
+    testStyleAndWeight(stylesheet, target);
+
+    stylesheet.insertRule(&quot;#p { font-synthesis: garbage style }&quot;, 0);
+    testEmptyIsNone(stylesheet, target);
+
+    stylesheet.insertRule(&quot;#p { font-synthesis: style garbage }&quot;, 0);
+    testEmptyIsNone(stylesheet, target);
+
+    stylesheet.insertRule(&quot;#p { font-synthesis: garbage style garbage }&quot;, 0);
+    testEmptyIsNone(stylesheet, target);
+
+    stylesheet.insertRule(&quot;#p { font-synthesis: style garbage style }&quot;, 0);
+    testEmptyIsNone(stylesheet, target);
+
+    stylesheet.insertRule(&quot;#p { font-synthesis: weight garbage }&quot;, 0);
+    testEmptyIsNone(stylesheet, target);
+
+  &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="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (183303 => 183304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-04-25 01:31:05 UTC (rev 183303)
+++ trunk/Source/WebCore/ChangeLog        2015-04-25 03:29:23 UTC (rev 183304)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2015-04-24  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Implement parsing support for font-synthesis CSS property
+        https://bugs.webkit.org/show_bug.cgi?id=144180
+        &lt;rdar://problem/20692791&gt;
+        &lt;rdar://problem/20625024&gt;
+
+        Reviewed by Tim Horton.
+
+        See http://www.w3.org/TR/css-fonts-3/#font-synthesis-prop
+
+        This property allows web authors to opt out of font synthesis. This patch only
+        implements parsing support for the property.
+
+        Test: fast/css3-text/font-synthesis-parse.html
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::fontSynthesisFromStyle): Create a CSSValue for the existing style object.
+        (WebCore::ComputedStyleExtractor::propertyValue): Call fontSynthesisFromStyle().
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue): Call parseFontSynthesis().
+        (WebCore::CSSParser::parseFontSynthesis): Accept the grammar
+        &quot;none | [ weight || style ]&quot;
+        * css/CSSParser.h: Function signature.
+        * css/CSSPropertyNames.in: New CSS property name.
+        * css/CSSValueKeywords.in: New CSS value names.
+        * css/StyleBuilderCustom.h:
+        (WebCore::StyleBuilderCustom::applyValueFontSynthesis): Construct an internal
+        representation of font-synthesis for a given CSSValue.
+        * rendering/style/RenderStyle.h: Function signature.
+        * rendering/style/RenderStyleConstants.h: Internal representation of
+        font-synthesis.
+        * rendering/style/StyleRareInheritedData.h: Where we actually store the bits
+        related to this internal representation.
+
</ins><span class="cx"> 2015-04-24  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Have the web inspector report accurate memory use for layers with detached backing store
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (183303 => 183304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-04-25 01:31:05 UTC (rev 183303)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-04-25 03:29:23 UTC (rev 183304)
</span><span class="lines">@@ -1611,6 +1611,19 @@
</span><span class="cx">     return cssValuePool().createIdentifierValue(CSSValueNormal);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static Ref&lt;CSSValue&gt; fontSynthesisFromStyle(RenderStyle&amp; style)
+{
+    if (style.fontSynthesis() == FontSynthesisNone)
+        return cssValuePool().createIdentifierValue(CSSValueNone);
+
+    auto list = CSSValueList::createSpaceSeparated();
+    if (style.fontSynthesis() &amp; FontSynthesisStyle)
+        list.get().append(cssValuePool().createIdentifierValue(CSSValueStyle));
+    if (style.fontSynthesis() &amp; FontSynthesisWeight)
+        list.get().append(cssValuePool().createIdentifierValue(CSSValueWeight));
+    return Ref&lt;CSSValue&gt;(list.get());
+}
+
</ins><span class="cx"> typedef const Length&amp; (RenderStyle::*RenderStyleLengthGetter)() const;
</span><span class="cx"> typedef LayoutUnit (RenderBoxModelObject::*RenderBoxComputedCSSValueGetter)() const;
</span><span class="cx"> 
</span><span class="lines">@@ -2234,6 +2247,8 @@
</span><span class="cx">             return fontVariantFromStyle(style.get());
</span><span class="cx">         case CSSPropertyFontWeight:
</span><span class="cx">             return fontWeightFromStyle(style.get());
</span><ins>+        case CSSPropertyFontSynthesis:
+            return fontSynthesisFromStyle(*style.get());
</ins><span class="cx">         case CSSPropertyWebkitFontFeatureSettings: {
</span><span class="cx">             const FontFeatureSettings* featureSettings = style-&gt;fontDescription().featureSettings();
</span><span class="cx">             if (!featureSettings || !featureSettings-&gt;size())
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (183303 => 183304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2015-04-25 01:31:05 UTC (rev 183303)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2015-04-25 03:29:23 UTC (rev 183304)
</span><span class="lines">@@ -1982,6 +1982,10 @@
</span><span class="cx">             return false;
</span><span class="cx">         return parseFontWeight(important);
</span><span class="cx">     }
</span><ins>+
+    case CSSPropertyFontSynthesis: // none | [ weight || style ]
+        return parseFontSynthesis(important);
+
</ins><span class="cx">     case CSSPropertyBorderSpacing: {
</span><span class="cx">         if (num == 1) {
</span><span class="cx">             ShorthandScope scope(this, CSSPropertyBorderSpacing);
</span><span class="lines">@@ -6769,6 +6773,41 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool CSSParser::parseFontSynthesis(bool important)
+{
+    // none | [ weight || style ]
+    CSSParserValue* value = m_valueList-&gt;current();
+    if (value &amp;&amp; value-&gt;id == CSSValueNone) {
+        addProperty(CSSPropertyFontSynthesis, cssValuePool().createIdentifierValue(CSSValueNone), important);
+        m_valueList-&gt;next();
+        return true;
+    }
+
+    bool encounteredWeight = false;
+    bool encounteredStyle = false;
+    while (value) {
+        switch (value-&gt;id) {
+        case CSSValueWeight:
+            encounteredWeight = true;
+            break;
+        case CSSValueStyle:
+            encounteredStyle = true;
+            break;
+        default:
+            return false;
+        }
+        value = m_valueList-&gt;next();
+    }
+
+    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
+    if (encounteredWeight)
+        list-&gt;append(cssValuePool().createIdentifierValue(CSSValueWeight));
+    if (encounteredStyle)
+        list-&gt;append(cssValuePool().createIdentifierValue(CSSValueStyle));
+    addProperty(CSSPropertyFontSynthesis, list.release(), important);
+    return true;
+}
+
</ins><span class="cx"> bool CSSParser::parseFontFaceSrcURI(CSSValueList&amp; valueList)
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;CSSFontFaceSrcValue&gt; uriValue(CSSFontFaceSrcValue::create(completeURL(m_valueList-&gt;current()-&gt;string)));
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (183303 => 183304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2015-04-25 01:31:05 UTC (rev 183303)
+++ trunk/Source/WebCore/css/CSSParser.h        2015-04-25 03:29:23 UTC (rev 183304)
</span><span class="lines">@@ -263,6 +263,7 @@
</span><span class="cx">     bool parseFontSize(bool important);
</span><span class="cx">     bool parseFontVariant(bool important);
</span><span class="cx">     bool parseFontWeight(bool important);
</span><ins>+    bool parseFontSynthesis(bool important);
</ins><span class="cx">     bool parseFontFaceSrc();
</span><span class="cx">     bool parseFontFaceUnicodeRange();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (183303 => 183304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2015-04-25 01:31:05 UTC (rev 183303)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2015-04-25 03:29:23 UTC (rev 183304)
</span><span class="lines">@@ -223,6 +223,7 @@
</span><span class="cx"> flood-opacity [SVG, Converter=Opacity]
</span><span class="cx"> font [Inherited, Longhands=font-family|font-size|font-style|font-variant|font-weight|line-height]
</span><span class="cx"> font-stretch [SkipBuilder]
</span><ins>+font-synthesis [Inherited, Custom=Value]
</ins><span class="cx"> glyph-orientation-horizontal [Inherited, SVG, Converter=GlyphOrientation]
</span><span class="cx"> glyph-orientation-vertical [Inherited, SVG, Converter=GlyphOrientationOrAuto]
</span><span class="cx"> height [Initial=initialSize, Converter=LengthSizing]
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (183303 => 183304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueKeywords.in        2015-04-25 01:31:05 UTC (rev 183303)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in        2015-04-25 03:29:23 UTC (rev 183304)
</span><span class="lines">@@ -1111,3 +1111,7 @@
</span><span class="cx"> // -apple-trailing-word
</span><span class="cx"> -webkit-partially-balanced
</span><span class="cx"> #endif
</span><ins>+
+// font-synthesis
+weight
+style
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderCustomh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderCustom.h (183303 => 183304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderCustom.h        2015-04-25 01:31:05 UTC (rev 183303)
+++ trunk/Source/WebCore/css/StyleBuilderCustom.h        2015-04-25 03:29:23 UTC (rev 183304)
</span><span class="lines">@@ -76,6 +76,7 @@
</span><span class="cx">     DECLARE_PROPERTY_CUSTOM_HANDLERS(FontFamily);
</span><span class="cx">     DECLARE_PROPERTY_CUSTOM_HANDLERS(FontSize);
</span><span class="cx">     DECLARE_PROPERTY_CUSTOM_HANDLERS(FontWeight);
</span><ins>+    DECLARE_PROPERTY_CUSTOM_HANDLERS(FontSynthesis);
</ins><span class="cx"> #if ENABLE(CSS_IMAGE_RESOLUTION)
</span><span class="cx">     DECLARE_PROPERTY_CUSTOM_HANDLERS(ImageResolution);
</span><span class="cx"> #endif
</span><span class="lines">@@ -1375,6 +1376,32 @@
</span><span class="cx">     styleResolver.setFontDescription(fontDescription);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline void StyleBuilderCustom::applyValueFontSynthesis(StyleResolver&amp; styleResolver, CSSValue&amp; value)
+{
+    if (is&lt;CSSPrimitiveValue&gt;(value)) {
+        ASSERT(downcast&lt;CSSPrimitiveValue&gt;(value).getValueID() == CSSValueNone);
+        styleResolver.style()-&gt;setFontSynthesis(FontSynthesisNone);
+    }
+
+    FontSynthesis result = FontSynthesisNone;
+    ASSERT(is&lt;CSSValueList&gt;(value));
+    for (CSSValue&amp; i : downcast&lt;CSSValueList&gt;(value)) {
+        switch (downcast&lt;CSSPrimitiveValue&gt;(i).getValueID()) {
+        case CSSValueWeight:
+            result |= FontSynthesisWeight;
+            break;
+        case CSSValueStyle:
+            result |= FontSynthesisStyle;
+            break;
+        default:
+            ASSERT_NOT_REACHED();
+            break;
+        }
+    }
+
+    styleResolver.style()-&gt;setFontSynthesis(result);
+}
+
</ins><span class="cx"> inline void StyleBuilderCustom::applyInitialColumnGap(StyleResolver&amp; styleResolver)
</span><span class="cx"> {
</span><span class="cx">     styleResolver.style()-&gt;setHasNormalColumnGap();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (183303 => 183304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2015-04-25 01:31:05 UTC (rev 183303)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2015-04-25 03:29:23 UTC (rev 183304)
</span><span class="lines">@@ -1024,6 +1024,8 @@
</span><span class="cx"> 
</span><span class="cx">     TextOrientation textOrientation() const { return static_cast&lt;TextOrientation&gt;(rareInheritedData-&gt;m_textOrientation); }
</span><span class="cx"> 
</span><ins>+    FontSynthesis fontSynthesis() const { return static_cast&lt;FontSynthesis&gt;(rareInheritedData-&gt;fontSynthesis); }
+
</ins><span class="cx">     ObjectFit objectFit() const { return static_cast&lt;ObjectFit&gt;(rareNonInheritedData-&gt;m_objectFit); }
</span><span class="cx">     
</span><span class="cx">     // Return true if any transform related property (currently transform, transformStyle3D or perspective) 
</span><span class="lines">@@ -1533,6 +1535,7 @@
</span><span class="cx">     void setMarginAfterCollapse(EMarginCollapse c) { SET_VAR(rareNonInheritedData, marginAfterCollapse, c); }
</span><span class="cx">     void setWordBreak(EWordBreak b) { SET_VAR(rareInheritedData, wordBreak, b); }
</span><span class="cx">     void setOverflowWrap(EOverflowWrap b) { SET_VAR(rareInheritedData, overflowWrap, b); }
</span><ins>+    void setFontSynthesis(FontSynthesis synthesis) { SET_VAR(rareInheritedData, fontSynthesis, synthesis); }
</ins><span class="cx">     void setNBSPMode(ENBSPMode b) { SET_VAR(rareInheritedData, nbspMode, b); }
</span><span class="cx">     void setLineBreak(LineBreak b) { SET_VAR(rareInheritedData, lineBreak, b); }
</span><span class="cx">     void setHyphens(Hyphens h) { SET_VAR(rareInheritedData, hyphens, h); }
</span><span class="lines">@@ -2061,6 +2064,7 @@
</span><span class="cx">     static BlendMode initialBlendMode() { return BlendModeNormal; }
</span><span class="cx">     static Isolation initialIsolation() { return IsolationAuto; }
</span><span class="cx"> #endif
</span><ins>+    static FontSynthesis initialFontSynthesis() { return FontSynthesisNone; }
</ins><span class="cx"> 
</span><span class="cx">     static ptrdiff_t noninheritedFlagsMemoryOffset() { return OBJECT_OFFSETOF(RenderStyle, noninherited_flags); }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleConstantsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (183303 => 183304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2015-04-25 01:31:05 UTC (rev 183303)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2015-04-25 03:29:23 UTC (rev 183304)
</span><span class="lines">@@ -416,6 +416,13 @@
</span><span class="cx">     CAPITALIZE, UPPERCASE, LOWERCASE, TTNONE
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+enum FontSynthesisValues {
+    FontSynthesisNone = 0x0,
+    FontSynthesisWeight = 0x1,
+    FontSynthesisStyle = 0x2
+};
+typedef unsigned FontSynthesis;
+
</ins><span class="cx"> #if ENABLE(LETTERPRESS)
</span><span class="cx"> static const size_t TextDecorationBits = 5;
</span><span class="cx"> #else
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareInheritedDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h (183303 => 183304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h        2015-04-25 01:31:05 UTC (rev 183303)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h        2015-04-25 03:29:23 UTC (rev 183304)
</span><span class="lines">@@ -133,6 +133,8 @@
</span><span class="cx">     unsigned trailingWord : 1;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    unsigned fontSynthesis : 2;
+
</ins><span class="cx">     AtomicString hyphenationString;
</span><span class="cx">     short hyphenationLimitBefore;
</span><span class="cx">     short hyphenationLimitAfter;
</span></span></pre>
</div>
</div>

</body>
</html>