<!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>[192819] 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/192819">192819</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2015-11-30 13:20:32 -0800 (Mon, 30 Nov 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unify font-variant-* with font-variant shorthand
https://bugs.webkit.org/show_bug.cgi?id=149773

Reviewed by Darin Adler.

Source/WebCore:

This patch makes font-variant a shorthand for the following properties:
font-variant-ligatures
font-variant-position
font-variant-caps
font-variant-numeric
font-variant-alternates
font-variant-east-asian

This is consistent with the CSS Fonts Level 3 spec.

This patch also migrates the &quot;font&quot; longhand to use the font-variant-caps
property.

Test: fast/text/font-variant-shorthand.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::fontVariantEastAsianPropertyValue): Rename FontVariantEastAsian values.
(WebCore::fontVariantFromStyle): We must consult with the longhand properties to determine
font-variant computed style.
(WebCore::ComputedStyleExtractor::propertyValue): Don't put any-old font-variant-caps inside
the font shorthand.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Guard against incorrect downcasts (due to inherit
of the new shorthand property).
* css/CSSParser.cpp: Parse font-variant as a shorthand. Also implement its &quot;normal&quot; and &quot;none&quot; values.
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFont):
(WebCore::CSSParser::parseSystemFont):
(WebCore::CSSParser::parseFontVariantLigatures):
(WebCore::CSSParser::parseFontVariantNumeric):
(WebCore::CSSParser::parseFontVariantEastAsian):
(WebCore::CSSParser::parseFontVariant):
(WebCore::isValidKeywordPropertyAndValue): Deleted.
(WebCore::isKeywordPropertyID): Deleted.
* css/CSSParser.h:
* css/CSSPropertyNames.in: Turn font-variant into a shorthand property.
* css/FontVariantBuilder.h: Guard against incorrect downcasts. Also update for renamed
FontVariantEastAsian type.
(WebCore::applyValueFontVariantLigatures):
(WebCore::applyValueFontVariantNumeric):
(WebCore::applyValueFontVariantEastAsian):
* css/StyleProperties.cpp: Update to use the more specific property.
(WebCore::StyleProperties::appendFontLonghandValueIfExplicit):
(WebCore::StyleProperties::fontValue):
(WebCore::StyleProperties::asText):
* css/StyleResolver.cpp: Ditto.
(WebCore::StyleResolver::isValidCueStyleProperty):
* editing/EditingStyle.cpp: Ditto.
* editing/cocoa/HTMLConverter.mm: Ditto.
(HTMLConverterCaches::propertyValueForNode):
(HTMLConverter::computedAttributesForElement):
* editing/ios/EditorIOS.mm: Ditto.
(WebCore::Editor::removeUnchangeableStyles):
* html/canvas/CanvasRenderingContext2D.cpp: Ditto.
(WebCore::CanvasRenderingContext2D::font):
(WebCore::CanvasRenderingContext2D::setFont):
* platform/graphics/FontCache.h: Removing duplicate cache key value.
(WebCore::FontDescriptionKey::makeFlagsKey):
* platform/graphics/FontCascade.cpp: Migrate to the new font-variant-caps from the old member variable.
(WebCore::FontCascade::glyphDataForCharacter):
* platform/graphics/FontCascade.h: Ditto.
(WebCore::FontCascade::isSmallCaps):
* platform/graphics/FontDescription.cpp: Ditto.
(WebCore::FontDescription::FontDescription):
* platform/graphics/FontDescription.h: Ditto.
(WebCore::FontCascadeDescription::equalForTextAutoSizing):
(WebCore::FontDescription::smallCaps): Deleted.
(WebCore::FontDescription::setSmallCaps): Deleted.
(WebCore::FontDescription::setIsSmallCaps): Deleted.
(WebCore::FontDescription::operator==): Deleted.
* platform/graphics/cocoa/FontCacheCoreText.cpp: Rename FontVariantEastAsianWidth.
(WebCore::computeFeatureSettingsFromVariants):
* platform/text/TextFlags.h: Ditto.
(WebCore::FontVariantSettings::operator==):
* rendering/RenderText.cpp: Migrage to the new font-variant-caps from the old member variable.
(WebCore::RenderText::widthFromCache):

LayoutTests:

Update tests. Also temporarily skip existing font-features tests until
https://bugs.webkit.org/show_bug.cgi?id=149774 is fixed.

* css3/font-variant-parsing-expected.txt:
* css3/font-variant-parsing.html:
* fast/css/font-property-priority-expected.txt:
* fast/css/font-shorthand-expected.txt:
* fast/css/parsing-font-variant-ligatures-expected.txt:
* fast/css/parsing-font-variant-ligatures.html:
* fast/inspector-support/style-expected.txt:
* fast/text/font-variant-shorthand-expected.txt: Added.
* fast/text/font-variant-shorthand.html: Added.
* platform/mac/TestExpectations:
* platform/mac/fast/writing-mode/broken-ideograph-small-caps-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscss3fontvariantparsingexpectedtxt">trunk/LayoutTests/css3/font-variant-parsing-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3fontvariantparsinghtml">trunk/LayoutTests/css3/font-variant-parsing.html</a></li>
<li><a href="#trunkLayoutTestsfastcssfontpropertypriorityexpectedtxt">trunk/LayoutTests/fast/css/font-property-priority-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssfontshorthandexpectedtxt">trunk/LayoutTests/fast/css/font-shorthand-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssparsingfontvariantligaturesexpectedtxt">trunk/LayoutTests/fast/css/parsing-font-variant-ligatures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssparsingfontvariantligatureshtml">trunk/LayoutTests/fast/css/parsing-font-variant-ligatures.html</a></li>
<li><a href="#trunkLayoutTestsfastinspectorsupportstyleexpectedtxt">trunk/LayoutTests/fast/inspector-support/style-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastwritingmodebrokenideographsmallcapsexpectedtxt">trunk/LayoutTests/platform/mac/fast/writing-mode/broken-ideograph-small-caps-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontSelectorcpp">trunk/Source/WebCore/css/CSSFontSelector.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="#trunkSourceWebCorecssFontVariantBuilderh">trunk/Source/WebCore/css/FontVariantBuilder.h</a></li>
<li><a href="#trunkSourceWebCorecssStylePropertiescpp">trunk/Source/WebCore/css/StyleProperties.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditingStylecpp">trunk/Source/WebCore/editing/EditingStyle.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingcocoaHTMLConvertermm">trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm</a></li>
<li><a href="#trunkSourceWebCoreeditingiosEditorIOSmm">trunk/Source/WebCore/editing/ios/EditorIOS.mm</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp">trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontCacheh">trunk/Source/WebCore/platform/graphics/FontCache.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontCascadecpp">trunk/Source/WebCore/platform/graphics/FontCascade.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontCascadeh">trunk/Source/WebCore/platform/graphics/FontCascade.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="#trunkSourceWebCoreplatformgraphicscocoaFontCacheCoreTextcpp">trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformtextTextFlagsh">trunk/Source/WebCore/platform/text/TextFlags.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTextcpp">trunk/Source/WebCore/rendering/RenderText.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasttextfontvariantshorthandexpectedtxt">trunk/LayoutTests/fast/text/font-variant-shorthand-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasttextfontvariantshorthandhtml">trunk/LayoutTests/fast/text/font-variant-shorthand.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/LayoutTests/ChangeLog        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2015-11-30  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Unify font-variant-* with font-variant shorthand
+        https://bugs.webkit.org/show_bug.cgi?id=149773
+
+        Reviewed by Darin Adler.
+
+        Update tests. Also temporarily skip existing font-features tests until
+        https://bugs.webkit.org/show_bug.cgi?id=149774 is fixed.
+
+        * css3/font-variant-parsing-expected.txt:
+        * css3/font-variant-parsing.html:
+        * fast/css/font-property-priority-expected.txt:
+        * fast/css/font-shorthand-expected.txt:
+        * fast/css/parsing-font-variant-ligatures-expected.txt:
+        * fast/css/parsing-font-variant-ligatures.html:
+        * fast/inspector-support/style-expected.txt:
+        * fast/text/font-variant-shorthand-expected.txt: Added.
+        * fast/text/font-variant-shorthand.html: Added.
+        * platform/mac/TestExpectations:
+        * platform/mac/fast/writing-mode/broken-ideograph-small-caps-expected.txt:
+
</ins><span class="cx"> 2015-11-30  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Modern IDB: After versionchange transactions abort, fire onerror on the original IDBOpenDBRequest.
</span></span></pre></div>
<a id="trunkLayoutTestscss3fontvariantparsingexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/font-variant-parsing-expected.txt (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/font-variant-parsing-expected.txt        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/LayoutTests/css3/font-variant-parsing-expected.txt        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-ligatures').cssText is &quot;normal&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-ligatures').cssText is &quot;normal&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-ligatures').cssText is &quot;common-ligatures&quot;
</span><del>-PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-ligatures').cssText is &quot;normal&quot;
</del><ins>+PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-ligatures').cssText is &quot;common-ligatures&quot;
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-ligatures').cssText is &quot;no-common-ligatures&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-ligatures').cssText is &quot;discretionary-ligatures&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-ligatures').cssText is &quot;no-discretionary-ligatures&quot;
</span><span class="lines">@@ -49,9 +49,9 @@
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-numeric').cssText is &quot;ordinal&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-numeric').cssText is &quot;slashed-zero&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-numeric').cssText is &quot;lining-nums slashed-zero&quot;
</span><del>-PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-numeric').cssText is &quot;normal&quot;
-PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-numeric').cssText is &quot;normal&quot;
-PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-numeric').cssText is &quot;normal&quot;
</del><ins>+PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-numeric').cssText is &quot;oldstyle-nums&quot;
+PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-numeric').cssText is &quot;tabular-nums&quot;
+PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-numeric').cssText is &quot;stacked-fractions&quot;
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-numeric').cssText is &quot;lining-nums proportional-nums&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-numeric').cssText is &quot;lining-nums diagonal-fractions&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-numeric').cssText is &quot;ordinal slashed-zero&quot;
</span><span class="lines">@@ -74,13 +74,13 @@
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-east-asian').cssText is &quot;full-width&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-east-asian').cssText is &quot;proportional-width&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-east-asian').cssText is &quot;ruby&quot;
</span><del>-PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-east-asian').cssText is &quot;normal&quot;
-PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-east-asian').cssText is &quot;normal&quot;
</del><ins>+PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-east-asian').cssText is &quot;jis83&quot;
+PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-east-asian').cssText is &quot;traditional&quot;
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-east-asian').cssText is &quot;traditional full-width&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-east-asian').cssText is &quot;jis04 proportional-width&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-east-asian').cssText is &quot;jis04 proportional-width ruby&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-east-asian').cssText is &quot;jis83 ruby&quot;
</span><del>-PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-east-asian').cssText is &quot;normal&quot;
</del><ins>+PASS window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('font-variant-east-asian').cssText is &quot;proportional-width&quot;
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestscss3fontvariantparsinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/font-variant-parsing.html (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/font-variant-parsing.html        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/LayoutTests/css3/font-variant-parsing.html        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx"> runTest(&quot;font-variant-ligatures&quot;, &quot;normal common-ligatures&quot;, &quot;normal&quot;);
</span><span class="cx"> runTest(&quot;font-variant-ligatures&quot;, &quot;notavalidvalue&quot;, &quot;normal&quot;);
</span><span class="cx"> runTest(&quot;font-variant-ligatures&quot;, &quot;common-ligatures&quot;, &quot;common-ligatures&quot;);
</span><del>-runTest(&quot;font-variant-ligatures&quot;, &quot;common-ligatures common-ligatures&quot;, &quot;normal&quot;);
</del><ins>+runTest(&quot;font-variant-ligatures&quot;, &quot;common-ligatures common-ligatures&quot;, &quot;common-ligatures&quot;);
</ins><span class="cx"> runTest(&quot;font-variant-ligatures&quot;, &quot;no-common-ligatures&quot;, &quot;no-common-ligatures&quot;);
</span><span class="cx"> runTest(&quot;font-variant-ligatures&quot;, &quot;discretionary-ligatures&quot;, &quot;discretionary-ligatures&quot;);
</span><span class="cx"> runTest(&quot;font-variant-ligatures&quot;, &quot;no-discretionary-ligatures&quot;, &quot;no-discretionary-ligatures&quot;);
</span><span class="lines">@@ -69,9 +69,9 @@
</span><span class="cx"> runTest(&quot;font-variant-numeric&quot;, &quot;ordinal&quot;, &quot;ordinal&quot;);
</span><span class="cx"> runTest(&quot;font-variant-numeric&quot;, &quot;slashed-zero&quot;, &quot;slashed-zero&quot;);
</span><span class="cx"> runTest(&quot;font-variant-numeric&quot;, &quot;lining-nums slashed-zero&quot;, &quot;lining-nums slashed-zero&quot;);
</span><del>-runTest(&quot;font-variant-numeric&quot;, &quot;lining-nums oldstyle-nums&quot;, &quot;normal&quot;);
-runTest(&quot;font-variant-numeric&quot;, &quot;proportional-nums tabular-nums&quot;, &quot;normal&quot;);
-runTest(&quot;font-variant-numeric&quot;, &quot;diagonal-fractions stacked-fractions&quot;, &quot;normal&quot;);
</del><ins>+runTest(&quot;font-variant-numeric&quot;, &quot;lining-nums oldstyle-nums&quot;, &quot;oldstyle-nums&quot;);
+runTest(&quot;font-variant-numeric&quot;, &quot;proportional-nums tabular-nums&quot;, &quot;tabular-nums&quot;);
+runTest(&quot;font-variant-numeric&quot;, &quot;diagonal-fractions stacked-fractions&quot;, &quot;stacked-fractions&quot;);
</ins><span class="cx"> runTest(&quot;font-variant-numeric&quot;, &quot;lining-nums proportional-nums&quot;, &quot;lining-nums proportional-nums&quot;);
</span><span class="cx"> runTest(&quot;font-variant-numeric&quot;, &quot;lining-nums diagonal-fractions&quot;, &quot;lining-nums diagonal-fractions&quot;);
</span><span class="cx"> runTest(&quot;font-variant-numeric&quot;, &quot;ordinal slashed-zero&quot;, &quot;ordinal slashed-zero&quot;);
</span><span class="lines">@@ -96,13 +96,13 @@
</span><span class="cx"> runTest(&quot;font-variant-east-asian&quot;, &quot;full-width&quot;, &quot;full-width&quot;);
</span><span class="cx"> runTest(&quot;font-variant-east-asian&quot;, &quot;proportional-width&quot;, &quot;proportional-width&quot;);
</span><span class="cx"> runTest(&quot;font-variant-east-asian&quot;, &quot;ruby&quot;, &quot;ruby&quot;);
</span><del>-runTest(&quot;font-variant-east-asian&quot;, &quot;jis78 jis83&quot;, &quot;normal&quot;);
-runTest(&quot;font-variant-east-asian&quot;, &quot;jis90 traditional&quot;, &quot;normal&quot;);
</del><ins>+runTest(&quot;font-variant-east-asian&quot;, &quot;jis78 jis83&quot;, &quot;jis83&quot;);
+runTest(&quot;font-variant-east-asian&quot;, &quot;jis90 traditional&quot;, &quot;traditional&quot;);
</ins><span class="cx"> runTest(&quot;font-variant-east-asian&quot;, &quot;full-width traditional&quot;, &quot;traditional full-width&quot;);
</span><span class="cx"> runTest(&quot;font-variant-east-asian&quot;, &quot;jis04 proportional-width&quot;, &quot;jis04 proportional-width&quot;);
</span><span class="cx"> runTest(&quot;font-variant-east-asian&quot;, &quot;jis04 proportional-width ruby&quot;, &quot;jis04 proportional-width ruby&quot;);
</span><span class="cx"> runTest(&quot;font-variant-east-asian&quot;, &quot;jis83 ruby&quot;, &quot;jis83 ruby&quot;);
</span><del>-runTest(&quot;font-variant-east-asian&quot;, &quot;full-width proportional-width&quot;, &quot;normal&quot;);
</del><ins>+runTest(&quot;font-variant-east-asian&quot;, &quot;full-width proportional-width&quot;, &quot;proportional-width&quot;);
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssfontpropertypriorityexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/font-property-priority-expected.txt (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/font-property-priority-expected.txt        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/LayoutTests/fast/css/font-property-priority-expected.txt        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> Test for rdar://problem/6065547 REGRESSION (r34879): &quot;Subject&quot; in unread emails in Yahoo mail is not shown in bold.
</span><span class="cx"> 
</span><span class="cx"> Property 'font-weight' has priority 'important'.
</span><del>-Property 'font-variant' has priority 'important'.
</del><ins>+Property 'font-variant-caps' has priority 'important'.
</ins><span class="cx"> Property 'font-style' has priority 'important'.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssfontshorthandexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/font-shorthand-expected.txt (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/font-shorthand-expected.txt        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/LayoutTests/fast/css/font-shorthand-expected.txt        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> Test
</span><span class="cx"> Font for '12px monospace':
</span><span class="cx"> font-style: normal (original property was font and property was implicitly set.)
</span><del>-font-variant: normal (original property was font and property was implicitly set.)
</del><ins>+font-variant-caps: normal (original property was font and property was implicitly set.)
</ins><span class="cx"> font-weight: normal (original property was font and property was implicitly set.)
</span><span class="cx"> font-size: 12px (original property was font)
</span><span class="cx"> line-height: normal (original property was font and property was implicitly set.)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx"> 
</span><span class="cx"> Font for '12px/24px serif':
</span><span class="cx"> font-style: normal (original property was font and property was implicitly set.)
</span><del>-font-variant: normal (original property was font and property was implicitly set.)
</del><ins>+font-variant-caps: normal (original property was font and property was implicitly set.)
</ins><span class="cx"> font-weight: normal (original property was font and property was implicitly set.)
</span><span class="cx"> font-size: 12px (original property was font)
</span><span class="cx"> line-height: 24px (original property was font)
</span><span class="lines">@@ -17,7 +17,7 @@
</span><span class="cx"> 
</span><span class="cx"> Font for 'normal 12px serif':
</span><span class="cx"> font-style: normal (original property was font)
</span><del>-font-variant: normal (original property was font and property was implicitly set.)
</del><ins>+font-variant-caps: normal (original property was font and property was implicitly set.)
</ins><span class="cx"> font-weight: normal (original property was font and property was implicitly set.)
</span><span class="cx"> font-size: 12px (original property was font)
</span><span class="cx"> line-height: normal (original property was font and property was implicitly set.)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> Font for 'normal normal 12px serif':
</span><span class="cx"> font-style: normal (original property was font)
</span><del>-font-variant: normal (original property was font)
</del><ins>+font-variant-caps: normal (original property was font)
</ins><span class="cx"> font-weight: normal (original property was font and property was implicitly set.)
</span><span class="cx"> font-size: 12px (original property was font)
</span><span class="cx"> line-height: normal (original property was font and property was implicitly set.)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> 
</span><span class="cx"> Font for 'normal normal normal 12px serif':
</span><span class="cx"> font-style: normal (original property was font)
</span><del>-font-variant: normal (original property was font)
</del><ins>+font-variant-caps: normal (original property was font)
</ins><span class="cx"> font-weight: normal (original property was font)
</span><span class="cx"> font-size: 12px (original property was font)
</span><span class="cx"> line-height: normal (original property was font and property was implicitly set.)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> 
</span><span class="cx"> Font for 'italic small-caps 12px/24px serif':
</span><span class="cx"> font-style: italic (original property was font)
</span><del>-font-variant: small-caps (original property was font)
</del><ins>+font-variant-caps: small-caps (original property was font)
</ins><span class="cx"> font-weight: normal (original property was font and property was implicitly set.)
</span><span class="cx"> font-size: 12px (original property was font)
</span><span class="cx"> line-height: 24px (original property was font)
</span><span class="lines">@@ -50,13 +50,13 @@
</span><span class="cx"> Font for 'italic bold 12px/24px serif':
</span><span class="cx"> font-style: italic (original property was font)
</span><span class="cx"> font-weight: bold (original property was font)
</span><del>-font-variant: normal (original property was font and property was implicitly set.)
</del><ins>+font-variant-caps: normal (original property was font and property was implicitly set.)
</ins><span class="cx"> font-size: 12px (original property was font)
</span><span class="cx"> line-height: 24px (original property was font)
</span><span class="cx"> font-family: serif (original property was font)
</span><span class="cx"> 
</span><span class="cx"> Font for 'small-caps bold 14px/28px Arial, sans-serif':
</span><del>-font-variant: small-caps (original property was font)
</del><ins>+font-variant-caps: small-caps (original property was font)
</ins><span class="cx"> font-weight: bold (original property was font)
</span><span class="cx"> font-style: normal (original property was font and property was implicitly set.)
</span><span class="cx"> font-size: 14px (original property was font)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> 
</span><span class="cx"> Font for 'italic small-caps bold 14px/28px Arial, sans-serif':
</span><span class="cx"> font-style: italic (original property was font)
</span><del>-font-variant: small-caps (original property was font)
</del><ins>+font-variant-caps: small-caps (original property was font)
</ins><span class="cx"> font-weight: bold (original property was font)
</span><span class="cx"> font-size: 14px (original property was font)
</span><span class="cx"> line-height: 28px (original property was font)
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssparsingfontvariantligaturesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/parsing-font-variant-ligatures-expected.txt (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/parsing-font-variant-ligatures-expected.txt        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/LayoutTests/fast/css/parsing-font-variant-ligatures-expected.txt        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> PASS: 'no-historical-ligatures' parsed as 'no-historical-ligatures' and computed to 'no-historical-ligatures'
</span><span class="cx"> PASS: 'historical-ligatures' parsed as 'historical-ligatures' and computed to 'historical-ligatures'
</span><span class="cx"> 
</span><del>-PASS: 'no-common-ligatures no-common-ligatures' parsed as '' and computed to 'normal'
</del><ins>+PASS: 'no-common-ligatures no-common-ligatures' parsed as 'no-common-ligatures' and computed to 'no-common-ligatures'
</ins><span class="cx"> PASS: 'common-ligatures no-discretionary-ligatures' parsed as 'common-ligatures no-discretionary-ligatures' and computed to 'common-ligatures no-discretionary-ligatures'
</span><span class="cx"> PASS: 'common-ligatures no-discretionary-ligatures historical-ligatures' parsed as 'common-ligatures no-discretionary-ligatures historical-ligatures' and computed to 'common-ligatures no-discretionary-ligatures historical-ligatures'
</span><span class="cx"> PASS: 'common-ligatures no-discretionary-ligatures normal' parsed as '' and computed to 'normal'
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssparsingfontvariantligatureshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/parsing-font-variant-ligatures.html (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/parsing-font-variant-ligatures.html        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/LayoutTests/fast/css/parsing-font-variant-ligatures.html        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">     test('historical-ligatures', 'historical-ligatures', 'historical-ligatures');
</span><span class="cx"> 
</span><span class="cx">     log(&quot;&quot;);
</span><del>-    test('no-common-ligatures no-common-ligatures', '', 'normal');
</del><ins>+    test('no-common-ligatures no-common-ligatures', 'no-common-ligatures', 'no-common-ligatures');
</ins><span class="cx">     test('common-ligatures no-discretionary-ligatures', 'common-ligatures no-discretionary-ligatures', 'common-ligatures no-discretionary-ligatures');
</span><span class="cx">     test('common-ligatures no-discretionary-ligatures historical-ligatures', 'common-ligatures no-discretionary-ligatures historical-ligatures', 'common-ligatures no-discretionary-ligatures historical-ligatures');
</span><span class="cx">     test('common-ligatures no-discretionary-ligatures normal', '', 'normal');
</span></span></pre></div>
<a id="trunkLayoutTestsfastinspectorsupportstyleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/inspector-support/style-expected.txt (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/inspector-support/style-expected.txt        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/LayoutTests/fast/inspector-support/style-expected.txt        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx"> margin-left: 1em (original property was margin and property was implicitly set.)
</span><span class="cx"> color: white
</span><span class="cx"> font-style: normal (original property was font and property was implicitly set.)
</span><del>-font-variant: normal (original property was font and property was implicitly set.)
</del><ins>+font-variant-caps: normal (original property was font and property was implicitly set.)
</ins><span class="cx"> font-weight: normal (original property was font and property was implicitly set.)
</span><span class="cx"> font-size: 24px (original property was font)
</span><span class="cx"> line-height: normal (original property was font and property was implicitly set.)
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontvariantshorthandexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/font-variant-shorthand-expected.txt (0 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-variant-shorthand-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/text/font-variant-shorthand-expected.txt        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+This test makes sure that the two shorthand properties which set font-variant-caps get resolved correctly.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS window.getComputedStyle(document.getElementById('t1')).getPropertyValue('font-variant-caps') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t2')).getPropertyValue('font-variant-caps') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t3')).getPropertyValue('font-variant-caps') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t4')).getPropertyValue('font-variant-caps') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t5')).getPropertyValue('font-variant-caps') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t6')).getPropertyValue('font-variant-caps') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t7')).getPropertyValue('font-variant-caps') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t8')).getPropertyValue('font-variant-caps') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t9')).getPropertyValue('font-variant-caps') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t10')).getPropertyValue('font-variant-caps') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('t11')).getPropertyValue('font-variant-caps') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('t12')).getPropertyValue('font-variant-caps') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('t13')).getPropertyValue('font-variant-caps') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('t14')).getPropertyValue('font-variant-caps') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('t15')).getPropertyValue('font-variant-caps') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('t1')).getPropertyValue('font-variant') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t2')).getPropertyValue('font-variant') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t3')).getPropertyValue('font-variant') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t4')).getPropertyValue('font-variant') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t5')).getPropertyValue('font-variant') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t6')).getPropertyValue('font-variant') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t7')).getPropertyValue('font-variant') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t8')).getPropertyValue('font-variant') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t9')).getPropertyValue('font-variant') is &quot;small-caps&quot;
+PASS window.getComputedStyle(document.getElementById('t10')).getPropertyValue('font-variant') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('t11')).getPropertyValue('font-variant') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('t12')).getPropertyValue('font-variant') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('t13')).getPropertyValue('font-variant') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('t14')).getPropertyValue('font-variant') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('t15')).getPropertyValue('font-variant') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('t16')).getPropertyValue('font-variant') is &quot;common-ligatures super small-caps lining-nums historical-forms simplified&quot;
+PASS window.getComputedStyle(document.getElementById('t17')).getPropertyValue('font-variant') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('t17')).getPropertyValue('font-variant-caps') is &quot;normal&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasttextfontvariantshorthandhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/font-variant-shorthand.html (0 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-variant-shorthand.html                                (rev 0)
+++ trunk/LayoutTests/fast/text/font-variant-shorthand.html        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -0,0 +1,136 @@
</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;style&gt;
+.test {
+    font: 30px Times;
+    display: none;
+}
+#t1 {
+    font-variant-caps: small-caps;
+}
+#t2 {
+    font-variant: small-caps;
+}
+#t3 {
+    font: small-caps 30px Times;
+}
+#t4 {
+    font-variant: normal;
+    font: small-caps 30px Times;
+}
+#t5 {
+    font-variant-caps: normal;
+    font: small-caps 30px Times;
+}
+#t6 {
+    font: 30px Times;
+    font-variant-caps: small-caps;
+}
+#t7 {
+    font-variant: normal;
+    font-variant-caps: small-caps;
+}
+#t8 {
+    font-variant-caps: normal;
+    font-variant: small-caps;
+}
+#t9 {
+    font: 30px Times;
+    font-variant: small-caps;
+}
+#t10 {
+    font-variant: small-caps;
+    font: 30px Times;
+}
+#t11 {
+    font-variant-caps: small-caps;
+    font: 30px Times;
+}
+#t12 {
+    font: small-caps 30px Times;
+    font-variant-caps: normal;
+}
+#t13 {
+    font-variant: small-caps;
+    font-variant-caps: normal;
+}
+#t14 {
+    font-variant-caps: small-caps;
+    font-variant: normal;
+}
+#t15 {
+    font: small-caps 30px Times;
+    font-variant: normal;
+}
+#t16 {
+    font-variant-ligatures: common-ligatures;
+    font-variant-position: super;
+    font-variant-caps: small-caps;
+    font-variant-numeric: lining-nums;
+    font-variant-alternates: historical-forms;
+    font-variant-east-asian: simplified;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;div class=&quot;test&quot; id=&quot;t1&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; id=&quot;t2&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; id=&quot;t3&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; id=&quot;t4&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; id=&quot;t5&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; id=&quot;t6&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; id=&quot;t7&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; id=&quot;t8&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; id=&quot;t9&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; id=&quot;t10&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; id=&quot;t11&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; id=&quot;t12&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; id=&quot;t13&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; id=&quot;t14&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; id=&quot;t15&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; id=&quot;t16&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; id=&quot;t17&quot;&gt;Hello&lt;/div&gt;
+&lt;script&gt;
+description(&quot;This test makes sure that the two shorthand properties which set font-variant-caps get resolved correctly.&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t1')).getPropertyValue('font-variant-caps')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t2')).getPropertyValue('font-variant-caps')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t3')).getPropertyValue('font-variant-caps')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t4')).getPropertyValue('font-variant-caps')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t5')).getPropertyValue('font-variant-caps')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t6')).getPropertyValue('font-variant-caps')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t7')).getPropertyValue('font-variant-caps')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t8')).getPropertyValue('font-variant-caps')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t9')).getPropertyValue('font-variant-caps')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t10')).getPropertyValue('font-variant-caps')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t11')).getPropertyValue('font-variant-caps')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t12')).getPropertyValue('font-variant-caps')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t13')).getPropertyValue('font-variant-caps')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t14')).getPropertyValue('font-variant-caps')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t15')).getPropertyValue('font-variant-caps')&quot;, &quot;normal&quot;);
+
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t1')).getPropertyValue('font-variant')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t2')).getPropertyValue('font-variant')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t3')).getPropertyValue('font-variant')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t4')).getPropertyValue('font-variant')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t5')).getPropertyValue('font-variant')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t6')).getPropertyValue('font-variant')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t7')).getPropertyValue('font-variant')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t8')).getPropertyValue('font-variant')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t9')).getPropertyValue('font-variant')&quot;, &quot;small-caps&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t10')).getPropertyValue('font-variant')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t11')).getPropertyValue('font-variant')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t12')).getPropertyValue('font-variant')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t13')).getPropertyValue('font-variant')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t14')).getPropertyValue('font-variant')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t15')).getPropertyValue('font-variant')&quot;, &quot;normal&quot;);
+
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t16')).getPropertyValue('font-variant')&quot;, &quot;common-ligatures super small-caps lining-nums historical-forms simplified&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t17')).getPropertyValue('font-variant')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('t17')).getPropertyValue('font-variant-caps')&quot;, &quot;normal&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="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/LayoutTests/platform/mac/TestExpectations        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -1397,3 +1397,10 @@
</span><span class="cx"> webkit.org/b/140217 http/tests/navigation/forward-and-cancel.html [ Pass Failure ]
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/151469 imported/w3c/html-templates/parsing-html-templates/creating-an-element-for-the-token/template-owner-document.html [ Pass Crash ]
</span><ins>+
+# Temporarily disable font-features tests until synthesis for font-variant-caps is implemented.
+webkit.org/b/149774 css3/font-feature-settings-font-face-rendering.html [ Pass Failure ImageOnlyFailure ]
+webkit.org/b/149774 css3/font-feature-settings-rendering.html [ Pass Failure ImageOnlyFailure ]
+webkit.org/b/149774 css3/font-variant-all.html [ Pass Failure ImageOnlyFailure ]
+webkit.org/b/149774 css3/font-variant-font-face-all.html [ Pass Failure ImageOnlyFailure ]
+webkit.org/b/149774 css3/font-variant-font-face-override.html [ Pass Failure ImageOnlyFailure ]
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastwritingmodebrokenideographsmallcapsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/fast/writing-mode/broken-ideograph-small-caps-expected.txt (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/writing-mode/broken-ideograph-small-caps-expected.txt        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/LayoutTests/platform/mac/fast/writing-mode/broken-ideograph-small-caps-expected.txt        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -13,8 +13,8 @@
</span><span class="cx">               text run at (21,1) width 176: &quot;\x{7B2C}\x{4E8C}\x{6BB5}\x{843D} Paragraph 2&quot;
</span><span class="cx">         RenderBlock {DIV} at (278,1) size 277x275 [bgcolor=#FFFFEE]
</span><span class="cx">           RenderBlock {P} at (14,28) size 63x219 [bgcolor=#FFAAAA] [border: none (20px solid #FF8888) none (20px solid #FF8888)]
</span><del>-            RenderText {#text} at (21,1) size 20x195
-              text run at (21,1) width 195: &quot;\x{7B2C}\x{4E00}\x{6BB5}\x{843D} Paragraph 1&quot;
</del><ins>+            RenderText {#text} at (21,1) size 20x175
+              text run at (21,1) width 175: &quot;\x{7B2C}\x{4E00}\x{6BB5}\x{843D} Paragraph 1&quot;
</ins><span class="cx">           RenderBlock {P} at (90,28) size 63x219 [bgcolor=#FFAAAA] [border: none (20px solid #FF8888) none (20px solid #FF8888)]
</span><del>-            RenderText {#text} at (21,1) size 20x195
-              text run at (21,1) width 195: &quot;\x{7B2C}\x{4E8C}\x{6BB5}\x{843D} Paragraph 2&quot;
</del><ins>+            RenderText {#text} at (21,1) size 20x181
+              text run at (21,1) width 181: &quot;\x{7B2C}\x{4E8C}\x{6BB5}\x{843D} Paragraph 2&quot;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/ChangeLog        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -1,3 +1,87 @@
</span><ins>+2015-11-30  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Unify font-variant-* with font-variant shorthand
+        https://bugs.webkit.org/show_bug.cgi?id=149773
+
+        Reviewed by Darin Adler.
+
+        This patch makes font-variant a shorthand for the following properties:
+        font-variant-ligatures
+        font-variant-position
+        font-variant-caps
+        font-variant-numeric
+        font-variant-alternates
+        font-variant-east-asian
+
+        This is consistent with the CSS Fonts Level 3 spec.
+
+        This patch also migrates the &quot;font&quot; longhand to use the font-variant-caps
+        property.
+
+        Test: fast/text/font-variant-shorthand.html
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::fontVariantEastAsianPropertyValue): Rename FontVariantEastAsian values.
+        (WebCore::fontVariantFromStyle): We must consult with the longhand properties to determine
+        font-variant computed style.
+        (WebCore::ComputedStyleExtractor::propertyValue): Don't put any-old font-variant-caps inside
+        the font shorthand.
+        * css/CSSFontSelector.cpp:
+        (WebCore::CSSFontSelector::addFontFaceRule): Guard against incorrect downcasts (due to inherit
+        of the new shorthand property).
+        * css/CSSParser.cpp: Parse font-variant as a shorthand. Also implement its &quot;normal&quot; and &quot;none&quot; values.
+        (WebCore::CSSParser::parseValue):
+        (WebCore::CSSParser::parseFont):
+        (WebCore::CSSParser::parseSystemFont):
+        (WebCore::CSSParser::parseFontVariantLigatures):
+        (WebCore::CSSParser::parseFontVariantNumeric):
+        (WebCore::CSSParser::parseFontVariantEastAsian):
+        (WebCore::CSSParser::parseFontVariant):
+        (WebCore::isValidKeywordPropertyAndValue): Deleted.
+        (WebCore::isKeywordPropertyID): Deleted.
+        * css/CSSParser.h:
+        * css/CSSPropertyNames.in: Turn font-variant into a shorthand property.
+        * css/FontVariantBuilder.h: Guard against incorrect downcasts. Also update for renamed
+        FontVariantEastAsian type.
+        (WebCore::applyValueFontVariantLigatures):
+        (WebCore::applyValueFontVariantNumeric):
+        (WebCore::applyValueFontVariantEastAsian):
+        * css/StyleProperties.cpp: Update to use the more specific property.
+        (WebCore::StyleProperties::appendFontLonghandValueIfExplicit):
+        (WebCore::StyleProperties::fontValue):
+        (WebCore::StyleProperties::asText):
+        * css/StyleResolver.cpp: Ditto.
+        (WebCore::StyleResolver::isValidCueStyleProperty):
+        * editing/EditingStyle.cpp: Ditto.
+        * editing/cocoa/HTMLConverter.mm: Ditto.
+        (HTMLConverterCaches::propertyValueForNode):
+        (HTMLConverter::computedAttributesForElement):
+        * editing/ios/EditorIOS.mm: Ditto.
+        (WebCore::Editor::removeUnchangeableStyles):
+        * html/canvas/CanvasRenderingContext2D.cpp: Ditto.
+        (WebCore::CanvasRenderingContext2D::font):
+        (WebCore::CanvasRenderingContext2D::setFont):
+        * platform/graphics/FontCache.h: Removing duplicate cache key value.
+        (WebCore::FontDescriptionKey::makeFlagsKey):
+        * platform/graphics/FontCascade.cpp: Migrate to the new font-variant-caps from the old member variable.
+        (WebCore::FontCascade::glyphDataForCharacter):
+        * platform/graphics/FontCascade.h: Ditto.
+        (WebCore::FontCascade::isSmallCaps):
+        * platform/graphics/FontDescription.cpp: Ditto.
+        (WebCore::FontDescription::FontDescription):
+        * platform/graphics/FontDescription.h: Ditto.
+        (WebCore::FontCascadeDescription::equalForTextAutoSizing):
+        (WebCore::FontDescription::smallCaps): Deleted.
+        (WebCore::FontDescription::setSmallCaps): Deleted.
+        (WebCore::FontDescription::setIsSmallCaps): Deleted.
+        (WebCore::FontDescription::operator==): Deleted.
+        * platform/graphics/cocoa/FontCacheCoreText.cpp: Rename FontVariantEastAsianWidth.
+        (WebCore::computeFeatureSettingsFromVariants):
+        * platform/text/TextFlags.h: Ditto.
+        (WebCore::FontVariantSettings::operator==):
+        * rendering/RenderText.cpp: Migrage to the new font-variant-caps from the old member variable.
+        (WebCore::RenderText::widthFromCache):
+
</ins><span class="cx"> 2015-11-30  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Modern IDB: After versionchange transactions abort, fire onerror on the original IDBOpenDBRequest.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -1382,10 +1382,10 @@
</span><span class="cx">     switch (width) {
</span><span class="cx">     case FontVariantEastAsianWidth::Normal:
</span><span class="cx">         break;
</span><del>-    case FontVariantEastAsianWidth::FullWidth:
</del><ins>+    case FontVariantEastAsianWidth::Full:
</ins><span class="cx">         valueList-&gt;append(cssValuePool.createIdentifierValue(CSSValueFullWidth));
</span><span class="cx">         break;
</span><del>-    case FontVariantEastAsianWidth::ProportionalWidth:
</del><ins>+    case FontVariantEastAsianWidth::Proportional:
</ins><span class="cx">         valueList-&gt;append(cssValuePool.createIdentifierValue(CSSValueProportionalWidth));
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="lines">@@ -1816,23 +1816,203 @@
</span><span class="cx">     return zoomAdjustedPixelValue(style.fontDescription().computedPixelSize(), style);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static Ref&lt;CSSPrimitiveValue&gt; fontStyleFromStyle(RenderStyle* style)
</del><ins>+static Ref&lt;CSSPrimitiveValue&gt; fontStyleFromStyle(RenderStyle&amp; style)
</ins><span class="cx"> {
</span><del>-    if (style-&gt;fontDescription().italic())
</del><ins>+    if (style.fontDescription().italic())
</ins><span class="cx">         return CSSValuePool::singleton().createIdentifierValue(CSSValueItalic);
</span><span class="cx">     return CSSValuePool::singleton().createIdentifierValue(CSSValueNormal);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static Ref&lt;CSSPrimitiveValue&gt; fontVariantFromStyle(RenderStyle* style)
</del><ins>+static Ref&lt;CSSValue&gt; fontVariantFromStyle(RenderStyle&amp; style)
</ins><span class="cx"> {
</span><del>-    if (style-&gt;fontDescription().smallCaps())
-        return CSSValuePool::singleton().createIdentifierValue(CSSValueSmallCaps);
-    return CSSValuePool::singleton().createIdentifierValue(CSSValueNormal);
</del><ins>+    if (style.fontDescription().variantSettings().isAllNormal())
+        return CSSValuePool::singleton().createIdentifierValue(CSSValueNormal);
+
+    auto list = CSSValueList::createSpaceSeparated();
+
+    switch (style.fontDescription().variantCommonLigatures()) {
+    case FontVariantLigatures::Normal:
+        break;
+    case FontVariantLigatures::Yes:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueCommonLigatures));
+        break;
+    case FontVariantLigatures::No:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueNoCommonLigatures));
+        break;
+    }
+
+    switch (style.fontDescription().variantDiscretionaryLigatures()) {
+    case FontVariantLigatures::Normal:
+        break;
+    case FontVariantLigatures::Yes:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueDiscretionaryLigatures));
+        break;
+    case FontVariantLigatures::No:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueNoDiscretionaryLigatures));
+        break;
+    }
+
+    switch (style.fontDescription().variantHistoricalLigatures()) {
+    case FontVariantLigatures::Normal:
+        break;
+    case FontVariantLigatures::Yes:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueHistoricalLigatures));
+        break;
+    case FontVariantLigatures::No:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueNoHistoricalLigatures));
+        break;
+    }
+
+    switch (style.fontDescription().variantContextualAlternates()) {
+    case FontVariantLigatures::Normal:
+        break;
+    case FontVariantLigatures::Yes:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueContextual));
+        break;
+    case FontVariantLigatures::No:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueNoContextual));
+        break;
+    }
+
+    switch (style.fontDescription().variantPosition()) {
+    case FontVariantPosition::Normal:
+        break;
+    case FontVariantPosition::Subscript:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueSub));
+        break;
+    case FontVariantPosition::Superscript:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueSuper));
+        break;
+    }
+
+    switch (style.fontDescription().variantCaps()) {
+    case FontVariantCaps::Normal:
+        break;
+    case FontVariantCaps::Small:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueSmallCaps));
+        break;
+    case FontVariantCaps::AllSmall:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueAllSmallCaps));
+        break;
+    case FontVariantCaps::Petite:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValuePetiteCaps));
+        break;
+    case FontVariantCaps::AllPetite:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueAllPetiteCaps));
+        break;
+    case FontVariantCaps::Unicase:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueUnicase));
+        break;
+    case FontVariantCaps::Titling:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueTitlingCaps));
+        break;
+    }
+
+    switch (style.fontDescription().variantNumericFigure()) {
+    case FontVariantNumericFigure::Normal:
+        break;
+    case FontVariantNumericFigure::LiningNumbers:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueLiningNums));
+        break;
+    case FontVariantNumericFigure::OldStyleNumbers:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueOldstyleNums));
+        break;
+    }
+
+    switch (style.fontDescription().variantNumericSpacing()) {
+    case FontVariantNumericSpacing::Normal:
+        break;
+    case FontVariantNumericSpacing::ProportionalNumbers:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueProportionalNums));
+        break;
+    case FontVariantNumericSpacing::TabularNumbers:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueTabularNums));
+        break;
+    }
+
+    switch (style.fontDescription().variantNumericFraction()) {
+    case FontVariantNumericFraction::Normal:
+        break;
+    case FontVariantNumericFraction::DiagonalFractions:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueDiagonalFractions));
+        break;
+    case FontVariantNumericFraction::StackedFractions:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueStackedFractions));
+        break;
+    }
+
+    switch (style.fontDescription().variantNumericOrdinal()) {
+    case FontVariantNumericOrdinal::Normal:
+        break;
+    case FontVariantNumericOrdinal::Yes:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueOrdinal));
+        break;
+    }
+
+    switch (style.fontDescription().variantNumericSlashedZero()) {
+    case FontVariantNumericSlashedZero::Normal:
+        break;
+    case FontVariantNumericSlashedZero::Yes:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueSlashedZero));
+        break;
+    }
+
+    switch (style.fontDescription().variantAlternates()) {
+    case FontVariantAlternates::Normal:
+        break;
+    case FontVariantAlternates::HistoricalForms:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueHistoricalForms));
+        break;
+    }
+
+    switch (style.fontDescription().variantEastAsianVariant()) {
+    case FontVariantEastAsianVariant::Normal:
+        break;
+    case FontVariantEastAsianVariant::Jis78:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueJis78));
+        break;
+    case FontVariantEastAsianVariant::Jis83:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueJis83));
+        break;
+    case FontVariantEastAsianVariant::Jis90:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueJis90));
+        break;
+    case FontVariantEastAsianVariant::Jis04:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueJis04));
+        break;
+    case FontVariantEastAsianVariant::Simplified:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueSimplified));
+        break;
+    case FontVariantEastAsianVariant::Traditional:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueTraditional));
+        break;
+    }
+
+    switch (style.fontDescription().variantEastAsianWidth()) {
+    case FontVariantEastAsianWidth::Normal:
+        break;
+    case FontVariantEastAsianWidth::Full:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueFullWidth));
+        break;
+    case FontVariantEastAsianWidth::Proportional:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueProportionalWidth));
+        break;
+    }
+
+    switch (style.fontDescription().variantEastAsianRuby()) {
+    case FontVariantEastAsianRuby::Normal:
+        break;
+    case FontVariantEastAsianRuby::Yes:
+        list.get().append(CSSValuePool::singleton().createIdentifierValue(CSSValueRuby));
+        break;
+    }
+
+    return WTF::move(list);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static Ref&lt;CSSPrimitiveValue&gt; fontWeightFromStyle(RenderStyle* style)
</del><ins>+static Ref&lt;CSSPrimitiveValue&gt; fontWeightFromStyle(RenderStyle&amp; style)
</ins><span class="cx"> {
</span><del>-    switch (style-&gt;fontDescription().weight()) {
</del><ins>+    switch (style.fontDescription().weight()) {
</ins><span class="cx">     case FontWeight100:
</span><span class="cx">         return CSSValuePool::singleton().createIdentifierValue(CSSValue100);
</span><span class="cx">     case FontWeight200:
</span><span class="lines">@@ -2517,9 +2697,12 @@
</span><span class="cx">             return cssValuePool.createValue(style-&gt;floating());
</span><span class="cx">         case CSSPropertyFont: {
</span><span class="cx">             RefPtr&lt;CSSFontValue&gt; computedFont = CSSFontValue::create();
</span><del>-            computedFont-&gt;style = fontStyleFromStyle(style.get());
-            computedFont-&gt;variant = fontVariantFromStyle(style.get());
-            computedFont-&gt;weight = fontWeightFromStyle(style.get());
</del><ins>+            computedFont-&gt;style = fontStyleFromStyle(*style);
+            if (style-&gt;fontDescription().variantCaps() == FontVariantCaps::Small)
+                computedFont-&gt;variant = CSSValuePool::singleton().createIdentifierValue(CSSValueSmallCaps);
+            else
+                computedFont-&gt;variant = CSSValuePool::singleton().createIdentifierValue(CSSValueNormal);
+            computedFont-&gt;weight = fontWeightFromStyle(*style);
</ins><span class="cx">             computedFont-&gt;size = fontSizeFromStyle(*style);
</span><span class="cx">             computedFont-&gt;lineHeight = lineHeightFromStyle(*style);
</span><span class="cx">             computedFont-&gt;family = fontFamilyFromStyle(style.get());
</span><span class="lines">@@ -2536,11 +2719,11 @@
</span><span class="cx">         case CSSPropertyFontSize:
</span><span class="cx">             return fontSizeFromStyle(*style);
</span><span class="cx">         case CSSPropertyFontStyle:
</span><del>-            return fontStyleFromStyle(style.get());
</del><ins>+            return fontStyleFromStyle(*style);
</ins><span class="cx">         case CSSPropertyFontVariant:
</span><del>-            return fontVariantFromStyle(style.get());
</del><ins>+            return fontVariantFromStyle(*style);
</ins><span class="cx">         case CSSPropertyFontWeight:
</span><del>-            return fontWeightFromStyle(style.get());
</del><ins>+            return fontWeightFromStyle(*style);
</ins><span class="cx">         case CSSPropertyFontSynthesis:
</span><span class="cx">             return fontSynthesisFromStyle(*style);
</span><span class="cx">         case CSSPropertyFontFeatureSettings: {
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontSelector.cpp        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -304,16 +304,16 @@
</span><span class="cx">     if (variantLigatures)
</span><span class="cx">         applyValueFontVariantLigatures(fontFace.get(), *variantLigatures);
</span><span class="cx"> 
</span><del>-    if (variantPosition)
</del><ins>+    if (is&lt;CSSPrimitiveValue&gt;(variantPosition.get()))
</ins><span class="cx">         fontFace-&gt;setVariantPosition(downcast&lt;CSSPrimitiveValue&gt;(*variantPosition));
</span><span class="cx"> 
</span><del>-    if (variantCaps)
</del><ins>+    if (is&lt;CSSPrimitiveValue&gt;(variantCaps.get()))
</ins><span class="cx">         fontFace-&gt;setVariantCaps(downcast&lt;CSSPrimitiveValue&gt;(*variantCaps));
</span><span class="cx"> 
</span><span class="cx">     if (variantNumeric)
</span><span class="cx">         applyValueFontVariantNumeric(fontFace.get(), *variantNumeric);
</span><span class="cx"> 
</span><del>-    if (variantAlternates)
</del><ins>+    if (is&lt;CSSPrimitiveValue&gt;(variantAlternates.get()))
</ins><span class="cx">         fontFace-&gt;setVariantAlternates(downcast&lt;CSSPrimitiveValue&gt;(*variantAlternates));
</span><span class="cx"> 
</span><span class="cx">     if (variantEastAsian)
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -1063,10 +1063,6 @@
</span><span class="cx">         if (valueID == CSSValueNormal || valueID == CSSValueHistoricalForms)
</span><span class="cx">             return true;
</span><span class="cx">         break;
</span><del>-    case CSSPropertyFontVariant: // normal | small-caps
-        if (valueID == CSSValueNormal || valueID == CSSValueSmallCaps)
-            return true;
-        break;
</del><span class="cx">     default:
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">         return false;
</span><span class="lines">@@ -1199,7 +1195,6 @@
</span><span class="cx">     case CSSPropertyFontVariantPosition:
</span><span class="cx">     case CSSPropertyFontVariantCaps:
</span><span class="cx">     case CSSPropertyFontVariantAlternates:
</span><del>-    case CSSPropertyFontVariant:
</del><span class="cx">         return true;
</span><span class="cx">     default:
</span><span class="cx">         return false;
</span><span class="lines">@@ -3120,20 +3115,37 @@
</span><span class="cx">         if (id == CSSValueNormal || id == CSSValueNone)
</span><span class="cx">             validPrimitive = true;
</span><span class="cx">         else
</span><del>-            return parseFontVariantLigatures(important);
</del><ins>+            return parseFontVariantLigatures(important, UnknownIsFailure::Yes);
</ins><span class="cx">         break;
</span><span class="cx">     case CSSPropertyFontVariantNumeric:
</span><span class="cx">         if (id == CSSValueNormal)
</span><span class="cx">             validPrimitive = true;
</span><span class="cx">         else
</span><del>-            return parseFontVariantNumeric(important);
</del><ins>+            return parseFontVariantNumeric(important, UnknownIsFailure::Yes);
</ins><span class="cx">         break;
</span><span class="cx">     case CSSPropertyFontVariantEastAsian:
</span><span class="cx">         if (id == CSSValueNormal)
</span><span class="cx">             validPrimitive = true;
</span><span class="cx">         else
</span><del>-            return parseFontVariantEastAsian(important);
</del><ins>+            return parseFontVariantEastAsian(important, UnknownIsFailure::Yes);
</ins><span class="cx">         break;
</span><ins>+    case CSSPropertyFontVariant:
+        if (id == CSSValueNormal) {
+            ShorthandScope scope(this, CSSPropertyFontVariant);
+            addProperty(CSSPropertyFontVariantLigatures, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, true);
+            addProperty(CSSPropertyFontVariantPosition, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, true);
+            addProperty(CSSPropertyFontVariantCaps, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, true);
+            addProperty(CSSPropertyFontVariantNumeric, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, true);
+            addProperty(CSSPropertyFontVariantAlternates, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, true);
+            addProperty(CSSPropertyFontVariantEastAsian, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, true);
+            return true;
+        }
+        if (id == CSSValueNone) {
+            ShorthandScope scope(this, CSSPropertyFontVariant);
+            addProperty(CSSPropertyFontVariantLigatures, CSSValuePool::singleton().createIdentifierValue(CSSValueNone), important, true);
+            return true;
+        }
+        return parseFontVariant(important);
</ins><span class="cx"> 
</span><span class="cx">     case CSSPropertyWebkitClipPath:
</span><span class="cx">         parsedValue = parseClipPath();
</span><span class="lines">@@ -6806,7 +6818,7 @@
</span><span class="cx">             fontStyleParsed = true;
</span><span class="cx">         } else if (!fontVariantParsed &amp;&amp; (value-&gt;id == CSSValueNormal || value-&gt;id == CSSValueSmallCaps)) {
</span><span class="cx">             // Font variant in the shorthand is particular, it only accepts normal or small-caps.
</span><del>-            addProperty(CSSPropertyFontVariant, CSSValuePool::singleton().createIdentifierValue(value-&gt;id), important);
</del><ins>+            addProperty(CSSPropertyFontVariantCaps, CSSValuePool::singleton().createIdentifierValue(value-&gt;id), important);
</ins><span class="cx">             fontVariantParsed = true;
</span><span class="cx">         } else if (!fontWeightParsed &amp;&amp; parseFontWeight(important))
</span><span class="cx">             fontWeightParsed = true;
</span><span class="lines">@@ -6821,7 +6833,7 @@
</span><span class="cx">     if (!fontStyleParsed)
</span><span class="cx">         addProperty(CSSPropertyFontStyle, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, true);
</span><span class="cx">     if (!fontVariantParsed)
</span><del>-        addProperty(CSSPropertyFontVariant, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, true);
</del><ins>+        addProperty(CSSPropertyFontVariantCaps, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, true);
</ins><span class="cx">     if (!fontWeightParsed)
</span><span class="cx">         addProperty(CSSPropertyFontWeight, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, true);
</span><span class="cx"> 
</span><span class="lines">@@ -6880,7 +6892,7 @@
</span><span class="cx">     Ref&lt;CSSValueList&gt; fontFamilyList = CSSValueList::createCommaSeparated();
</span><span class="cx">     fontFamilyList-&gt;append(CSSValuePool::singleton().createFontFamilyValue(fontDescription.familyAt(0), FromSystemFontID::Yes));
</span><span class="cx">     addProperty(CSSPropertyFontFamily, WTF::move(fontFamilyList), important);
</span><del>-    addProperty(CSSPropertyFontVariant, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
</del><ins>+    addProperty(CSSPropertyFontVariantCaps, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
</ins><span class="cx">     addProperty(CSSPropertyLineHeight, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -10607,13 +10619,13 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CSSParser::parseFontVariantLigatures(bool important)
</del><ins>+bool CSSParser::parseFontVariantLigatures(bool important, UnknownIsFailure unknownIsFailure)
</ins><span class="cx"> {
</span><span class="cx">     auto values = CSSValueList::createSpaceSeparated();
</span><del>-    bool sawCommonValue = false;
-    bool sawDiscretionaryValue = false;
-    bool sawHistoricalValue = false;
-    bool sawContextualValue = false;
</del><ins>+    FontVariantLigatures commonLigatures = FontVariantLigatures::Normal;
+    FontVariantLigatures discretionaryLigatures = FontVariantLigatures::Normal;
+    FontVariantLigatures historicalLigatures = FontVariantLigatures::Normal;
+    FontVariantLigatures contextualAlternates = FontVariantLigatures::Normal;
</ins><span class="cx"> 
</span><span class="cx">     for (CSSParserValue* value = m_valueList-&gt;current(); value; value = m_valueList-&gt;next()) {
</span><span class="cx">         if (value-&gt;unit != CSSPrimitiveValue::CSS_IDENT)
</span><span class="lines">@@ -10621,53 +10633,95 @@
</span><span class="cx"> 
</span><span class="cx">         switch (value-&gt;id) {
</span><span class="cx">         case CSSValueNoCommonLigatures:
</span><ins>+            commonLigatures = FontVariantLigatures::No;
+            break;
</ins><span class="cx">         case CSSValueCommonLigatures:
</span><del>-            if (sawCommonValue)
-                return false;
-            sawCommonValue = true;
-            values-&gt;append(CSSValuePool::singleton().createIdentifierValue(value-&gt;id));
</del><ins>+            commonLigatures = FontVariantLigatures::Yes;
</ins><span class="cx">             break;
</span><span class="cx">         case CSSValueNoDiscretionaryLigatures:
</span><ins>+            discretionaryLigatures = FontVariantLigatures::No;
+            break;
</ins><span class="cx">         case CSSValueDiscretionaryLigatures:
</span><del>-            if (sawDiscretionaryValue)
-                return false;
-            sawDiscretionaryValue = true;
-            values-&gt;append(CSSValuePool::singleton().createIdentifierValue(value-&gt;id));
</del><ins>+            discretionaryLigatures = FontVariantLigatures::Yes;
</ins><span class="cx">             break;
</span><span class="cx">         case CSSValueNoHistoricalLigatures:
</span><ins>+            historicalLigatures = FontVariantLigatures::No;
+            break;
</ins><span class="cx">         case CSSValueHistoricalLigatures:
</span><del>-            if (sawHistoricalValue)
-                return false;
-            sawHistoricalValue = true;
-            values-&gt;append(CSSValuePool::singleton().createIdentifierValue(value-&gt;id));
</del><ins>+            historicalLigatures = FontVariantLigatures::Yes;
</ins><span class="cx">             break;
</span><span class="cx">         case CSSValueContextual:
</span><ins>+            contextualAlternates = FontVariantLigatures::Yes;
+            break;
</ins><span class="cx">         case CSSValueNoContextual:
</span><del>-            if (sawContextualValue)
-                return false;
-            sawContextualValue = true;
-            values-&gt;append(CSSValuePool::singleton().createIdentifierValue(value-&gt;id));
</del><ins>+            contextualAlternates = FontVariantLigatures::No;
</ins><span class="cx">             break;
</span><span class="cx">         default:
</span><del>-            return false;
</del><ins>+            if (unknownIsFailure == UnknownIsFailure::Yes)
+                return false;
+            continue;
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    switch (commonLigatures) {
+    case FontVariantLigatures::Normal:
+        break;
+    case FontVariantLigatures::Yes:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueCommonLigatures));
+        break;
+    case FontVariantLigatures::No:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueNoCommonLigatures));
+        break;
+    }
+
+    switch (discretionaryLigatures) {
+    case FontVariantLigatures::Normal:
+        break;
+    case FontVariantLigatures::Yes:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueDiscretionaryLigatures));
+        break;
+    case FontVariantLigatures::No:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueNoDiscretionaryLigatures));
+        break;
+    }
+
+    switch (historicalLigatures) {
+    case FontVariantLigatures::Normal:
+        break;
+    case FontVariantLigatures::Yes:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueHistoricalLigatures));
+        break;
+    case FontVariantLigatures::No:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueNoHistoricalLigatures));
+        break;
+    }
+
+    switch (contextualAlternates) {
+    case FontVariantLigatures::Normal:
+        break;
+    case FontVariantLigatures::Yes:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueContextual));
+        break;
+    case FontVariantLigatures::No:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueNoContextual));
+        break;
+    }
+
</ins><span class="cx">     if (!values-&gt;length())
</span><del>-        return false;
</del><ins>+        return unknownIsFailure == UnknownIsFailure::No;
</ins><span class="cx"> 
</span><del>-    addProperty(CSSPropertyFontVariantLigatures, WTF::move(values), important);
</del><ins>+    addProperty(CSSPropertyFontVariantLigatures, WTF::move(values), important, false);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CSSParser::parseFontVariantNumeric(bool important)
</del><ins>+bool CSSParser::parseFontVariantNumeric(bool important, UnknownIsFailure unknownIsFailure)
</ins><span class="cx"> {
</span><span class="cx">     auto values = CSSValueList::createSpaceSeparated();
</span><del>-    bool sawFigureValue = false;
-    bool sawSpacingValue = false;
-    bool sawFractionValue = false;
-    bool sawOrdinal = false;
-    bool sawSlashedZero = false;
</del><ins>+    FontVariantNumericFigure figure = FontVariantNumericFigure::Normal;
+    FontVariantNumericSpacing spacing = FontVariantNumericSpacing::Normal;
+    FontVariantNumericFraction fraction = FontVariantNumericFraction::Normal;
+    FontVariantNumericOrdinal ordinal = FontVariantNumericOrdinal::Normal;
+    FontVariantNumericSlashedZero slashedZero = FontVariantNumericSlashedZero::Normal;
</ins><span class="cx"> 
</span><span class="cx">     for (CSSParserValue* value = m_valueList-&gt;current(); value; value = m_valueList-&gt;next()) {
</span><span class="cx">         if (value-&gt;unit != CSSPrimitiveValue::CSS_IDENT)
</span><span class="lines">@@ -10675,56 +10729,98 @@
</span><span class="cx"> 
</span><span class="cx">         switch (value-&gt;id) {
</span><span class="cx">         case CSSValueLiningNums:
</span><ins>+            figure = FontVariantNumericFigure::LiningNumbers;
+            break;
</ins><span class="cx">         case CSSValueOldstyleNums:
</span><del>-            if (sawFigureValue)
-                return false;
-            sawFigureValue = true;
-            values-&gt;append(CSSValuePool::singleton().createIdentifierValue(value-&gt;id));
</del><ins>+            figure = FontVariantNumericFigure::OldStyleNumbers;
</ins><span class="cx">             break;
</span><span class="cx">         case CSSValueProportionalNums:
</span><ins>+            spacing = FontVariantNumericSpacing::ProportionalNumbers;
+            break;
</ins><span class="cx">         case CSSValueTabularNums:
</span><del>-            if (sawSpacingValue)
-                return false;
-            sawSpacingValue = true;
-            values-&gt;append(CSSValuePool::singleton().createIdentifierValue(value-&gt;id));
</del><ins>+            spacing = FontVariantNumericSpacing::TabularNumbers;
</ins><span class="cx">             break;
</span><span class="cx">         case CSSValueDiagonalFractions:
</span><ins>+            fraction = FontVariantNumericFraction::DiagonalFractions;
+            break;
</ins><span class="cx">         case CSSValueStackedFractions:
</span><del>-            if (sawFractionValue)
-                return false;
-            sawFractionValue = true;
-            values-&gt;append(CSSValuePool::singleton().createIdentifierValue(value-&gt;id));
</del><ins>+            fraction = FontVariantNumericFraction::StackedFractions;
</ins><span class="cx">             break;
</span><span class="cx">         case CSSValueOrdinal:
</span><del>-            if (sawOrdinal)
-                return false;
-            sawOrdinal = true;
-            values-&gt;append(CSSValuePool::singleton().createIdentifierValue(value-&gt;id));
</del><ins>+            ordinal = FontVariantNumericOrdinal::Yes;
</ins><span class="cx">             break;
</span><span class="cx">         case CSSValueSlashedZero:
</span><del>-            if (sawSlashedZero)
-                return false;
-            sawSlashedZero = true;
-            values-&gt;append(CSSValuePool::singleton().createIdentifierValue(value-&gt;id));
</del><ins>+            slashedZero = FontVariantNumericSlashedZero::Yes;
</ins><span class="cx">             break;
</span><span class="cx">         default:
</span><del>-            return false;
</del><ins>+            if (unknownIsFailure == UnknownIsFailure::Yes)
+                return false;
+            continue;
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    switch (figure) {
+    case FontVariantNumericFigure::Normal:
+        break;
+    case FontVariantNumericFigure::LiningNumbers:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueLiningNums));
+        break;
+    case FontVariantNumericFigure::OldStyleNumbers:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueOldstyleNums));
+        break;
+    }
+
+    switch (spacing) {
+    case FontVariantNumericSpacing::Normal:
+        break;
+    case FontVariantNumericSpacing::ProportionalNumbers:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueProportionalNums));
+        break;
+    case FontVariantNumericSpacing::TabularNumbers:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueTabularNums));
+        break;
+    }
+
+    switch (fraction) {
+    case FontVariantNumericFraction::Normal:
+        break;
+    case FontVariantNumericFraction::DiagonalFractions:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueDiagonalFractions));
+        break;
+    case FontVariantNumericFraction::StackedFractions:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueStackedFractions));
+        break;
+    }
+
+    switch (ordinal) {
+    case FontVariantNumericOrdinal::Normal:
+        break;
+    case FontVariantNumericOrdinal::Yes:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueOrdinal));
+        break;
+    }
+
+    switch (slashedZero) {
+    case FontVariantNumericSlashedZero::Normal:
+        break;
+    case FontVariantNumericSlashedZero::Yes:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueSlashedZero));
+        break;
+    }
+
</ins><span class="cx">     if (!values-&gt;length())
</span><del>-        return false;
</del><ins>+        return unknownIsFailure == UnknownIsFailure::No;
</ins><span class="cx"> 
</span><del>-    addProperty(CSSPropertyFontVariantNumeric, WTF::move(values), important);
</del><ins>+    addProperty(CSSPropertyFontVariantNumeric, WTF::move(values), important, false);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CSSParser::parseFontVariantEastAsian(bool important)
</del><ins>+bool CSSParser::parseFontVariantEastAsian(bool important, UnknownIsFailure unknownIsFailure)
</ins><span class="cx"> {
</span><span class="cx">     auto values = CSSValueList::createSpaceSeparated();
</span><del>-    bool sawVariantValue = false;
-    bool sawWidthValue = false;
-    bool sawRuby = false;
</del><ins>+    FontVariantEastAsianVariant variant = FontVariantEastAsianVariant::Normal;
+    FontVariantEastAsianWidth width = FontVariantEastAsianWidth::Normal;
+    FontVariantEastAsianRuby ruby = FontVariantEastAsianRuby::Normal;
</ins><span class="cx"> 
</span><span class="cx">     for (CSSParserValue* value = m_valueList-&gt;current(); value; value = m_valueList-&gt;next()) {
</span><span class="cx">         if (value-&gt;unit != CSSPrimitiveValue::CSS_IDENT)
</span><span class="lines">@@ -10732,38 +10828,209 @@
</span><span class="cx"> 
</span><span class="cx">         switch (value-&gt;id) {
</span><span class="cx">         case CSSValueJis78:
</span><ins>+            variant = FontVariantEastAsianVariant::Jis78;
+            break;
</ins><span class="cx">         case CSSValueJis83:
</span><ins>+            variant = FontVariantEastAsianVariant::Jis83;
+            break;
</ins><span class="cx">         case CSSValueJis90:
</span><ins>+            variant = FontVariantEastAsianVariant::Jis90;
+            break;
</ins><span class="cx">         case CSSValueJis04:
</span><ins>+            variant = FontVariantEastAsianVariant::Jis04;
+            break;
</ins><span class="cx">         case CSSValueSimplified:
</span><ins>+            variant = FontVariantEastAsianVariant::Simplified;
+            break;
</ins><span class="cx">         case CSSValueTraditional:
</span><del>-            if (sawVariantValue)
-                return false;
-            sawVariantValue = true;
-            values-&gt;append(CSSValuePool::singleton().createIdentifierValue(value-&gt;id));
</del><ins>+            variant = FontVariantEastAsianVariant::Traditional;
</ins><span class="cx">             break;
</span><span class="cx">         case CSSValueFullWidth:
</span><ins>+            width = FontVariantEastAsianWidth::Full;
+            break;
</ins><span class="cx">         case CSSValueProportionalWidth:
</span><del>-            if (sawWidthValue)
-                return false;
-            sawWidthValue = true;
-            values-&gt;append(CSSValuePool::singleton().createIdentifierValue(value-&gt;id));
</del><ins>+            width = FontVariantEastAsianWidth::Proportional;
</ins><span class="cx">             break;
</span><span class="cx">         case CSSValueRuby:
</span><del>-            sawRuby = true;
</del><ins>+            ruby = FontVariantEastAsianRuby::Yes;
</ins><span class="cx">             break;
</span><span class="cx">         default:
</span><del>-            return false;
</del><ins>+            if (unknownIsFailure == UnknownIsFailure::Yes)
+                return false;
+            continue;
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (sawRuby)
</del><ins>+    switch (variant) {
+    case FontVariantEastAsianVariant::Normal:
+        break;
+    case FontVariantEastAsianVariant::Jis78:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueJis78));
+        break;
+    case FontVariantEastAsianVariant::Jis83:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueJis83));
+        break;
+    case FontVariantEastAsianVariant::Jis90:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueJis90));
+        break;
+    case FontVariantEastAsianVariant::Jis04:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueJis04));
+        break;
+    case FontVariantEastAsianVariant::Simplified:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueSimplified));
+        break;
+    case FontVariantEastAsianVariant::Traditional:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueTraditional));
+        break;
+    }
+
+    switch (width) {
+    case FontVariantEastAsianWidth::Normal:
+        break;
+    case FontVariantEastAsianWidth::Full:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueFullWidth));
+        break;
+    case FontVariantEastAsianWidth::Proportional:
+        values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueProportionalWidth));
+        break;
+    }
+
+    switch (ruby) {
+    case FontVariantEastAsianRuby::Normal:
+        break;
+    case FontVariantEastAsianRuby::Yes:
</ins><span class="cx">         values-&gt;append(CSSValuePool::singleton().createIdentifierValue(CSSValueRuby));
</span><ins>+    }
</ins><span class="cx"> 
</span><span class="cx">     if (!values-&gt;length())
</span><ins>+        return unknownIsFailure == UnknownIsFailure::No;
+
+    addProperty(CSSPropertyFontVariantEastAsian, WTF::move(values), important, false);
+    return true;
+}
+
+bool CSSParser::parseFontVariant(bool important)
+{
+    ShorthandScope scope(this, CSSPropertyFontVariant);
+    if (!parseFontVariantLigatures(important, UnknownIsFailure::No))
</ins><span class="cx">         return false;
</span><ins>+    m_valueList-&gt;setCurrentIndex(0);
+    if (!parseFontVariantNumeric(important, UnknownIsFailure::No))
+        return false;
+    m_valueList-&gt;setCurrentIndex(0);
+    if (!parseFontVariantEastAsian(important, UnknownIsFailure::No))
+        return false;
+    m_valueList-&gt;setCurrentIndex(0);
</ins><span class="cx"> 
</span><del>-    addProperty(CSSPropertyFontVariantEastAsian, WTF::move(values), important);
</del><ins>+    FontVariantPosition position = FontVariantPosition::Normal;
+    FontVariantCaps caps = FontVariantCaps::Normal;
+    FontVariantAlternates alternates = FontVariantAlternates::Normal;
+
+    for (CSSParserValue* value = m_valueList-&gt;current(); value; value = m_valueList-&gt;next()) {
+        if (value-&gt;unit != CSSPrimitiveValue::CSS_IDENT)
+            return false;
+
+        switch (value-&gt;id) {
+        case CSSValueNoCommonLigatures:
+        case CSSValueCommonLigatures:
+        case CSSValueNoDiscretionaryLigatures:
+        case CSSValueDiscretionaryLigatures:
+        case CSSValueNoHistoricalLigatures:
+        case CSSValueHistoricalLigatures:
+        case CSSValueContextual:
+        case CSSValueNoContextual:
+        case CSSValueLiningNums:
+        case CSSValueOldstyleNums:
+        case CSSValueProportionalNums:
+        case CSSValueTabularNums:
+        case CSSValueDiagonalFractions:
+        case CSSValueStackedFractions:
+        case CSSValueOrdinal:
+        case CSSValueSlashedZero:
+        case CSSValueJis78:
+        case CSSValueJis83:
+        case CSSValueJis90:
+        case CSSValueJis04:
+        case CSSValueSimplified:
+        case CSSValueTraditional:
+        case CSSValueFullWidth:
+        case CSSValueProportionalWidth:
+        case CSSValueRuby:
+            break;
+        case CSSValueSub:
+            position = FontVariantPosition::Subscript;
+            break;
+        case CSSValueSuper:
+            position = FontVariantPosition::Superscript;
+            break;
+        case CSSValueSmallCaps:
+            caps = FontVariantCaps::Small;
+            break;
+        case CSSValueAllSmallCaps:
+            caps = FontVariantCaps::AllSmall;
+            break;
+        case CSSValuePetiteCaps:
+            caps = FontVariantCaps::Petite;
+            break;
+        case CSSValueAllPetiteCaps:
+            caps = FontVariantCaps::AllPetite;
+            break;
+        case CSSValueUnicase:
+            caps = FontVariantCaps::Unicase;
+            break;
+        case CSSValueTitlingCaps:
+            caps = FontVariantCaps::Titling;
+            break;
+        case CSSValueHistoricalForms:
+            alternates = FontVariantAlternates::HistoricalForms;
+            break;
+        default:
+            return false;
+        }
+    }
+
+    switch (position) {
+    case FontVariantPosition::Normal:
+        break;
+    case FontVariantPosition::Subscript:
+        addProperty(CSSPropertyFontVariantPosition, CSSValuePool::singleton().createIdentifierValue(CSSValueSub), important, false);
+        break;
+    case FontVariantPosition::Superscript:
+        addProperty(CSSPropertyFontVariantPosition, CSSValuePool::singleton().createIdentifierValue(CSSValueSuper), important, false);
+        break;
+    }
+
+    switch (caps) {
+    case FontVariantCaps::Normal:
+        break;
+    case FontVariantCaps::Small:
+        addProperty(CSSPropertyFontVariantCaps, CSSValuePool::singleton().createIdentifierValue(CSSValueSmallCaps), important, false);
+        break;
+    case FontVariantCaps::AllSmall:
+        addProperty(CSSPropertyFontVariantCaps, CSSValuePool::singleton().createIdentifierValue(CSSValueAllSmallCaps), important, false);
+        break;
+    case FontVariantCaps::Petite:
+        addProperty(CSSPropertyFontVariantCaps, CSSValuePool::singleton().createIdentifierValue(CSSValuePetiteCaps), important, false);
+        break;
+    case FontVariantCaps::AllPetite:
+        addProperty(CSSPropertyFontVariantCaps, CSSValuePool::singleton().createIdentifierValue(CSSValueAllPetiteCaps), important, false);
+        break;
+    case FontVariantCaps::Unicase:
+        addProperty(CSSPropertyFontVariantCaps, CSSValuePool::singleton().createIdentifierValue(CSSValueUnicase), important, false);
+        break;
+    case FontVariantCaps::Titling:
+        addProperty(CSSPropertyFontVariantCaps, CSSValuePool::singleton().createIdentifierValue(CSSValueTitlingCaps), important, false);
+        break;
+    }
+
+    switch (alternates) {
+    case FontVariantAlternates::Normal:
+        break;
+    case FontVariantAlternates::HistoricalForms:
+        addProperty(CSSPropertyFontVariantAlternates, CSSValuePool::singleton().createIdentifierValue(CSSValueHistoricalForms), important, false);
+        break;
+    }
+
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/css/CSSParser.h        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -348,9 +348,11 @@
</span><span class="cx">     bool parseFlowThread(CSSPropertyID, bool important);
</span><span class="cx">     bool parseRegionThread(CSSPropertyID, bool important);
</span><span class="cx"> 
</span><del>-    bool parseFontVariantLigatures(bool important);
-    bool parseFontVariantNumeric(bool important);
-    bool parseFontVariantEastAsian(bool important);
</del><ins>+    enum class UnknownIsFailure { Yes, No };
+    bool parseFontVariantLigatures(bool important, UnknownIsFailure);
+    bool parseFontVariantNumeric(bool important, UnknownIsFailure);
+    bool parseFontVariantEastAsian(bool important, UnknownIsFailure);
+    bool parseFontVariant(bool important);
</ins><span class="cx"> 
</span><span class="cx">     bool parseWillChange(bool important);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -102,7 +102,6 @@
</span><span class="cx"> font-family [Inherited, Custom=All]
</span><span class="cx"> font-size [Inherited, Custom=All]
</span><span class="cx"> font-style [Inherited, FontProperty, NameForMethods=Italic]
</span><del>-font-variant [Inherited, FontProperty, NameForMethods=SmallCaps]
</del><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><span class="lines">@@ -229,7 +228,8 @@
</span><span class="cx"> float [NameForMethods=Floating]
</span><span class="cx"> flood-color [SVG, Converter=SVGColor]
</span><span class="cx"> flood-opacity [SVG, Converter=Opacity]
</span><del>-font [Inherited, Longhands=font-family|font-size|font-style|font-variant|font-weight|line-height]
</del><ins>+font [Inherited, Longhands=font-family|font-size|font-style|font-variant-caps|font-weight|line-height]
+font-variant [Inherited, Longhands=font-variant-ligatures|font-variant-position|font-variant-caps|font-variant-numeric|font-variant-alternates|font-variant-east-asian]
</ins><span class="cx"> font-stretch [SkipBuilder]
</span><span class="cx"> glyph-orientation-horizontal [Inherited, SVG, Converter=GlyphOrientation]
</span><span class="cx"> glyph-orientation-vertical [Inherited, SVG, Converter=GlyphOrientationOrAuto]
</span></span></pre></div>
<a id="trunkSourceWebCorecssFontVariantBuilderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontVariantBuilder.h (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontVariantBuilder.h        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/css/FontVariantBuilder.h        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">         }
</span><del>-    } else {
</del><ins>+    } else if (is&lt;CSSPrimitiveValue&gt;(value)) {
</ins><span class="cx">         switch (downcast&lt;CSSPrimitiveValue&gt;(value).getValueID()) {
</span><span class="cx">         case CSSValueNormal:
</span><span class="cx">             break;
</span><span class="lines">@@ -131,7 +131,7 @@
</span><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">         }
</span><del>-    } else
</del><ins>+    } else if (is&lt;CSSPrimitiveValue&gt;(value))
</ins><span class="cx">         ASSERT(downcast&lt;CSSPrimitiveValue&gt;(value).getValueID() == CSSValueNormal);
</span><span class="cx"> 
</span><span class="cx">     receiver.setVariantNumericFigure(figure);
</span><span class="lines">@@ -170,10 +170,10 @@
</span><span class="cx">                 variant = FontVariantEastAsianVariant::Traditional;
</span><span class="cx">                 break;
</span><span class="cx">             case CSSValueFullWidth:
</span><del>-                width = FontVariantEastAsianWidth::FullWidth;
</del><ins>+                width = FontVariantEastAsianWidth::Full;
</ins><span class="cx">                 break;
</span><span class="cx">             case CSSValueProportionalWidth:
</span><del>-                width = FontVariantEastAsianWidth::ProportionalWidth;
</del><ins>+                width = FontVariantEastAsianWidth::Proportional;
</ins><span class="cx">                 break;
</span><span class="cx">             case CSSValueRuby:
</span><span class="cx">                 ruby = FontVariantEastAsianRuby::Yes;
</span><span class="lines">@@ -183,7 +183,7 @@
</span><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">         }
</span><del>-    } else
</del><ins>+    } else if (is&lt;CSSPrimitiveValue&gt;(value))
</ins><span class="cx">         ASSERT(downcast&lt;CSSPrimitiveValue&gt;(value).getValueID() == CSSValueNormal);
</span><span class="cx"> 
</span><span class="cx">     receiver.setVariantEastAsianVariant(variant);
</span></span></pre></div>
<a id="trunkSourceWebCorecssStylePropertiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleProperties.cpp (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleProperties.cpp        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/css/StyleProperties.cpp        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -269,7 +269,7 @@
</span><span class="cx">     case CSSPropertyFontStyle:
</span><span class="cx">         break; // No prefix.
</span><span class="cx">     case CSSPropertyFontFamily:
</span><del>-    case CSSPropertyFontVariant:
</del><ins>+    case CSSPropertyFontVariantCaps:
</ins><span class="cx">     case CSSPropertyFontWeight:
</span><span class="cx">         prefix = ' ';
</span><span class="cx">         break;
</span><span class="lines">@@ -303,7 +303,7 @@
</span><span class="cx">     String commonValue = fontSizeProperty.value()-&gt;cssText();
</span><span class="cx">     StringBuilder result;
</span><span class="cx">     appendFontLonghandValueIfExplicit(CSSPropertyFontStyle, result, commonValue);
</span><del>-    appendFontLonghandValueIfExplicit(CSSPropertyFontVariant, result, commonValue);
</del><ins>+    appendFontLonghandValueIfExplicit(CSSPropertyFontVariantCaps, result, commonValue);
</ins><span class="cx">     appendFontLonghandValueIfExplicit(CSSPropertyFontWeight, result, commonValue);
</span><span class="cx">     if (!result.isEmpty())
</span><span class="cx">         result.append(' ');
</span><span class="lines">@@ -973,7 +973,7 @@
</span><span class="cx">             case CSSPropertyLineHeight:
</span><span class="cx">             case CSSPropertyFontSize:
</span><span class="cx">             case CSSPropertyFontStyle:
</span><del>-            case CSSPropertyFontVariant:
</del><ins>+            case CSSPropertyFontVariantCaps:
</ins><span class="cx">             case CSSPropertyFontWeight:
</span><span class="cx">                 // Don't use CSSPropertyFont because old UAs can't recognize them but are important for editing.
</span><span class="cx">                 break;
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -1805,7 +1805,7 @@
</span><span class="cx">     case CSSPropertyFontFamily:
</span><span class="cx">     case CSSPropertyFontSize:
</span><span class="cx">     case CSSPropertyFontStyle:
</span><del>-    case CSSPropertyFontVariant:
</del><ins>+    case CSSPropertyFontVariantCaps:
</ins><span class="cx">     case CSSPropertyFontWeight:
</span><span class="cx">     case CSSPropertyLineHeight:
</span><span class="cx">     case CSSPropertyOpacity:
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditingStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/EditingStyle.cpp (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/EditingStyle.cpp        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/editing/EditingStyle.cpp        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx">     CSSPropertyFontFamily,
</span><span class="cx">     CSSPropertyFontSize,
</span><span class="cx">     CSSPropertyFontStyle,
</span><del>-    CSSPropertyFontVariant,
</del><ins>+    CSSPropertyFontVariantCaps,
</ins><span class="cx">     CSSPropertyFontWeight,
</span><span class="cx">     CSSPropertyLetterSpacing,
</span><span class="cx">     CSSPropertyOrphans,
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingcocoaHTMLConvertermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -757,7 +757,7 @@
</span><span class="cx">             inherit = true;
</span><span class="cx">         break;
</span><span class="cx">     case CSSPropertyFontFamily:
</span><del>-    case CSSPropertyFontVariant:
</del><ins>+    case CSSPropertyFontVariantCaps:
</ins><span class="cx">     case CSSPropertyTextTransform:
</span><span class="cx">     case CSSPropertyTextShadow:
</span><span class="cx">     case CSSPropertyVisibility:
</span><span class="lines">@@ -1118,7 +1118,7 @@
</span><span class="cx">                 font = originalFont;
</span><span class="cx">         }
</span><span class="cx"> #if !PLATFORM(IOS) // IJB: No small caps support on iOS
</span><del>-        if (_caches-&gt;propertyValueForNode(element, CSSPropertyFontVariant) == &quot;small-caps&quot;) {
</del><ins>+        if (_caches-&gt;propertyValueForNode(element, CSSPropertyFontVariantCaps) == &quot;small-caps&quot;) {
</ins><span class="cx">             // ??? synthesize small-caps if [font isEqual:originalFont]
</span><span class="cx">             NSFont *originalFont = font;
</span><span class="cx">             font = [fontManager convertFont:font toHaveTrait:NSSmallCapsFontMask];
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingiosEditorIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ios/EditorIOS.mm (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ios/EditorIOS.mm        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/editing/ios/EditorIOS.mm        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -261,7 +261,7 @@
</span><span class="cx">     // FIXME: it'd be nice if knowledge about which styles were unchangeable was not hard-coded here.
</span><span class="cx">     defaultStyle-&gt;removeProperty(CSSPropertyFontWeight);
</span><span class="cx">     defaultStyle-&gt;removeProperty(CSSPropertyFontStyle);
</span><del>-    defaultStyle-&gt;removeProperty(CSSPropertyFontVariant);
</del><ins>+    defaultStyle-&gt;removeProperty(CSSPropertyFontVariantCaps);
</ins><span class="cx">     // FIXME: we should handle also pasted quoted text, strikethrough, etc. &lt;rdar://problem/9255115&gt;
</span><span class="cx">     defaultStyle-&gt;removeProperty(CSSPropertyTextDecoration);
</span><span class="cx">     defaultStyle-&gt;removeProperty(CSSPropertyWebkitTextDecorationsInEffect); // implements underline
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -2118,7 +2118,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (fontDescription.italic())
</span><span class="cx">         serializedFont.appendLiteral(&quot;italic &quot;);
</span><del>-    if (fontDescription.smallCaps() == FontSmallCapsOn)
</del><ins>+    if (fontDescription.variantCaps() == FontVariantCaps::Small)
</ins><span class="cx">         serializedFont.appendLiteral(&quot;small-caps &quot;);
</span><span class="cx"> 
</span><span class="cx">     serializedFont.appendNumber(fontDescription.computedPixelSize());
</span><span class="lines">@@ -2187,7 +2187,7 @@
</span><span class="cx">     StyleResolver&amp; styleResolver = canvas()-&gt;styleResolver();
</span><span class="cx">     styleResolver.applyPropertyToStyle(CSSPropertyFontFamily, parsedStyle-&gt;getPropertyCSSValue(CSSPropertyFontFamily).get(), &amp;newStyle.get());
</span><span class="cx">     styleResolver.applyPropertyToCurrentStyle(CSSPropertyFontStyle, parsedStyle-&gt;getPropertyCSSValue(CSSPropertyFontStyle).get());
</span><del>-    styleResolver.applyPropertyToCurrentStyle(CSSPropertyFontVariant, parsedStyle-&gt;getPropertyCSSValue(CSSPropertyFontVariant).get());
</del><ins>+    styleResolver.applyPropertyToCurrentStyle(CSSPropertyFontVariantCaps, parsedStyle-&gt;getPropertyCSSValue(CSSPropertyFontVariantCaps).get());
</ins><span class="cx">     styleResolver.applyPropertyToCurrentStyle(CSSPropertyFontWeight, parsedStyle-&gt;getPropertyCSSValue(CSSPropertyFontWeight).get());
</span><span class="cx"> 
</span><span class="cx">     // As described in BUG66291, setting font-size and line-height on a font may entail a CSSPrimitiveValue::computeLengthDouble call,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontCache.h (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCache.h        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/platform/graphics/FontCache.h        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -110,9 +110,8 @@
</span><span class="cx">     static std::array&lt;unsigned, 2&gt; makeFlagsKey(const FontDescription&amp; description)
</span><span class="cx">     {
</span><span class="cx">         static_assert(USCRIPT_CODE_LIMIT &lt; 0x1000, &quot;Script code must fit in an unsigned along with the other flags&quot;);
</span><del>-        unsigned first = static_cast&lt;unsigned&gt;(description.script()) &lt;&lt; 11
-            | static_cast&lt;unsigned&gt;(description.textRenderingMode()) &lt;&lt; 9
-            | static_cast&lt;unsigned&gt;(description.smallCaps()) &lt;&lt; 8
</del><ins>+        unsigned first = static_cast&lt;unsigned&gt;(description.script()) &lt;&lt; 10
+            | static_cast&lt;unsigned&gt;(description.textRenderingMode()) &lt;&lt; 8
</ins><span class="cx">             | static_cast&lt;unsigned&gt;(description.fontSynthesis()) &lt;&lt; 6
</span><span class="cx">             | static_cast&lt;unsigned&gt;(description.widthVariant()) &lt;&lt; 4
</span><span class="cx">             | static_cast&lt;unsigned&gt;(description.nonCJKGlyphOrientation()) &lt;&lt; 3
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontCascadecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontCascade.cpp (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCascade.cpp        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.cpp        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -393,7 +393,7 @@
</span><span class="cx"> GlyphData FontCascade::glyphDataForCharacter(UChar32 c, bool mirror, FontVariant variant) const
</span><span class="cx"> {
</span><span class="cx">     if (variant == AutoVariant) {
</span><del>-        if (m_fontDescription.smallCaps() &amp;&amp; !primaryFont().isSVGFont()) {
</del><ins>+        if (m_fontDescription.variantCaps() == FontVariantCaps::Small &amp;&amp; !primaryFont().isSVGFont()) {
</ins><span class="cx">             UChar32 upperC = u_toupper(c);
</span><span class="cx">             if (upperC != c) {
</span><span class="cx">                 c = upperC;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontCascadeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontCascade.h (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCascade.h        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.h        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx">     int offsetForPosition(const TextRun&amp;, float position, bool includePartialGlyphs) const;
</span><span class="cx">     void adjustSelectionRectForText(const TextRun&amp;, LayoutRect&amp; selectionRect, int from = 0, int to = -1) const;
</span><span class="cx"> 
</span><del>-    bool isSmallCaps() const { return m_fontDescription.smallCaps(); }
</del><ins>+    bool isSmallCaps() const { return m_fontDescription.variantCaps() == FontVariantCaps::Small; }
</ins><span class="cx"> 
</span><span class="cx">     float wordSpacing() const { return m_wordSpacing; }
</span><span class="cx">     float letterSpacing() const { return m_letterSpacing; }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontDescriptioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontDescription.cpp (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontDescription.cpp        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.cpp        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -52,7 +52,6 @@
</span><span class="cx">     , m_nonCJKGlyphOrientation(static_cast&lt;unsigned&gt;(NonCJKGlyphOrientation::Mixed))
</span><span class="cx">     , m_widthVariant(RegularWidth)
</span><span class="cx">     , m_italic(FontItalicOff)
</span><del>-    , m_smallCaps(FontSmallCapsOff)
</del><span class="cx">     , m_weight(FontWeightNormal)
</span><span class="cx">     , m_renderingMode(static_cast&lt;unsigned&gt;(FontRenderingMode::Normal))
</span><span class="cx">     , m_textRendering(AutoTextRendering)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontDescriptionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontDescription.h (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontDescription.h        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.h        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -48,7 +48,6 @@
</span><span class="cx">     float computedSize() const { return m_computedSize; }
</span><span class="cx">     FontItalic italic() const { return static_cast&lt;FontItalic&gt;(m_italic); }
</span><span class="cx">     int computedPixelSize() const { return int(m_computedSize + 0.5f); }
</span><del>-    FontSmallCaps smallCaps() const { return static_cast&lt;FontSmallCaps&gt;(m_smallCaps); }
</del><span class="cx">     FontWeight weight() const { return static_cast&lt;FontWeight&gt;(m_weight); }
</span><span class="cx">     FontWeight lighterWeight() const;
</span><span class="cx">     FontWeight bolderWeight() const;
</span><span class="lines">@@ -99,8 +98,6 @@
</span><span class="cx">     void setComputedSize(float s) { m_computedSize = clampToFloat(s); }
</span><span class="cx">     void setItalic(FontItalic i) { m_italic = i; }
</span><span class="cx">     void setIsItalic(bool i) { setItalic(i ? FontItalicOn : FontItalicOff); }
</span><del>-    void setSmallCaps(FontSmallCaps c) { m_smallCaps = c; }
-    void setIsSmallCaps(bool c) { setSmallCaps(c ? FontSmallCapsOn : FontSmallCapsOff); }
</del><span class="cx">     void setWeight(FontWeight w) { m_weight = w; }
</span><span class="cx">     void setRenderingMode(FontRenderingMode mode) { m_renderingMode = static_cast&lt;unsigned&gt;(mode); }
</span><span class="cx">     void setTextRenderingMode(TextRenderingMode rendering) { m_textRendering = rendering; }
</span><span class="lines">@@ -137,7 +134,6 @@
</span><span class="cx">     unsigned m_nonCJKGlyphOrientation : 1; // NonCJKGlyphOrientation - Only used by vertical text. Determines the default orientation for non-ideograph glyphs.
</span><span class="cx">     unsigned m_widthVariant : 2; // FontWidthVariant
</span><span class="cx">     unsigned m_italic : 1; // FontItalic
</span><del>-    unsigned m_smallCaps : 1; // FontSmallCaps
</del><span class="cx">     unsigned m_weight : 8; // FontWeight
</span><span class="cx">     unsigned m_renderingMode : 1; // Used to switch between CG and GDI text on Windows.
</span><span class="cx">     unsigned m_textRendering : 2; // TextRenderingMode
</span><span class="lines">@@ -164,7 +160,6 @@
</span><span class="cx"> {
</span><span class="cx">     return m_computedSize == other.m_computedSize
</span><span class="cx">         &amp;&amp; m_italic == other.m_italic
</span><del>-        &amp;&amp; m_smallCaps == other.m_smallCaps
</del><span class="cx">         &amp;&amp; m_weight == other.m_weight
</span><span class="cx">         &amp;&amp; m_renderingMode == other.m_renderingMode
</span><span class="cx">         &amp;&amp; m_textRendering == other.m_textRendering
</span><span class="lines">@@ -251,7 +246,7 @@
</span><span class="cx">     {
</span><span class="cx">         return familiesEqualForTextAutoSizing(other)
</span><span class="cx">             &amp;&amp; m_specifiedSize == other.m_specifiedSize
</span><del>-            &amp;&amp; smallCaps() == other.smallCaps()
</del><ins>+            &amp;&amp; variantSettings() == other.variantSettings()
</ins><span class="cx">             &amp;&amp; m_isAbsoluteSize == other.m_isAbsoluteSize;
</span><span class="cx">     }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaFontCacheCoreTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -342,10 +342,10 @@
</span><span class="cx">     switch (variantSettings.eastAsianWidth) {
</span><span class="cx">     case FontVariantEastAsianWidth::Normal:
</span><span class="cx">         break;
</span><del>-    case FontVariantEastAsianWidth::FullWidth:
</del><ins>+    case FontVariantEastAsianWidth::Full:
</ins><span class="cx">         result.add(fontFeatureTag(&quot;fwid&quot;), 1);
</span><span class="cx">         break;
</span><del>-    case FontVariantEastAsianWidth::ProportionalWidth:
</del><ins>+    case FontVariantEastAsianWidth::Proportional:
</ins><span class="cx">         result.add(fontFeatureTag(&quot;pwid&quot;), 1);
</span><span class="cx">         break;
</span><span class="cx">     default:
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformtextTextFlagsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/TextFlags.h (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/TextFlags.h        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/platform/text/TextFlags.h        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -139,8 +139,8 @@
</span><span class="cx"> 
</span><span class="cx"> enum class FontVariantEastAsianWidth {
</span><span class="cx">     Normal,
</span><del>-    FullWidth,
-    ProportionalWidth
</del><ins>+    Full,
+    Proportional
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> enum class FontVariantEastAsianRuby {
</span><span class="lines">@@ -221,6 +221,25 @@
</span><span class="cx">             &amp;&amp; eastAsianRuby == FontVariantEastAsianRuby::Normal;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    bool operator==(const FontVariantSettings&amp; other)
+    {
+        return commonLigatures == other.commonLigatures
+            &amp;&amp; discretionaryLigatures == other.discretionaryLigatures
+            &amp;&amp; historicalLigatures == other.historicalLigatures
+            &amp;&amp; contextualAlternates == other.contextualAlternates
+            &amp;&amp; position == other.position
+            &amp;&amp; caps == other.caps
+            &amp;&amp; numericFigure == other.numericFigure
+            &amp;&amp; numericSpacing == other.numericSpacing
+            &amp;&amp; numericFraction == other.numericFraction
+            &amp;&amp; numericOrdinal == other.numericOrdinal
+            &amp;&amp; numericSlashedZero == other.numericSlashedZero
+            &amp;&amp; alternates == other.alternates
+            &amp;&amp; eastAsianVariant == other.eastAsianVariant
+            &amp;&amp; eastAsianWidth == other.eastAsianWidth
+            &amp;&amp; eastAsianRuby == other.eastAsianRuby;
+    }
+
</ins><span class="cx">     FontVariantLigatures commonLigatures;
</span><span class="cx">     FontVariantLigatures discretionaryLigatures;
</span><span class="cx">     FontVariantLigatures historicalLigatures;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderText.cpp (192818 => 192819)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderText.cpp        2015-11-30 21:12:43 UTC (rev 192818)
+++ trunk/Source/WebCore/rendering/RenderText.cpp        2015-11-30 21:20:32 UTC (rev 192819)
</span><span class="lines">@@ -460,7 +460,7 @@
</span><span class="cx">             return combineText.combinedTextWidth(f);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (f.isFixedPitch() &amp;&amp; !f.isSmallCaps() &amp;&amp; m_isAllASCII &amp;&amp; (!glyphOverflow || !glyphOverflow-&gt;computeBounds)) {
</del><ins>+    if (f.isFixedPitch() &amp;&amp; f.fontDescription().variantSettings().isAllNormal() &amp;&amp; m_isAllASCII &amp;&amp; (!glyphOverflow || !glyphOverflow-&gt;computeBounds)) {
</ins><span class="cx">         float monospaceCharacterWidth = f.spaceWidth();
</span><span class="cx">         float w = 0;
</span><span class="cx">         bool isSpace;
</span></span></pre>
</div>
</div>

</body>
</html>