<!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>[206679] 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/206679">206679</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2016-09-30 14:59:15 -0700 (Fri, 30 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Parse font-variation-settings
https://bugs.webkit.org/show_bug.cgi?id=162781

Reviewed by Simon Fraser.

Source/WebCore:

CSS Fonts level 4 [1] details the font-variation-settings property which allows variations
to be applied to fonts which accept it. The property accepts a list of key/value
pairs where the keys are four-character Ascii codes and the values are floating
point values. The implementation uses font-feature-settings as a model, but with one
big difference: font-variation-settings can be animated. The set of variation points
are animated individually.

This font variations work is being done behind a run-time switch, which is settable from
the Safari Develop menu.

Now that FontDescription is growing, I'd like to do an investigation into the possibility of
moving some of the rare pieces of it into their own class to reduce memory. However, upon
advice, this investigation will be fairly involved and should be done in its own bug.

Test: fast/text/variations/getComputedStyle.html

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSAllInOne.cpp:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSFontVariationValue.cpp: Copied from Source/WebCore/platform/graphics/FontTaggedSettings.cpp.
(WebCore::CSSFontVariationValue::CSSFontVariationValue):
(WebCore::CSSFontVariationValue::customCSSText):
(WebCore::CSSFontVariationValue::equals):
* css/CSSFontVariationValue.h: Copied from Source/WebCore/platform/graphics/FontTaggedSettings.cpp.
* css/CSSPropertyNames.in:
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isFontVariationValue):
(WebCore::CSSValue::isFontFeatureValue): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertFontVariationSettings):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialFontVariationSettings):
(WebCore::StyleBuilderCustom::applyInheritFontVariationSettings):
(WebCore::StyleBuilderCustom::applyInheritFontFeatureSettings): Deleted.
* css/parser/CSSParser.cpp:
(WebCore::CSSParserContext::CSSParserContext):
(WebCore::operator==):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFontFeatureSettings):
(WebCore::CSSParser::parseFontVariationTag):
(WebCore::CSSParser::parseFontVariationSettings):
* css/parser/CSSParser.h:
* css/parser/CSSParserMode.h:
* platform/graphics/FontCache.h:
(WebCore::FontDescriptionKey::FontDescriptionKey):
(WebCore::FontDescriptionKey::operator==):
(WebCore::FontDescriptionKey::computeHash):
* platform/graphics/FontDescription.cpp:
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::variationSettings):
(WebCore::FontDescription::setVariationSettings):
(WebCore::FontDescription::operator==):
(WebCore::FontDescription::featureSettings): Deleted.
(WebCore::FontDescription::setFeatureSettings): Deleted.
* platform/graphics/FontTaggedSettings.cpp:
(WebCore::FontVariationSettings::hash):
(WebCore::operator&lt;&lt;):
* platform/graphics/FontTaggedSettings.h:

LayoutTests:

* fast/text/variations/getComputedStyle-expected.txt: Added.
* fast/text/variations/getComputedStyle.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssCSSAllInOnecpp">trunk/Source/WebCore/css/CSSAllInOne.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSPropertyNamesin">trunk/Source/WebCore/css/CSSPropertyNames.in</a></li>
<li><a href="#trunkSourceWebCorecssCSSValuecpp">trunk/Source/WebCore/css/CSSValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueh">trunk/Source/WebCore/css/CSSValue.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderCustomh">trunk/Source/WebCore/css/StyleBuilderCustom.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParsercpp">trunk/Source/WebCore/css/parser/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserh">trunk/Source/WebCore/css/parser/CSSParser.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserModeh">trunk/Source/WebCore/css/parser/CSSParserMode.h</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="#trunkSourceWebCoreplatformgraphicsFontTaggedSettingscpp">trunk/Source/WebCore/platform/graphics/FontTaggedSettings.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontTaggedSettingsh">trunk/Source/WebCore/platform/graphics/FontTaggedSettings.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/fast/text/variations/</li>
<li><a href="#trunkLayoutTestsfasttextvariationsgetComputedStyleexpectedtxt">trunk/LayoutTests/fast/text/variations/getComputedStyle-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasttextvariationsgetComputedStylehtml">trunk/LayoutTests/fast/text/variations/getComputedStyle.html</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontVariationValuecpp">trunk/Source/WebCore/css/CSSFontVariationValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontVariationValueh">trunk/Source/WebCore/css/CSSFontVariationValue.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/LayoutTests/ChangeLog        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-09-30  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Parse font-variation-settings
+        https://bugs.webkit.org/show_bug.cgi?id=162781
+
+        Reviewed by Simon Fraser.
+
+        * fast/text/variations/getComputedStyle-expected.txt: Added.
+        * fast/text/variations/getComputedStyle.html: Added.
+
</ins><span class="cx"> 2016-09-30  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Mark inspector/debugger/breakpoints tests as slow on release, skipped on debug.
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextvariationsgetComputedStyleexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/variations/getComputedStyle-expected.txt (0 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/variations/getComputedStyle-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/text/variations/getComputedStyle-expected.txt        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+PASS window.getComputedStyle(document.getElementById('test0')).getPropertyValue('font-variation-settings') is &quot;'wght' 2&quot;
+PASS window.getComputedStyle(document.getElementById('test1')).getPropertyValue('font-variation-settings') is &quot;'wght' 3&quot;
+PASS window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-variation-settings') is &quot;'wght' 2, 'wdth' 1.2&quot;
+PASS window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-variation-settings') is window.getComputedStyle(document.getElementById('test3')).getPropertyValue('font-variation-settings')
+PASS window.getComputedStyle(document.getElementById('test4')).getPropertyValue('font-variation-settings') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('test5')).getPropertyValue('font-variation-settings') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('test6')).getPropertyValue('font-variation-settings') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('test7')).getPropertyValue('font-variation-settings') is &quot;'wght' 27&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/text/variations/getComputedStyle-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="trunkLayoutTestsfasttextvariationsgetComputedStylehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/variations/getComputedStyle.html (0 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/variations/getComputedStyle.html                                (rev 0)
+++ trunk/LayoutTests/fast/text/variations/getComputedStyle.html        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;script&gt;
+if (window.internals)
+   window.internals.settings.setVariationFontsEnabled(true);
+&lt;/script&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;test0&quot; style=&quot;font-family: 'Skia'; font-variation-settings: 'wght' 2;&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;test1&quot; style=&quot;font-family: 'Skia'; font-variation-settings: 'wght' 2, 'wght' 3;&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;test2&quot; style=&quot;font-family: 'Skia'; font-variation-settings: 'wght' 2, 'wdth' 1.2;&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;test3&quot; style=&quot;font-family: 'Skia'; font-variation-settings: 'wdth' 1.2, 'wght' 2;&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;test4&quot; style=&quot;font-family: 'Skia'; font-variation-settings: normal;&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;test5&quot; style=&quot;font-family: 'Skia'; font-variation-settings: 'abcde' 3;&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;test6&quot; style=&quot;font-family: 'Skia'; font-variation-settings: 'abc한국어e' 3;&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;test7&quot; style=&quot;font-family: 'Skia'; font-variation-settings: 'wght' 27;&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test0')).getPropertyValue('font-variation-settings')&quot;, &quot;'wght' 2&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test1')).getPropertyValue('font-variation-settings')&quot;, &quot;'wght' 3&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-variation-settings')&quot;, &quot;'wght' 2, 'wdth' 1.2&quot;);
+shouldBe(&quot;window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-variation-settings')&quot;, &quot;window.getComputedStyle(document.getElementById('test3')).getPropertyValue('font-variation-settings')&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test4')).getPropertyValue('font-variation-settings')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test5')).getPropertyValue('font-variation-settings')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test6')).getPropertyValue('font-variation-settings')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test7')).getPropertyValue('font-variation-settings')&quot;, &quot;'wght' 27&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="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -1266,6 +1266,7 @@
</span><span class="cx">     css/CSSFontFeatureValue.cpp
</span><span class="cx">     css/CSSFontSelector.cpp
</span><span class="cx">     css/CSSFontValue.cpp
</span><ins>+    css/CSSFontVariationValue.cpp
</ins><span class="cx">     css/CSSFunctionValue.cpp
</span><span class="cx">     css/CSSGradientValue.cpp
</span><span class="cx">     css/CSSGridAutoRepeatValue.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/ChangeLog        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -1,5 +1,77 @@
</span><span class="cx"> 2016-09-30  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Parse font-variation-settings
+        https://bugs.webkit.org/show_bug.cgi?id=162781
+
+        Reviewed by Simon Fraser.
+
+        CSS Fonts level 4 [1] details the font-variation-settings property which allows variations
+        to be applied to fonts which accept it. The property accepts a list of key/value
+        pairs where the keys are four-character Ascii codes and the values are floating
+        point values. The implementation uses font-feature-settings as a model, but with one
+        big difference: font-variation-settings can be animated. The set of variation points
+        are animated individually.
+
+        This font variations work is being done behind a run-time switch, which is settable from
+        the Safari Develop menu.
+
+        Now that FontDescription is growing, I'd like to do an investigation into the possibility of
+        moving some of the rare pieces of it into their own class to reduce memory. However, upon
+        advice, this investigation will be fairly involved and should be done in its own bug.
+
+        Test: fast/text/variations/getComputedStyle.html
+
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSAllInOne.cpp:
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::propertyValue):
+        * css/CSSFontVariationValue.cpp: Copied from Source/WebCore/platform/graphics/FontTaggedSettings.cpp.
+        (WebCore::CSSFontVariationValue::CSSFontVariationValue):
+        (WebCore::CSSFontVariationValue::customCSSText):
+        (WebCore::CSSFontVariationValue::equals):
+        * css/CSSFontVariationValue.h: Copied from Source/WebCore/platform/graphics/FontTaggedSettings.cpp.
+        * css/CSSPropertyNames.in:
+        * css/CSSValue.cpp:
+        (WebCore::CSSValue::equals):
+        (WebCore::CSSValue::cssText):
+        (WebCore::CSSValue::destroy):
+        * css/CSSValue.h:
+        (WebCore::CSSValue::isFontVariationValue):
+        (WebCore::CSSValue::isFontFeatureValue): Deleted.
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::convertFontVariationSettings):
+        * css/StyleBuilderCustom.h:
+        (WebCore::StyleBuilderCustom::applyInitialFontVariationSettings):
+        (WebCore::StyleBuilderCustom::applyInheritFontVariationSettings):
+        (WebCore::StyleBuilderCustom::applyInheritFontFeatureSettings): Deleted.
+        * css/parser/CSSParser.cpp:
+        (WebCore::CSSParserContext::CSSParserContext):
+        (WebCore::operator==):
+        (WebCore::CSSParser::parseValue):
+        (WebCore::CSSParser::parseFontFeatureSettings):
+        (WebCore::CSSParser::parseFontVariationTag):
+        (WebCore::CSSParser::parseFontVariationSettings):
+        * css/parser/CSSParser.h:
+        * css/parser/CSSParserMode.h:
+        * platform/graphics/FontCache.h:
+        (WebCore::FontDescriptionKey::FontDescriptionKey):
+        (WebCore::FontDescriptionKey::operator==):
+        (WebCore::FontDescriptionKey::computeHash):
+        * platform/graphics/FontDescription.cpp:
+        * platform/graphics/FontDescription.h:
+        (WebCore::FontDescription::variationSettings):
+        (WebCore::FontDescription::setVariationSettings):
+        (WebCore::FontDescription::operator==):
+        (WebCore::FontDescription::featureSettings): Deleted.
+        (WebCore::FontDescription::setFeatureSettings): Deleted.
+        * platform/graphics/FontTaggedSettings.cpp:
+        (WebCore::FontVariationSettings::hash):
+        (WebCore::operator&lt;&lt;):
+        * platform/graphics/FontTaggedSettings.h:
+
+2016-09-30  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
</ins><span class="cx">         Followup patch to r206664
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=162774
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -5469,6 +5469,8 @@
</span><span class="cx">                 C105DA620F3AA68F001DD44F /* TextEncodingDetectorICU.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C105DA610F3AA68F001DD44F /* TextEncodingDetectorICU.cpp */; };
</span><span class="cx">                 C105DA640F3AA6B8001DD44F /* TextEncodingDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = C105DA630F3AA6B8001DD44F /* TextEncodingDetector.h */; };
</span><span class="cx">                 C2015C0A1BE6FEB200822389 /* FontVariantBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = C2015C091BE6FE2C00822389 /* FontVariantBuilder.h */; };
</span><ins>+                C21DF2E91D9E4E9900F5B24C /* CSSFontVariationValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C21DF2E71D9E4E9900F5B24C /* CSSFontVariationValue.cpp */; };
+                C21DF2EA1D9E4E9900F5B24C /* CSSFontVariationValue.h in Headers */ = {isa = PBXBuildFile; fileRef = C21DF2E81D9E4E9900F5B24C /* CSSFontVariationValue.h */; };
</ins><span class="cx">                 C26017A31C72DC9900F74A16 /* CSSFontFaceSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C26017A11C72DC9900F74A16 /* CSSFontFaceSet.cpp */; };
</span><span class="cx">                 C26017A41C72DC9900F74A16 /* CSSFontFaceSet.h in Headers */ = {isa = PBXBuildFile; fileRef = C26017A21C72DC9900F74A16 /* CSSFontFaceSet.h */; };
</span><span class="cx">                 C280833F1C6DC26F001451B6 /* JSFontFace.h in Headers */ = {isa = PBXBuildFile; fileRef = C280833E1C6DC22C001451B6 /* JSFontFace.h */; };
</span><span class="lines">@@ -12970,6 +12972,8 @@
</span><span class="cx">                 C105DA610F3AA68F001DD44F /* TextEncodingDetectorICU.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextEncodingDetectorICU.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C105DA630F3AA6B8001DD44F /* TextEncodingDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextEncodingDetector.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C2015C091BE6FE2C00822389 /* FontVariantBuilder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FontVariantBuilder.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                C21DF2E71D9E4E9900F5B24C /* CSSFontVariationValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFontVariationValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                C21DF2E81D9E4E9900F5B24C /* CSSFontVariationValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFontVariationValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 C24685131A148E1800811792 /* CoreGraphicsSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreGraphicsSPI.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C26017A11C72DC9900F74A16 /* CSSFontFaceSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFontFaceSet.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C26017A21C72DC9900F74A16 /* CSSFontFaceSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFontFaceSet.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -22600,6 +22604,8 @@
</span><span class="cx">                                 3FFFF9A6159D9A550020BBD5 /* WebKitCSSViewportRule.cpp */,
</span><span class="cx">                                 3FFFF9A7159D9A550020BBD5 /* WebKitCSSViewportRule.h */,
</span><span class="cx">                                 3F2B33E3165ABD3500E3987C /* WebKitCSSViewportRule.idl */,
</span><ins>+                                C21DF2E71D9E4E9900F5B24C /* CSSFontVariationValue.cpp */,
+                                C21DF2E81D9E4E9900F5B24C /* CSSFontVariationValue.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = css;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -24709,6 +24715,7 @@
</span><span class="cx">                                 A8D223FE16B52E4E00157288 /* HTMLResourcePreloader.h in Headers */,
</span><span class="cx">                                 A871DC250A15205700B12A68 /* HTMLScriptElement.h in Headers */,
</span><span class="cx">                                 977B3875122883E900B81FF8 /* HTMLScriptRunner.h in Headers */,
</span><ins>+                                C21DF2EA1D9E4E9900F5B24C /* CSSFontVariationValue.h in Headers */,
</ins><span class="cx">                                 977B3876122883E900B81FF8 /* HTMLScriptRunnerHost.h in Headers */,
</span><span class="cx">                                 A81369D8097374F600D74463 /* HTMLSelectElement.h in Headers */,
</span><span class="cx">                                 9B69D3B51B98FFE900E3512B /* HTMLSlotElement.h in Headers */,
</span><span class="lines">@@ -28470,6 +28477,7 @@
</span><span class="cx">                                 DB23C2CB0A508D29002489EB /* IndentOutdentCommand.cpp in Sources */,
</span><span class="cx">                                 517138EF1BED1D1A000D5F01 /* IndexKey.cpp in Sources */,
</span><span class="cx">                                 51EEAA731BEFFAB100218008 /* IndexValueEntry.cpp in Sources */,
</span><ins>+                                C21DF2E91D9E4E9900F5B24C /* CSSFontVariationValue.cpp in Sources */,
</ins><span class="cx">                                 517138F71BF128BB000D5F01 /* IndexValueStore.cpp in Sources */,
</span><span class="cx">                                 A8CFF5E60A155A05000A4234 /* InlineBox.cpp in Sources */,
</span><span class="cx">                                 B57CB52D182A3EED0079A647 /* InlineElementBox.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSAllInOne.cpp (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSAllInOne.cpp        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/css/CSSAllInOne.cpp        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx"> #include &quot;CSSFontFeatureValue.cpp&quot;
</span><span class="cx"> #include &quot;CSSFontSelector.cpp&quot;
</span><span class="cx"> #include &quot;CSSFontValue.cpp&quot;
</span><ins>+#include &quot;CSSFontVariationValue.cpp&quot;
</ins><span class="cx"> #include &quot;CSSFunctionValue.cpp&quot;
</span><span class="cx"> #include &quot;CSSGradientValue.cpp&quot;
</span><span class="cx"> #include &quot;CSSGridLineNamesValue.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #include &quot;CSSCustomPropertyValue.h&quot;
</span><span class="cx"> #include &quot;CSSFontFeatureValue.h&quot;
</span><span class="cx"> #include &quot;CSSFontValue.h&quot;
</span><ins>+#include &quot;CSSFontVariationValue.h&quot;
</ins><span class="cx"> #include &quot;CSSFunctionValue.h&quot;
</span><span class="cx"> #include &quot;CSSLineBoxContainValue.h&quot;
</span><span class="cx"> #include &quot;CSSParser.h&quot;
</span><span class="lines">@@ -62,6 +63,7 @@
</span><span class="cx"> #include &quot;RenderBox.h&quot;
</span><span class="cx"> #include &quot;RenderStyle.h&quot;
</span><span class="cx"> #include &quot;SVGElement.h&quot;
</span><ins>+#include &quot;Settings.h&quot;
</ins><span class="cx"> #include &quot;ShapeValue.h&quot;
</span><span class="cx"> #include &quot;StyleInheritedData.h&quot;
</span><span class="cx"> #include &quot;StyleProperties.h&quot;
</span><span class="lines">@@ -2879,6 +2881,18 @@
</span><span class="cx">                 list-&gt;append(CSSFontFeatureValue::create(FontTag(feature.tag()), feature.value()));
</span><span class="cx">             return list;
</span><span class="cx">         }
</span><ins>+        case CSSPropertyFontVariationSettings: {
+            if (styledNode-&gt;document().settings() &amp;&amp; styledNode-&gt;document().settings()-&gt;variationFontsEnabled()) {
+                const FontVariationSettings&amp; variationSettings = style-&gt;fontDescription().variationSettings();
+                if (variationSettings.isEmpty())
+                    return cssValuePool.createIdentifierValue(CSSValueNormal);
+                RefPtr&lt;CSSValueList&gt; list = CSSValueList::createCommaSeparated();
+                for (auto&amp; feature : variationSettings)
+                    list-&gt;append(CSSFontVariationValue::create(feature.tag(), feature.value()));
+                return list;
+            }
+            break;
+        }
</ins><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx">         case CSSPropertyGridAutoFlow: {
</span><span class="cx">             RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontVariationValuecppfromrev206678trunkSourceWebCoreplatformgraphicsFontTaggedSettingscpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/css/CSSFontVariationValue.cpp (from rev 206678, trunk/Source/WebCore/platform/graphics/FontTaggedSettings.cpp) (0 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontVariationValue.cpp                                (rev 0)
+++ trunk/Source/WebCore/css/CSSFontVariationValue.cpp        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;CSSFontVariationValue.h&quot;
+
+#include &lt;wtf/text/StringBuilder.h&gt;
+
+namespace WebCore {
+
+CSSFontVariationValue::CSSFontVariationValue(FontTag tag, float value)
+    : CSSValue(FontVariationClass)
+    , m_tag(tag)
+    , m_value(value)
+{
+}
+
+String CSSFontVariationValue::customCSSText() const
+{
+    StringBuilder builder;
+    builder.append('\'');
+    for (char c : m_tag)
+        builder.append(c);
+    builder.appendLiteral(&quot;' &quot;);
+    builder.appendNumber(m_value);
+    return builder.toString();
+}
+
+bool CSSFontVariationValue::equals(const CSSFontVariationValue&amp; other) const
+{
+    return m_tag == other.m_tag &amp;&amp; m_value == other.m_value;
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontVariationValuehfromrev206678trunkSourceWebCoreplatformgraphicsFontTaggedSettingscpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/css/CSSFontVariationValue.h (from rev 206678, trunk/Source/WebCore/platform/graphics/FontTaggedSettings.cpp) (0 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontVariationValue.h                                (rev 0)
+++ trunk/Source/WebCore/css/CSSFontVariationValue.h        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;CSSValue.h&quot;
+#include &quot;FontTaggedSettings.h&quot;
+
+namespace WebCore {
+
+class CSSFontVariationValue final : public CSSValue {
+public:
+    static Ref&lt;CSSFontVariationValue&gt; create(FontTag tag, float value)
+    {
+        return adoptRef(*new CSSFontVariationValue(tag, value));
+    }
+
+    const FontTag&amp; tag() const { return m_tag; }
+    float value() const { return m_value; }
+    String customCSSText() const;
+
+    bool equals(const CSSFontVariationValue&amp;) const;
+
+private:
+    CSSFontVariationValue(FontTag, float);
+
+    FontTag m_tag;
+    const float m_value;
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSFontVariationValue, isFontVariationValue())
</ins></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -105,6 +105,7 @@
</span><span class="cx"> font-weight [Inherited, Custom=All]
</span><span class="cx"> text-rendering [Inherited, FontProperty, NameForMethods=TextRenderingMode]
</span><span class="cx"> font-feature-settings [Inherited, FontProperty, Custom=Initial|Inherit, Converter=FontFeatureSettings, NameForMethods=FeatureSettings]
</span><ins>+font-variation-settings [Inherited, FontProperty, Custom=Initial|Inherit, Converter=FontVariationSettings, NameForMethods=VariationSettings]
</ins><span class="cx"> -webkit-font-kerning [Inherited, FontProperty, NameForMethods=Kerning]
</span><span class="cx"> font-kerning = -webkit-font-kerning
</span><span class="cx"> -webkit-font-smoothing [Inherited, FontProperty]
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.cpp (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.cpp        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/css/CSSValue.cpp        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> #include &quot;CSSFontFaceSrcValue.h&quot;
</span><span class="cx"> #include &quot;CSSFontFeatureValue.h&quot;
</span><span class="cx"> #include &quot;CSSFontValue.h&quot;
</span><ins>+#include &quot;CSSFontVariationValue.h&quot;
</ins><span class="cx"> #include &quot;CSSFunctionValue.h&quot;
</span><span class="cx"> #include &quot;CSSGradientValue.h&quot;
</span><span class="cx"> #include &quot;CSSImageSetValue.h&quot;
</span><span class="lines">@@ -176,6 +177,8 @@
</span><span class="cx">             return compareCSSValues&lt;CSSFontFaceSrcValue&gt;(*this, other);
</span><span class="cx">         case FontFeatureClass:
</span><span class="cx">             return compareCSSValues&lt;CSSFontFeatureValue&gt;(*this, other);
</span><ins>+        case FontVariationClass:
+            return compareCSSValues&lt;CSSFontVariationValue&gt;(*this, other);
</ins><span class="cx">         case FunctionClass:
</span><span class="cx">             return compareCSSValues&lt;CSSFunctionValue&gt;(*this, other);
</span><span class="cx">         case LinearGradientClass:
</span><span class="lines">@@ -282,6 +285,8 @@
</span><span class="cx">         return downcast&lt;CSSFontFaceSrcValue&gt;(*this).customCSSText();
</span><span class="cx">     case FontFeatureClass:
</span><span class="cx">         return downcast&lt;CSSFontFeatureValue&gt;(*this).customCSSText();
</span><ins>+    case FontVariationClass:
+        return downcast&lt;CSSFontVariationValue&gt;(*this).customCSSText();
</ins><span class="cx">     case FunctionClass:
</span><span class="cx">         return downcast&lt;CSSFunctionValue&gt;(*this).customCSSText();
</span><span class="cx">     case LinearGradientClass:
</span><span class="lines">@@ -396,6 +401,9 @@
</span><span class="cx">     case FontFeatureClass:
</span><span class="cx">         delete downcast&lt;CSSFontFeatureValue&gt;(this);
</span><span class="cx">         return;
</span><ins>+    case FontVariationClass:
+        delete downcast&lt;CSSFontVariationValue&gt;(this);
+        return;
</ins><span class="cx">     case FunctionClass:
</span><span class="cx">         delete downcast&lt;CSSFunctionValue&gt;(this);
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.h (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.h        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/css/CSSValue.h        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -83,6 +83,7 @@
</span><span class="cx">     bool isVariableValue() const { return m_classType == VariableClass; }
</span><span class="cx">     bool isFunctionValue() const { return m_classType == FunctionClass; }
</span><span class="cx">     bool isFontFeatureValue() const { return m_classType == FontFeatureClass; }
</span><ins>+    bool isFontVariationValue() const { return m_classType == FontVariationClass; }
</ins><span class="cx">     bool isFontFaceSrcValue() const { return m_classType == FontFaceSrcClass; }
</span><span class="cx">     bool isFontValue() const { return m_classType == FontClass; }
</span><span class="cx">     bool isImageGeneratorValue() const { return m_classType &gt;= CanvasClass &amp;&amp; m_classType &lt;= RadialGradientClass; }
</span><span class="lines">@@ -169,6 +170,7 @@
</span><span class="cx">         AspectRatioClass,
</span><span class="cx">         BorderImageSliceClass,
</span><span class="cx">         FontFeatureClass,
</span><ins>+        FontVariationClass,
</ins><span class="cx">         FontClass,
</span><span class="cx">         FontFaceSrcClass,
</span><span class="cx">         FunctionClass,
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include &quot;CSSCalculationValue.h&quot;
</span><span class="cx"> #include &quot;CSSContentDistributionValue.h&quot;
</span><span class="cx"> #include &quot;CSSFontFeatureValue.h&quot;
</span><ins>+#include &quot;CSSFontVariationValue.h&quot;
</ins><span class="cx"> #include &quot;CSSFunctionValue.h&quot;
</span><span class="cx"> #include &quot;CSSGridAutoRepeatValue.h&quot;
</span><span class="cx"> #include &quot;CSSGridLineNamesValue.h&quot;
</span><span class="lines">@@ -120,6 +121,7 @@
</span><span class="cx">     static bool convertOverflowScrolling(StyleResolver&amp;, CSSValue&amp;);
</span><span class="cx"> #endif
</span><span class="cx">     static FontFeatureSettings convertFontFeatureSettings(StyleResolver&amp;, CSSValue&amp;);
</span><ins>+    static FontVariationSettings convertFontVariationSettings(StyleResolver&amp;, CSSValue&amp;);
</ins><span class="cx">     static SVGLength convertSVGLength(StyleResolver&amp;, CSSValue&amp;);
</span><span class="cx">     static Vector&lt;SVGLength&gt; convertSVGLengthVector(StyleResolver&amp;, CSSValue&amp;);
</span><span class="cx">     static Vector&lt;SVGLength&gt; convertStrokeDashArray(StyleResolver&amp;, CSSValue&amp;);
</span><span class="lines">@@ -1144,6 +1146,21 @@
</span><span class="cx">     return settings;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline FontVariationSettings StyleBuilderConverter::convertFontVariationSettings(StyleResolver&amp;, CSSValue&amp; value)
+{
+    if (is&lt;CSSPrimitiveValue&gt;(value)) {
+        ASSERT(downcast&lt;CSSPrimitiveValue&gt;(value).getValueID() == CSSValueNormal);
+        return { };
+    }
+
+    FontVariationSettings settings;
+    for (auto&amp; item : downcast&lt;CSSValueList&gt;(value)) {
+        auto&amp; feature = downcast&lt;CSSFontVariationValue&gt;(item.get());
+        settings.insert({ feature.tag(), feature.value() });
+    }
+    return settings;
+}
+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> inline bool StyleBuilderConverter::convertTouchCallout(StyleResolver&amp;, CSSValue&amp; value)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderCustomh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderCustom.h (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderCustom.h        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/css/StyleBuilderCustom.h        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -112,6 +112,8 @@
</span><span class="cx">     static void applyInheritWebkitMaskImage(StyleResolver&amp;) { }
</span><span class="cx">     static void applyInitialFontFeatureSettings(StyleResolver&amp;) { }
</span><span class="cx">     static void applyInheritFontFeatureSettings(StyleResolver&amp;) { }
</span><ins>+    static void applyInitialFontVariationSettings(StyleResolver&amp;) { }
+    static void applyInheritFontVariationSettings(StyleResolver&amp;) { }
</ins><span class="cx"> 
</span><span class="cx">     // Custom handling of inherit + value setting only.
</span><span class="cx">     static void applyInheritDisplay(StyleResolver&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParser.cpp (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParser.cpp        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/css/parser/CSSParser.cpp        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> #include &quot;CSSFontFaceSrcValue.h&quot;
</span><span class="cx"> #include &quot;CSSFontFeatureValue.h&quot;
</span><span class="cx"> #include &quot;CSSFontValue.h&quot;
</span><ins>+#include &quot;CSSFontVariationValue.h&quot;
</ins><span class="cx"> #include &quot;CSSFunctionValue.h&quot;
</span><span class="cx"> #include &quot;CSSGradientValue.h&quot;
</span><span class="cx"> #include &quot;CSSImageSetValue.h&quot;
</span><span class="lines">@@ -271,6 +272,7 @@
</span><span class="cx"> #endif
</span><span class="cx">         springTimingFunctionEnabled = settings-&gt;springTimingFunctionEnabled();
</span><span class="cx">         useNewParser = settings-&gt;newCSSParserEnabled();
</span><ins>+        variationFontsEnabled = settings-&gt;variationFontsEnabled();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -293,7 +295,8 @@
</span><span class="cx">         &amp;&amp; a.needsSiteSpecificQuirks == b.needsSiteSpecificQuirks
</span><span class="cx">         &amp;&amp; a.enforcesCSSMIMETypeInNoQuirksMode == b.enforcesCSSMIMETypeInNoQuirksMode
</span><span class="cx">         &amp;&amp; a.useLegacyBackgroundSizeShorthandBehavior == b.useLegacyBackgroundSizeShorthandBehavior
</span><del>-        &amp;&amp; a.springTimingFunctionEnabled == b.springTimingFunctionEnabled;
</del><ins>+        &amp;&amp; a.springTimingFunctionEnabled == b.springTimingFunctionEnabled
+        &amp;&amp; a.variationFontsEnabled == b.variationFontsEnabled;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> CSSParser::CSSParser(const CSSParserContext&amp; context)
</span><span class="lines">@@ -2971,6 +2974,14 @@
</span><span class="cx">         else
</span><span class="cx">             return parseFontFeatureSettings(important);
</span><span class="cx">         break;
</span><ins>+    case CSSPropertyFontVariationSettings:
+        if (m_context.variationFontsEnabled) {
+            if (id == CSSValueNormal)
+                validPrimitive = true;
+            else
+                return parseFontVariationSettings(important);
+        }
+        break;
</ins><span class="cx">     case CSSPropertyFontVariantLigatures:
</span><span class="cx">         if (id == CSSValueNormal || id == CSSValueNone)
</span><span class="cx">             validPrimitive = true;
</span><span class="lines">@@ -10625,6 +10636,60 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool CSSParser::parseFontVariationTag(CSSValueList&amp; settings)
+{
+    CSSParserValue* value = m_valueList-&gt;current();
+    // Feature tag name comes first
+    if (value-&gt;unit != CSSPrimitiveValue::CSS_STRING)
+        return false;
+    FontTag tag;
+    if (value-&gt;string.length() != tag.size())
+        return false;
+    for (unsigned i = 0; i &lt; tag.size(); ++i) {
+        // Limits the range of characters to 0x20-0x7E, following the tag name rules defiend in the OpenType specification.
+        UChar character = value-&gt;string[i];
+        if (character &lt; 0x20 || character &gt; 0x7E)
+            return false;
+        tag[i] = toASCIILower(character);
+    }
+
+    value = m_valueList-&gt;next();
+    if (!value || value-&gt;unit != CSSPrimitiveValue::CSS_NUMBER)
+        return false;
+
+    float tagValue = value-&gt;fValue;
+    m_valueList-&gt;next();
+
+    settings.append(CSSFontVariationValue::create(tag, tagValue));
+    return true;
+}
+
+bool CSSParser::parseFontVariationSettings(bool important)
+{
+    if (m_valueList-&gt;size() == 1 &amp;&amp; m_valueList-&gt;current()-&gt;id == CSSValueNormal) {
+        auto normalValue = CSSValuePool::singleton().createIdentifierValue(CSSValueNormal);
+        m_valueList-&gt;next();
+        addProperty(CSSPropertyFontVariationSettings, WTFMove(normalValue), important);
+        return true;
+    }
+
+    auto settings = CSSValueList::createCommaSeparated();
+    for (CSSParserValue* value = m_valueList-&gt;current(); value; value = m_valueList-&gt;next()) {
+        if (!parseFontVariationTag(settings))
+            return false;
+
+        // If the list isn't parsed fully, the current value should be comma.
+        value = m_valueList-&gt;current();
+        if (value &amp;&amp; !isComma(value))
+            return false;
+    }
+    if (settings-&gt;length()) {
+        addProperty(CSSPropertyFontVariationSettings, WTFMove(settings), important);
+        return true;
+    }
+    return false;
+}
+
</ins><span class="cx"> bool CSSParser::parseFontVariantLigatures(bool important, bool unknownIsFailure, bool implicit)
</span><span class="cx"> {
</span><span class="cx">     auto values = CSSValueList::createSpaceSeparated();
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParser.h (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParser.h        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/css/parser/CSSParser.h        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -364,6 +364,9 @@
</span><span class="cx">     bool parseFontFeatureTag(CSSValueList&amp;);
</span><span class="cx">     bool parseFontFeatureSettings(bool important);
</span><span class="cx"> 
</span><ins>+    bool parseFontVariationTag(CSSValueList&amp;);
+    bool parseFontVariationSettings(bool important);
+
</ins><span class="cx">     bool parseFlowThread(CSSPropertyID, bool important);
</span><span class="cx">     bool parseRegionThread(CSSPropertyID, bool important);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserModeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserMode.h (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserMode.h        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/css/parser/CSSParserMode.h        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -104,6 +104,7 @@
</span><span class="cx">     bool useLegacyBackgroundSizeShorthandBehavior { false };
</span><span class="cx">     bool springTimingFunctionEnabled { false };
</span><span class="cx">     bool useNewParser { false };
</span><ins>+    bool variationFontsEnabled { false };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> bool operator==(const CSSParserContext&amp;, const CSSParserContext&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontCache.h (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCache.h        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/platform/graphics/FontCache.h        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -76,6 +76,7 @@
</span><span class="cx">         , m_weight(description.weight())
</span><span class="cx">         , m_flags(makeFlagsKey(description))
</span><span class="cx">         , m_featureSettings(description.featureSettings())
</span><ins>+        , m_variationSettings(description.variationSettings())
</ins><span class="cx">     { }
</span><span class="cx"> 
</span><span class="cx">     explicit FontDescriptionKey(WTF::HashTableDeletedValueType)
</span><span class="lines">@@ -85,7 +86,7 @@
</span><span class="cx">     bool operator==(const FontDescriptionKey&amp; other) const
</span><span class="cx">     {
</span><span class="cx">         return m_size == other.m_size &amp;&amp; m_weight == other.m_weight &amp;&amp; m_flags == other.m_flags
</span><del>-            &amp;&amp; m_featureSettings == other.m_featureSettings;
</del><ins>+            &amp;&amp; m_featureSettings == other.m_featureSettings &amp;&amp; m_variationSettings == other.m_variationSettings;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool operator!=(const FontDescriptionKey&amp; other) const
</span><span class="lines">@@ -103,6 +104,7 @@
</span><span class="cx">         for (unsigned flagItem : m_flags)
</span><span class="cx">             hasher.add(flagItem);
</span><span class="cx">         hasher.add(m_featureSettings.hash());
</span><ins>+        hasher.add(m_variationSettings.hash());
</ins><span class="cx">         return hasher.hash();
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -143,6 +145,7 @@
</span><span class="cx">     unsigned m_weight { 0 };
</span><span class="cx">     std::array&lt;unsigned, 2&gt; m_flags {{ 0, 0 }};
</span><span class="cx">     FontFeatureSettings m_featureSettings;
</span><ins>+    FontVariationSettings m_variationSettings;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> struct FontDescriptionKeyHash {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontDescriptioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontDescription.cpp (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontDescription.cpp        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.cpp        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> struct SameSizeAsFontCascadeDescription {
</span><del>-    Vector&lt;void*&gt; vector;
</del><ins>+    Vector&lt;void*&gt; vector[2];
</ins><span class="cx">     AtomicString string;
</span><span class="cx">     float size;
</span><span class="cx">     unsigned bitfields1;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontDescriptionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontDescription.h (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontDescription.h        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.h        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -59,6 +59,7 @@
</span><span class="cx">     NonCJKGlyphOrientation nonCJKGlyphOrientation() const { return static_cast&lt;NonCJKGlyphOrientation&gt;(m_nonCJKGlyphOrientation); }
</span><span class="cx">     FontWidthVariant widthVariant() const { return static_cast&lt;FontWidthVariant&gt;(m_widthVariant); }
</span><span class="cx">     const FontFeatureSettings&amp; featureSettings() const { return m_featureSettings; }
</span><ins>+    const FontVariationSettings&amp; variationSettings() const { return m_variationSettings; }
</ins><span class="cx">     FontSynthesis fontSynthesis() const { return static_cast&lt;FontSynthesis&gt;(m_fontSynthesis); }
</span><span class="cx">     FontVariantLigatures variantCommonLigatures() const { return static_cast&lt;FontVariantLigatures&gt;(m_variantCommonLigatures); }
</span><span class="cx">     FontVariantLigatures variantDiscretionaryLigatures() const { return static_cast&lt;FontVariantLigatures&gt;(m_variantDiscretionaryLigatures); }
</span><span class="lines">@@ -105,6 +106,7 @@
</span><span class="cx">     void setWidthVariant(FontWidthVariant widthVariant) { m_widthVariant = widthVariant; } // Make sure new callers of this sync with FontPlatformData::isForTextCombine()!
</span><span class="cx">     void setLocale(const AtomicString&amp;);
</span><span class="cx">     void setFeatureSettings(FontFeatureSettings&amp;&amp; settings) { m_featureSettings = WTFMove(settings); }
</span><ins>+    void setVariationSettings(FontVariationSettings&amp;&amp; settings) { m_variationSettings = WTFMove(settings); }
</ins><span class="cx">     void setFontSynthesis(FontSynthesis fontSynthesis) { m_fontSynthesis = fontSynthesis; }
</span><span class="cx">     void setVariantCommonLigatures(FontVariantLigatures variant) { m_variantCommonLigatures = static_cast&lt;unsigned&gt;(variant); }
</span><span class="cx">     void setVariantDiscretionaryLigatures(FontVariantLigatures variant) { m_variantDiscretionaryLigatures = static_cast&lt;unsigned&gt;(variant); }
</span><span class="lines">@@ -125,7 +127,9 @@
</span><span class="cx">     FontTraitsMask traitsMask() const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><ins>+    // FIXME: Investigate moving these into their own object on the heap (to save memory).
</ins><span class="cx">     FontFeatureSettings m_featureSettings;
</span><ins>+    FontVariationSettings m_variationSettings;
</ins><span class="cx">     AtomicString m_locale;
</span><span class="cx"> 
</span><span class="cx">     float m_computedSize { 0 }; // Computed size adjusted for the minimum font size and the zoom factor.
</span><span class="lines">@@ -167,6 +171,7 @@
</span><span class="cx">         &amp;&amp; m_widthVariant == other.m_widthVariant
</span><span class="cx">         &amp;&amp; m_locale == other.m_locale
</span><span class="cx">         &amp;&amp; m_featureSettings == other.m_featureSettings
</span><ins>+        &amp;&amp; m_variationSettings == other.m_variationSettings
</ins><span class="cx">         &amp;&amp; m_fontSynthesis == other.m_fontSynthesis
</span><span class="cx">         &amp;&amp; m_variantCommonLigatures == other.m_variantCommonLigatures
</span><span class="cx">         &amp;&amp; m_variantDiscretionaryLigatures == other.m_variantDiscretionaryLigatures
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontTaggedSettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontTaggedSettings.cpp (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontTaggedSettings.cpp        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/platform/graphics/FontTaggedSettings.cpp        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -44,4 +44,36 @@
</span><span class="cx">     return hasher.hash();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+template &lt;&gt;
+unsigned FontVariationSettings::hash() const
+{
+    static_assert(sizeof(float) == sizeof(int), &quot;IntegerHasher needs to accept floats too&quot;);
+    union {
+        float f;
+        int i;
+    } floatToInt;
+
+    IntegerHasher hasher;
+    for (auto&amp; variation : m_list) {
+        hasher.add(FourCharacterTagHash::hash(variation.tag()));
+        floatToInt.f = variation.value();
+        hasher.add(floatToInt.i);
+    }
+    return hasher.hash();
</ins><span class="cx"> }
</span><ins>+
+TextStream&amp; operator&lt;&lt;(TextStream&amp; ts, const FontVariationSettings&amp; item)
+{
+    for (unsigned i = 0; i &lt; item.size(); ++i) {
+        auto&amp; variation = item.at(i);
+        StringBuilder s;
+        s.append(variation.tag()[0]);
+        s.append(variation.tag()[1]);
+        s.append(variation.tag()[2]);
+        s.append(variation.tag()[3]);
+        ts.dumpProperty(s.toString(), item.at(i).value());
+    }
+    return ts;
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontTaggedSettingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontTaggedSettings.h (206678 => 206679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontTaggedSettings.h        2016-09-30 21:53:38 UTC (rev 206678)
+++ trunk/Source/WebCore/platform/graphics/FontTaggedSettings.h        2016-09-30 21:59:15 UTC (rev 206679)
</span><span class="lines">@@ -136,5 +136,8 @@
</span><span class="cx"> 
</span><span class="cx"> typedef FontTaggedSetting&lt;int&gt; FontFeature;
</span><span class="cx"> typedef FontTaggedSettings&lt;int&gt; FontFeatureSettings;
</span><ins>+typedef FontTaggedSettings&lt;float&gt; FontVariationSettings;
</ins><span class="cx"> 
</span><ins>+TextStream&amp; operator&lt;&lt;(TextStream&amp;, const FontVariationSettings&amp;);
+
</ins><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>