<!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>[192732] 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/192732">192732</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2015-11-22 09:06:35 -0800 (Sun, 22 Nov 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Font selection should not consult font-variant property
https://bugs.webkit.org/show_bug.cgi?id=151537

Reviewed by Simon Fraser.

Source/WebCore:

In section 4.7 of the CSS Fonts Level 3 spec, it says &quot;[The font-variant and
font-feature-settings] do not affect font selection.&quot;

All the other browsers (Chrome, Firefox, and Edge) all obey the spec here. We
are the only one who misbehaves. This patch aligns our behavior with the other
browsers.

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

* css/CSSFontSelector.cpp:
(WebCore::computeTraitsMask): Deleted.
(WebCore::compareFontFaces): Deleted.
(WebCore::CSSFontSelector::getFontFace): Deleted.
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::createFontFaceRule):
(WebCore::CSSParser::CSSParser): Deleted.
(WebCore::CSSParser::parseValue): Deleted.
(WebCore::CSSParser::parseDeclaration): Deleted.
(WebCore::CSSParser::clearProperties): Deleted.
(WebCore::CSSParser::parseFontVariant): Deleted.
(WebCore::CSSParser::createStyleRule): Deleted.
(WebCore::CSSParser::deleteFontFaceOnlyValues): Deleted.
* css/CSSParser.h:
* platform/graphics/FontDescription.cpp:
(WebCore::FontDescription::traitsMask): Deleted.
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::traitsInFamilyEnumProc):
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::toTraitsMask):
* platform/text/TextFlags.h:

LayoutTests:

* fast/text/font-selection-font-variant-expected.html: Added.
* fast/text/font-selection-font-variant.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#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="#trunkSourceWebCoreplatformgraphicsFontDescriptioncpp">trunk/Source/WebCore/platform/graphics/FontDescription.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaFontCacheCoreTextcpp">trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinFontCacheWincpp">trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformtextTextFlagsh">trunk/Source/WebCore/platform/text/TextFlags.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasttextfontselectionfontvariantexpectedhtml">trunk/LayoutTests/fast/text/font-selection-font-variant-expected.html</a></li>
<li><a href="#trunkLayoutTestsfasttextfontselectionfontvarianthtml">trunk/LayoutTests/fast/text/font-selection-font-variant.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (192731 => 192732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-11-22 10:48:48 UTC (rev 192731)
+++ trunk/LayoutTests/ChangeLog        2015-11-22 17:06:35 UTC (rev 192732)
</span><span class="lines">@@ -1 +1,11 @@
</span><ins>+2015-11-22  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Font selection should not consult font-variant property
+        https://bugs.webkit.org/show_bug.cgi?id=151537
+
+        Reviewed by Simon Fraser.
+
+        * fast/text/font-selection-font-variant-expected.html: Added.
+        * fast/text/font-selection-font-variant.html: Added.
+
</ins><span class="cx"> == Rolled over to ChangeLog-2015-11-21 ==
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontselectionfontvariantexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/font-selection-font-variant-expected.html (0 => 192732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-selection-font-variant-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/text/font-selection-font-variant-expected.html        2015-11-22 17:06:35 UTC (rev 192732)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+@font-face {
+    font-family: &quot;Test1&quot;;
+    src: url(&quot;../writing-mode/resources/MakibaFont13.ttf&quot;) format(&quot;truetype&quot;);
+}
+@font-face {
+    font-family: &quot;Test2&quot;;
+    src: url(&quot;../../resources/Ahem.ttf&quot;) format(&quot;truetype&quot;);
+}
+.test {
+    display: inline-block;
+    font-size: 40px;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p&gt;This test makes sure that font-variant is not consulted when performing font selection.&lt;/p&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test2;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test2;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test2; font-variant: small-caps;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test2; font-variant: small-caps;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test2;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test2;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test2; font-variant: small-caps;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test2; font-variant: small-caps;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test1;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test1;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test1; font-variant: small-caps;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test1; font-variant: small-caps;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Times;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Times; font-variant: small-caps;&quot;&gt;Hello&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontselectionfontvarianthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/font-selection-font-variant.html (0 => 192732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-selection-font-variant.html                                (rev 0)
+++ trunk/LayoutTests/fast/text/font-selection-font-variant.html        2015-11-22 17:06:35 UTC (rev 192732)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+@font-face {
+    font-family: &quot;Test1&quot;;
+    src: url(&quot;../writing-mode/resources/MakibaFont13.ttf&quot;) format(&quot;truetype&quot;);
+}
+@font-face {
+    font-family: &quot;Test1&quot;;
+    src: url(&quot;../../resources/Ahem.ttf&quot;) format(&quot;truetype&quot;);
+    font-variant: small-caps;
+}
+@font-face {
+    font-family: &quot;Test2&quot;;
+    src: url(&quot;../writing-mode/resources/MakibaFont13.ttf&quot;) format(&quot;truetype&quot;);
+    font-variant: small-caps;
+}
+@font-face {
+    font-family: &quot;Test2&quot;;
+    src: url(&quot;../../resources/Ahem.ttf&quot;) format(&quot;truetype&quot;);
+}
+@font-face {
+    font-family: &quot;Test3&quot;;
+    src: url(&quot;../writing-mode/resources/MakibaFont13.ttf&quot;) format(&quot;truetype&quot;);
+}
+@font-face {
+    font-family: &quot;Test3SmallCaps&quot;;
+    src: url(&quot;../writing-mode/resources/MakibaFont13.ttf&quot;) format(&quot;truetype&quot;);
+    font-variant: small-caps;
+}
+.test {
+    display: inline-block;
+    font-size: 40px;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p&gt;This test makes sure that font-variant is not consulted when performing font selection.&lt;/p&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test1;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test1;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test1; font-variant: small-caps;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test1; font-variant: small-caps;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test2;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test2;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test2; font-variant: small-caps;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test2; font-variant: small-caps;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test3;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test3SmallCaps;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test3; font-variant: small-caps;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Test3SmallCaps; font-variant: small-caps;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Times;&quot;&gt;Hello&lt;/div&gt;
+&lt;div class=&quot;test&quot; style=&quot;font-family: Times; font-variant: small-caps;&quot;&gt;Hello&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (192731 => 192732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-11-22 10:48:48 UTC (rev 192731)
+++ trunk/Source/WebCore/ChangeLog        2015-11-22 17:06:35 UTC (rev 192732)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2015-11-22  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Font selection should not consult font-variant property
+        https://bugs.webkit.org/show_bug.cgi?id=151537
+
+        Reviewed by Simon Fraser.
+
+        In section 4.7 of the CSS Fonts Level 3 spec, it says &quot;[The font-variant and
+        font-feature-settings] do not affect font selection.&quot;
+
+        All the other browsers (Chrome, Firefox, and Edge) all obey the spec here. We
+        are the only one who misbehaves. This patch aligns our behavior with the other
+        browsers.
+
+        Test: fast/text/font-selection-font-variant.html
+
+        * css/CSSFontSelector.cpp:
+        (WebCore::computeTraitsMask): Deleted.
+        (WebCore::compareFontFaces): Deleted.
+        (WebCore::CSSFontSelector::getFontFace): Deleted.
+        * css/CSSParser.cpp:
+        (WebCore::isValidKeywordPropertyAndValue):
+        (WebCore::isKeywordPropertyID):
+        (WebCore::CSSParser::createFontFaceRule):
+        (WebCore::CSSParser::CSSParser): Deleted.
+        (WebCore::CSSParser::parseValue): Deleted.
+        (WebCore::CSSParser::parseDeclaration): Deleted.
+        (WebCore::CSSParser::clearProperties): Deleted.
+        (WebCore::CSSParser::parseFontVariant): Deleted.
+        (WebCore::CSSParser::createStyleRule): Deleted.
+        (WebCore::CSSParser::deleteFontFaceOnlyValues): Deleted.
+        * css/CSSParser.h:
+        * platform/graphics/FontDescription.cpp:
+        (WebCore::FontDescription::traitsMask): Deleted.
+        * platform/graphics/win/FontCacheWin.cpp:
+        (WebCore::traitsInFamilyEnumProc):
+        * platform/graphics/cocoa/FontCacheCoreText.cpp:
+        (WebCore::toTraitsMask):
+        * platform/text/TextFlags.h:
+
</ins><span class="cx"> 2015-11-22  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r192727.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (192731 => 192732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontSelector.cpp        2015-11-22 10:48:48 UTC (rev 192731)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp        2015-11-22 17:06:35 UTC (rev 192732)
</span><span class="lines">@@ -149,35 +149,6 @@
</span><span class="cx">     } else
</span><span class="cx">         traitsMask |= FontWeight400Mask;
</span><span class="cx"> 
</span><del>-    if (RefPtr&lt;CSSValue&gt; fontVariant = style.getPropertyCSSValue(CSSPropertyFontVariant)) {
-        // font-variant descriptor can be a value list.
-        if (fontVariant-&gt;isPrimitiveValue()) {
-            RefPtr&lt;CSSValueList&gt; list = CSSValueList::createCommaSeparated();
-            list-&gt;append(fontVariant.releaseNonNull());
-            fontVariant = list.releaseNonNull();
-        } else if (!is&lt;CSSValueList&gt;(*fontVariant))
-            return Nullopt;
-
-        CSSValueList&amp; variantList = downcast&lt;CSSValueList&gt;(*fontVariant);
-        unsigned numVariants = variantList.length();
-        if (!numVariants)
-            return Nullopt;
-
-        for (unsigned i = 0; i &lt; numVariants; ++i) {
-            switch (downcast&lt;CSSPrimitiveValue&gt;(variantList.itemWithoutBoundsCheck(i))-&gt;getValueID()) {
-                case CSSValueNormal:
-                    traitsMask |= FontVariantNormalMask;
-                    break;
-                case CSSValueSmallCaps:
-                    traitsMask |= FontVariantSmallCapsMask;
-                    break;
-                default:
-                    break;
-            }
-        }
-    } else
-        traitsMask |= FontVariantMask;
-
</del><span class="cx">     return static_cast&lt;FontTraitsMask&gt;(traitsMask);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -427,22 +398,6 @@
</span><span class="cx">     FontTraitsMask firstTraitsMask = first.traitsMask();
</span><span class="cx">     FontTraitsMask secondTraitsMask = second.traitsMask();
</span><span class="cx"> 
</span><del>-    bool firstHasDesiredVariant = firstTraitsMask &amp; desiredTraitsMaskForComparison &amp; FontVariantMask;
-    bool secondHasDesiredVariant = secondTraitsMask &amp; desiredTraitsMaskForComparison &amp; FontVariantMask;
-
-    if (firstHasDesiredVariant != secondHasDesiredVariant)
-        return firstHasDesiredVariant;
-
-    // We need to check font-variant css property for CSS2.1 compatibility.
-    if ((desiredTraitsMaskForComparison &amp; FontVariantSmallCapsMask) &amp;&amp; !first.isLocalFallback() &amp;&amp; !second.isLocalFallback()) {
-        // Prefer a font that has indicated that it can only support small-caps to a font that claims to support
-        // all variants.  The specialized font is more likely to be true small-caps and not require synthesis.
-        bool firstRequiresSmallCaps = (firstTraitsMask &amp; FontVariantSmallCapsMask) &amp;&amp; !(firstTraitsMask &amp; FontVariantNormalMask);
-        bool secondRequiresSmallCaps = (secondTraitsMask &amp; FontVariantSmallCapsMask) &amp;&amp; !(secondTraitsMask &amp; FontVariantNormalMask);
-        if (firstRequiresSmallCaps != secondRequiresSmallCaps)
-            return firstRequiresSmallCaps;
-    }
-
</del><span class="cx">     bool firstHasDesiredStyle = firstTraitsMask &amp; desiredTraitsMaskForComparison &amp; FontStyleMask;
</span><span class="cx">     bool secondHasDesiredStyle = secondTraitsMask &amp; desiredTraitsMaskForComparison &amp; FontStyleMask;
</span><span class="cx"> 
</span><span class="lines">@@ -539,14 +494,6 @@
</span><span class="cx">             unsigned candidateTraitsMask = candidate.traitsMask();
</span><span class="cx">             if ((traitsMask &amp; FontStyleNormalMask) &amp;&amp; !(candidateTraitsMask &amp; FontStyleNormalMask))
</span><span class="cx">                 continue;
</span><del>-            if ((traitsMask &amp; FontVariantNormalMask) &amp;&amp; !(candidateTraitsMask &amp; FontVariantNormalMask))
-                continue;
-#if ENABLE(SVG_FONTS)
-            // For SVG Fonts that specify that they only support the &quot;normal&quot; variant, we will assume they are incapable
-            // of small-caps synthesis and just ignore the font face as a candidate.
-            if (candidate.hasSVGFontFaceSource() &amp;&amp; (traitsMask &amp; FontVariantSmallCapsMask) &amp;&amp; !(candidateTraitsMask &amp; FontVariantSmallCapsMask))
-                continue;
-#endif
</del><span class="cx">             candidateFontFaces.append(candidate);
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -556,8 +503,6 @@
</span><span class="cx">                 unsigned candidateTraitsMask = candidate-&gt;traitsMask();
</span><span class="cx">                 if ((traitsMask &amp; FontStyleNormalMask) &amp;&amp; !(candidateTraitsMask &amp; FontStyleNormalMask))
</span><span class="cx">                     continue;
</span><del>-                if ((traitsMask &amp; FontVariantNormalMask) &amp;&amp; !(candidateTraitsMask &amp; FontVariantNormalMask))
-                    continue;
</del><span class="cx">                 candidateFontFaces.append(candidate);
</span><span class="cx">             }
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (192731 => 192732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2015-11-22 10:48:48 UTC (rev 192731)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2015-11-22 17:06:35 UTC (rev 192732)
</span><span class="lines">@@ -323,7 +323,6 @@
</span><span class="cx">     , m_inParseShorthand(0)
</span><span class="cx">     , m_currentShorthand(CSSPropertyInvalid)
</span><span class="cx">     , m_implicitShorthand(false)
</span><del>-    , m_hasFontFaceOnlyValues(false)
</del><span class="cx">     , m_hadSyntacticallyValidCSSRule(false)
</span><span class="cx">     , m_logErrors(false)
</span><span class="cx">     , m_ignoreErrorsInDeclaration(false)
</span><span class="lines">@@ -1064,6 +1063,10 @@
</span><span class="cx">         if (valueID == CSSValueNormal || valueID == CSSValueHistoricalForms)
</span><span class="cx">             return true;
</span><span class="cx">         break;
</span><ins>+    case CSSPropertyFontVariant: // normal | small-caps
+        if (valueID == CSSValueNormal || valueID == CSSValueSmallCaps)
+            return true;
+        break;
</ins><span class="cx">     default:
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">         return false;
</span><span class="lines">@@ -1196,6 +1199,7 @@
</span><span class="cx">     case CSSPropertyFontVariantPosition:
</span><span class="cx">     case CSSPropertyFontVariantCaps:
</span><span class="cx">     case CSSPropertyFontVariantAlternates:
</span><ins>+    case CSSPropertyFontVariant:
</ins><span class="cx">         return true;
</span><span class="cx">     default:
</span><span class="cx">         return false;
</span><span class="lines">@@ -1400,8 +1404,6 @@
</span><span class="cx">     m_rule = nullptr;
</span><span class="cx"> 
</span><span class="cx">     ParseResult result = ParseResult::Error;
</span><del>-    if (m_hasFontFaceOnlyValues)
-        deleteFontFaceOnlyValues();
</del><span class="cx"> 
</span><span class="cx">     if (!m_parsedProperties.isEmpty()) {
</span><span class="cx">         result = declaration-&gt;addParsedProperties(m_parsedProperties) ? ParseResult::Changed : ParseResult::Unchanged;
</span><span class="lines">@@ -1494,9 +1496,6 @@
</span><span class="cx">     cssyyparse(this);
</span><span class="cx">     m_rule = nullptr;
</span><span class="cx"> 
</span><del>-    if (m_hasFontFaceOnlyValues)
-        deleteFontFaceOnlyValues();
-
</del><span class="cx">     Ref&lt;ImmutableStyleProperties&gt; style = createStyleProperties();
</span><span class="cx">     clearProperties();
</span><span class="cx">     return style;
</span><span class="lines">@@ -1521,8 +1520,6 @@
</span><span class="cx">     m_rule = nullptr;
</span><span class="cx"> 
</span><span class="cx">     bool ok = false;
</span><del>-    if (m_hasFontFaceOnlyValues)
-        deleteFontFaceOnlyValues();
</del><span class="cx">     if (!m_parsedProperties.isEmpty()) {
</span><span class="cx">         ok = true;
</span><span class="cx">         declaration-&gt;addParsedProperties(m_parsedProperties);
</span><span class="lines">@@ -1699,7 +1696,6 @@
</span><span class="cx"> {
</span><span class="cx">     m_parsedProperties.clear();
</span><span class="cx">     m_numParsedPropertiesBeforeMarginBox = INVALID_NUM_PARSED_PROPERTIES;
</span><del>-    m_hasFontFaceOnlyValues = false;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> URL CSSParser::completeURL(const CSSParserContext&amp; context, const String&amp; url)
</span><span class="lines">@@ -2371,9 +2367,6 @@
</span><span class="cx">     case CSSPropertyFontSize:
</span><span class="cx">         return parseFontSize(important);
</span><span class="cx"> 
</span><del>-    case CSSPropertyFontVariant:         // normal | small-caps | inherit
-        return parseFontVariant(important);
-
</del><span class="cx">     case CSSPropertyVerticalAlign:
</span><span class="cx">         // baseline | sub | super | top | text-top | middle | bottom | text-bottom |
</span><span class="cx">         // &lt;percentage&gt; | &lt;length&gt; | inherit
</span><span class="lines">@@ -7034,53 +7027,6 @@
</span><span class="cx">     return validPrimitive;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CSSParser::parseFontVariant(bool important)
-{
-    RefPtr&lt;CSSValueList&gt; values;
-    if (m_valueList-&gt;size() &gt; 1)
-        values = CSSValueList::createCommaSeparated();
-    CSSParserValue* val;
-    bool expectComma = false;
-    while ((val = m_valueList-&gt;current())) {
-        RefPtr&lt;CSSPrimitiveValue&gt; parsedValue;
-        if (!expectComma) {
-            expectComma = true;
-            if (val-&gt;id == CSSValueNormal || val-&gt;id == CSSValueSmallCaps)
-                parsedValue = CSSValuePool::singleton().createIdentifierValue(val-&gt;id);
-            else if (val-&gt;id == CSSValueAll &amp;&amp; !values) {
-                // 'all' is only allowed in @font-face and with no other values. Make a value list to
-                // indicate that we are in the @font-face case.
-                values = CSSValueList::createCommaSeparated();
-                parsedValue = CSSValuePool::singleton().createIdentifierValue(val-&gt;id);
-            }
-        } else if (val-&gt;unit == CSSParserValue::Operator &amp;&amp; val-&gt;iValue == ',') {
-            expectComma = false;
-            m_valueList-&gt;next();
-            continue;
-        }
-
-        if (!parsedValue)
-            return false;
-
-        m_valueList-&gt;next();
-
-        if (values)
-            values-&gt;append(parsedValue.releaseNonNull());
-        else {
-            addProperty(CSSPropertyFontVariant, parsedValue.release(), important);
-            return true;
-        }
-    }
-
-    if (values &amp;&amp; values-&gt;length()) {
-        m_hasFontFaceOnlyValues = true;
-        addProperty(CSSPropertyFontVariant, values.release(), important);
-        return true;
-    }
-
-    return false;
-}
-
</del><span class="cx"> static CSSValueID createFontWeightValueKeyword(int weight)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!(weight % 100) &amp;&amp; weight &gt;= 100 &amp;&amp; weight &lt;= 900);
</span><span class="lines">@@ -12642,8 +12588,6 @@
</span><span class="cx">     if (selectors) {
</span><span class="cx">         m_allowImportRules = false;
</span><span class="cx">         m_allowNamespaceDeclarations = false;
</span><del>-        if (m_hasFontFaceOnlyValues)
-            deleteFontFaceOnlyValues();
</del><span class="cx">         rule = StyleRule::create(m_lastSelectorLineNumber, createStyleProperties());
</span><span class="cx">         rule-&gt;parserAdoptSelectorVector(*selectors);
</span><span class="cx">         processAndAddNewRuleToSourceTreeIfNeeded();
</span><span class="lines">@@ -12658,9 +12602,7 @@
</span><span class="cx">     m_allowImportRules = m_allowNamespaceDeclarations = false;
</span><span class="cx">     for (unsigned i = 0; i &lt; m_parsedProperties.size(); ++i) {
</span><span class="cx">         CSSProperty&amp; property = m_parsedProperties[i];
</span><del>-        if (property.id() == CSSPropertyFontVariant &amp;&amp; property.value()-&gt;isPrimitiveValue())
-            property.wrapValueInCommaSeparatedList();
-        else if (property.id() == CSSPropertyFontFamily &amp;&amp; (!is&lt;CSSValueList&gt;(*property.value()) || downcast&lt;CSSValueList&gt;(*property.value()).length() != 1)) {
</del><ins>+        if (property.id() == CSSPropertyFontFamily &amp;&amp; (!is&lt;CSSValueList&gt;(*property.value()) || downcast&lt;CSSValueList&gt;(*property.value()).length() != 1)) {
</ins><span class="cx">             // Unlike font-family property, font-family descriptor in @font-face rule
</span><span class="cx">             // has to be a value list with exactly one family name. It cannot have a
</span><span class="cx">             // have 'initial' value and cannot 'inherit' from parent.
</span><span class="lines">@@ -12818,14 +12760,6 @@
</span><span class="cx">     m_numParsedPropertiesBeforeMarginBox = INVALID_NUM_PARSED_PROPERTIES;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSParser::deleteFontFaceOnlyValues()
-{
-    ASSERT(m_hasFontFaceOnlyValues);
-    m_parsedProperties.removeAllMatching([] (const CSSProperty&amp; property) {
-        return property.id() == CSSPropertyFontVariant &amp;&amp; property.value()-&gt;isValueList();
-    });
-}
-
</del><span class="cx"> RefPtr&lt;StyleKeyframe&gt; CSSParser::createKeyframe(CSSParserValueList&amp; keys)
</span><span class="cx"> {
</span><span class="cx">     // Create a key string from the passed keys
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (192731 => 192732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2015-11-22 10:48:48 UTC (rev 192731)
+++ trunk/Source/WebCore/css/CSSParser.h        2015-11-22 17:06:35 UTC (rev 192732)
</span><span class="lines">@@ -265,7 +265,6 @@
</span><span class="cx"> 
</span><span class="cx">     bool parseLineHeight(bool important);
</span><span class="cx">     bool parseFontSize(bool important);
</span><del>-    bool parseFontVariant(bool important);
</del><span class="cx">     bool parseFontWeight(bool important);
</span><span class="cx">     bool parseFontSynthesis(bool important);
</span><span class="cx">     bool parseFontFaceSrc();
</span><span class="lines">@@ -417,7 +416,6 @@
</span><span class="cx">     CSSPropertyID m_currentShorthand;
</span><span class="cx">     bool m_implicitShorthand;
</span><span class="cx"> 
</span><del>-    bool m_hasFontFaceOnlyValues;
</del><span class="cx">     bool m_hadSyntacticallyValidCSSRule;
</span><span class="cx">     bool m_logErrors;
</span><span class="cx">     bool m_ignoreErrorsInDeclaration;
</span><span class="lines">@@ -565,8 +563,6 @@
</span><span class="cx"> 
</span><span class="cx">     bool isValidSize(ValueWithCalculation&amp;);
</span><span class="cx"> 
</span><del>-    void deleteFontFaceOnlyValues();
-
</del><span class="cx">     bool isGeneratedImageValue(CSSParserValue&amp;) const;
</span><span class="cx">     bool parseGeneratedImage(CSSParserValueList&amp;, RefPtr&lt;CSSValue&gt;&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontDescriptioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontDescription.cpp (192731 => 192732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontDescription.cpp        2015-11-22 10:48:48 UTC (rev 192731)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.cpp        2015-11-22 17:06:35 UTC (rev 192732)
</span><span class="lines">@@ -79,7 +79,6 @@
</span><span class="cx"> FontTraitsMask FontDescription::traitsMask() const
</span><span class="cx"> {
</span><span class="cx">     return static_cast&lt;FontTraitsMask&gt;((m_italic ? FontStyleItalicMask : FontStyleNormalMask)
</span><del>-        | (m_smallCaps ? FontVariantSmallCapsMask : FontVariantNormalMask)
</del><span class="cx">         | (FontWeight100Mask &lt;&lt; (m_weight - FontWeight100)));
</span><span class="cx">     
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaFontCacheCoreTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (192731 => 192732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp        2015-11-22 10:48:48 UTC (rev 192731)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp        2015-11-22 17:06:35 UTC (rev 192732)
</span><span class="lines">@@ -476,8 +476,7 @@
</span><span class="cx">         weightMask = FontWeight900Mask;
</span><span class="cx">         break;
</span><span class="cx">     }
</span><del>-    return static_cast&lt;FontTraitsMask&gt;(((ctFontTraits &amp; kCTFontTraitItalic) ? FontStyleItalicMask : FontStyleNormalMask)
-        | FontVariantNormalMask | weightMask);
</del><ins>+    return static_cast&lt;FontTraitsMask&gt;(((ctFontTraits &amp; kCTFontTraitItalic) ? FontStyleItalicMask : FontStyleNormalMask) | weightMask);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool isFontWeightBold(FontWeight fontWeight)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinFontCacheWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp (192731 => 192732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp        2015-11-22 10:48:48 UTC (rev 192731)
+++ trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp        2015-11-22 17:06:35 UTC (rev 192732)
</span><span class="lines">@@ -528,7 +528,6 @@
</span><span class="cx"> 
</span><span class="cx">     unsigned traitsMask = 0;
</span><span class="cx">     traitsMask |= logFont-&gt;lfItalic ? FontStyleItalicMask : FontStyleNormalMask;
</span><del>-    traitsMask |= FontVariantNormalMask;
</del><span class="cx">     LONG weight = adjustedGDIFontWeight(logFont-&gt;lfWeight, procData-&gt;m_familyName);
</span><span class="cx">     traitsMask |= weight == FW_THIN ? FontWeight100Mask :
</span><span class="cx">         weight == FW_EXTRALIGHT ? FontWeight200Mask :
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformtextTextFlagsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/TextFlags.h (192731 => 192732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/TextFlags.h        2015-11-22 10:48:48 UTC (rev 192731)
+++ trunk/Source/WebCore/platform/text/TextFlags.h        2015-11-22 17:06:35 UTC (rev 192732)
</span><span class="lines">@@ -277,8 +277,6 @@
</span><span class="cx"> enum {
</span><span class="cx">     FontStyleNormalBit = 0,
</span><span class="cx">     FontStyleItalicBit,
</span><del>-    FontVariantNormalBit,
-    FontVariantSmallCapsBit,
</del><span class="cx">     FontWeight100Bit,
</span><span class="cx">     FontWeight200Bit,
</span><span class="cx">     FontWeight300Bit,
</span><span class="lines">@@ -296,10 +294,6 @@
</span><span class="cx">     FontStyleItalicMask = 1 &lt;&lt; FontStyleItalicBit,
</span><span class="cx">     FontStyleMask = FontStyleNormalMask | FontStyleItalicMask,
</span><span class="cx"> 
</span><del>-    FontVariantNormalMask = 1 &lt;&lt; FontVariantNormalBit,
-    FontVariantSmallCapsMask = 1 &lt;&lt; FontVariantSmallCapsBit,
-    FontVariantMask = FontVariantNormalMask | FontVariantSmallCapsMask,
-
</del><span class="cx">     FontWeight100Mask = 1 &lt;&lt; FontWeight100Bit,
</span><span class="cx">     FontWeight200Mask = 1 &lt;&lt; FontWeight200Bit,
</span><span class="cx">     FontWeight300Mask = 1 &lt;&lt; FontWeight300Bit,
</span></span></pre>
</div>
</div>

</body>
</html>