<!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>[193680] branches/safari-601-branch</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/193680">193680</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2015-12-07 18:38:24 -0800 (Mon, 07 Dec 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/192732">r192732</a>. rdar://problem/23769794</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601branchLayoutTestsChangeLog">branches/safari-601-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebCoreChangeLog">branches/safari-601-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebCorecssCSSFontSelectorcpp">branches/safari-601-branch/Source/WebCore/css/CSSFontSelector.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCorecssCSSParsercpp">branches/safari-601-branch/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCorecssCSSParserh">branches/safari-601-branch/Source/WebCore/css/CSSParser.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsFontDescriptioncpp">branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsiosFontCacheIOSmm">branches/safari-601-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsmacFontCacheMacmm">branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicswinFontCacheWincpp">branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformtextTextFlagsh">branches/safari-601-branch/Source/WebCore/platform/text/TextFlags.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari601branchLayoutTestsfasttextfontselectionfontvariantexpectedhtml">branches/safari-601-branch/LayoutTests/fast/text/font-selection-font-variant-expected.html</a></li>
<li><a href="#branchessafari601branchLayoutTestsfasttextfontselectionfontvarianthtml">branches/safari-601-branch/LayoutTests/fast/text/font-selection-font-variant.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/ChangeLog (193679 => 193680)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/ChangeLog        2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/LayoutTests/ChangeLog        2015-12-08 02:38:24 UTC (rev 193680)
</span><span class="lines">@@ -1,3 +1,13 @@
</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"> 2015-10-17  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Delete FontPlatformData::allowsLigatures()
</span></span></pre></div>
<a id="branchessafari601branchLayoutTestsfasttextfontselectionfontvariantexpectedhtml"></a>
<div class="addfile"><h4>Added: branches/safari-601-branch/LayoutTests/fast/text/font-selection-font-variant-expected.html (0 => 193680)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/fast/text/font-selection-font-variant-expected.html                                (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/text/font-selection-font-variant-expected.html        2015-12-08 02:38:24 UTC (rev 193680)
</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="branchessafari601branchLayoutTestsfasttextfontselectionfontvarianthtml"></a>
<div class="addfile"><h4>Added: branches/safari-601-branch/LayoutTests/fast/text/font-selection-font-variant.html (0 => 193680)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/fast/text/font-selection-font-variant.html                                (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/text/font-selection-font-variant.html        2015-12-08 02:38:24 UTC (rev 193680)
</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="branchessafari601branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (193679 => 193680)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/ChangeLog        2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog        2015-12-08 02:38:24 UTC (rev 193680)
</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-12-07  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Follow-up merge of r191014. rdar://problem/23769801
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorecssCSSFontSelectorcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/css/CSSFontSelector.cpp (193679 => 193680)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/css/CSSFontSelector.cpp        2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/css/CSSFontSelector.cpp        2015-12-08 02:38:24 UTC (rev 193680)
</span><span class="lines">@@ -174,35 +174,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;
-
-        CSSValueList&amp; variantList = downcast&lt;CSSValueList&gt;(*fontVariant);
-        unsigned numVariants = variantList.length();
-        if (!numVariants)
-            return;
-
-        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">     // Each item in the src property's list is a single CSSFontFaceSource. Put them all into a CSSFontFace.
</span><span class="cx">     RefPtr&lt;CSSFontFace&gt; fontFace;
</span><span class="cx"> 
</span><span class="lines">@@ -418,22 +389,6 @@
</span><span class="cx">     FontTraitsMask firstTraitsMask = first-&gt;traitsMask();
</span><span class="cx">     FontTraitsMask secondTraitsMask = second-&gt;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-&gt;isLocalFallback() &amp;&amp; !second-&gt;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">@@ -532,14 +487,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;
-#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-&gt;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">@@ -550,8 +497,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="branchessafari601branchSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/css/CSSParser.cpp (193679 => 193680)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/css/CSSParser.cpp        2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/css/CSSParser.cpp        2015-12-08 02:38:24 UTC (rev 193680)
</span><span class="lines">@@ -320,7 +320,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">@@ -1055,6 +1054,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">@@ -1185,6 +1188,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">@@ -1387,8 +1391,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">@@ -1478,9 +1480,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">@@ -1505,8 +1504,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">@@ -1683,7 +1680,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">@@ -2354,9 +2350,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">@@ -6924,53 +6917,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().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().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">@@ -12532,8 +12478,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">@@ -12548,9 +12492,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">@@ -12708,14 +12650,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"> PassRefPtr&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="branchessafari601branchSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/css/CSSParser.h (193679 => 193680)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/css/CSSParser.h        2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/css/CSSParser.h        2015-12-08 02:38:24 UTC (rev 193680)
</span><span class="lines">@@ -262,7 +262,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">@@ -414,7 +413,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">@@ -562,8 +560,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="branchessafari601branchSourceWebCoreplatformgraphicsFontDescriptioncpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.cpp (193679 => 193680)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.cpp        2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.cpp        2015-12-08 02:38:24 UTC (rev 193680)
</span><span class="lines">@@ -87,7 +87,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="branchessafari601branchSourceWebCoreplatformgraphicsiosFontCacheIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm (193679 => 193680)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm        2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm        2015-12-08 02:38:24 UTC (rev 193680)
</span><span class="lines">@@ -551,7 +551,6 @@
</span><span class="cx"> static inline FontTraitsMask toTraitsMask(CTFontSymbolicTraits ctFontTraits)
</span><span class="cx"> {
</span><span class="cx">     return static_cast&lt;FontTraitsMask&gt;(((ctFontTraits &amp; kCTFontTraitItalic) ? FontStyleItalicMask : FontStyleNormalMask)
</span><del>-        | FontVariantNormalMask
</del><span class="cx">         // FontWeight600 or higher is bold for CTFonts, so choose middle values for
</span><span class="cx">         // bold (600-900) and non-bold (100-500)
</span><span class="cx">         | ((ctFontTraits &amp; kCTFontTraitBold) ? FontWeight700Mask : FontWeight300Mask));
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsmacFontCacheMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm (193679 => 193680)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm        2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm        2015-12-08 02:38:24 UTC (rev 193680)
</span><span class="lines">@@ -117,7 +117,6 @@
</span><span class="cx"> static inline FontTraitsMask toTraitsMask(NSFontTraitMask appKitTraits, NSInteger appKitWeight)
</span><span class="cx"> {
</span><span class="cx">     return static_cast&lt;FontTraitsMask&gt;(((appKitTraits &amp; NSFontItalicTrait) ? FontStyleItalicMask : FontStyleNormalMask)
</span><del>-        | FontVariantNormalMask
</del><span class="cx">         | (appKitWeight == 1 ? FontWeight100Mask :
</span><span class="cx">             appKitWeight == 2 ? FontWeight200Mask :
</span><span class="cx">             appKitWeight &lt;= 4 ? FontWeight300Mask :
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicswinFontCacheWincpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp (193679 => 193680)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp        2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp        2015-12-08 02:38:24 UTC (rev 193680)
</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="branchessafari601branchSourceWebCoreplatformtextTextFlagsh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/text/TextFlags.h (193679 => 193680)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/text/TextFlags.h        2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/platform/text/TextFlags.h        2015-12-08 02:38:24 UTC (rev 193680)
</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>