<!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>[193575] 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/193575">193575</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2015-12-06 02:37:02 -0800 (Sun, 06 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/190192">r190192</a>. rdar://problem/23769741</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601branchLayoutTestsChangeLog">branches/safari-601-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari601branchLayoutTestscss3fontfeaturesettingsparsingexpectedtxt">branches/safari-601-branch/LayoutTests/css3/font-feature-settings-parsing-expected.txt</a></li>
<li><a href="#branchessafari601branchLayoutTestscss3fontfeaturesettingsrendering2expectedhtml">branches/safari-601-branch/LayoutTests/css3/font-feature-settings-rendering-2-expected.html</a></li>
<li><a href="#branchessafari601branchLayoutTestscss3fontfeaturesettingsrendering2html">branches/safari-601-branch/LayoutTests/css3/font-feature-settings-rendering-2.html</a></li>
<li><a href="#branchessafari601branchLayoutTestsfastcssgetComputedStylecomputedstyleexpectedtxt">branches/safari-601-branch/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt</a></li>
<li><a href="#branchessafari601branchLayoutTestsfastcssgetComputedStylecomputedstylefontfamilyexpectedtxt">branches/safari-601-branch/LayoutTests/fast/css/getComputedStyle/computed-style-font-family-expected.txt</a></li>
<li><a href="#branchessafari601branchLayoutTestsfastcssgetComputedStylecomputedstylewithoutrendererexpectedtxt">branches/safari-601-branch/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt</a></li>
<li><a href="#branchessafari601branchLayoutTestsfastcssgetComputedStyleresourcespropertynamesjs">branches/safari-601-branch/LayoutTests/fast/css/getComputedStyle/resources/property-names.js</a></li>
<li><a href="#branchessafari601branchLayoutTestsfastcssparsingfontvariantligatureshtml">branches/safari-601-branch/LayoutTests/fast/css/parsing-font-variant-ligatures.html</a></li>
<li><a href="#branchessafari601branchLayoutTestsfasttextfontvariantligatureshtml">branches/safari-601-branch/LayoutTests/fast/text/font-variant-ligatures.html</a></li>
<li><a href="#branchessafari601branchLayoutTestsplatformmacTestExpectations">branches/safari-601-branch/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#branchessafari601branchLayoutTestssvgcssgetComputedStylebasicexpectedtxt">branches/safari-601-branch/LayoutTests/svg/css/getComputedStyle-basic-expected.txt</a></li>
<li><a href="#branchessafari601branchSourceWebCoreChangeLog">branches/safari-601-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebCorecssCSSComputedStyleDeclarationcpp">branches/safari-601-branch/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCorecssCSSFontFeatureValuecpp">branches/safari-601-branch/Source/WebCore/css/CSSFontFeatureValue.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCorecssCSSFontFeatureValueh">branches/safari-601-branch/Source/WebCore/css/CSSFontFeatureValue.h</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="#branchessafari601branchSourceWebCorecssCSSPrimitiveValueMappingsh">branches/safari-601-branch/Source/WebCore/css/CSSPrimitiveValueMappings.h</a></li>
<li><a href="#branchessafari601branchSourceWebCorecssCSSPropertyNamesin">branches/safari-601-branch/Source/WebCore/css/CSSPropertyNames.in</a></li>
<li><a href="#branchessafari601branchSourceWebCorecssCSSValueKeywordsin">branches/safari-601-branch/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#branchessafari601branchSourceWebCorecssStyleBuilderConverterh">branches/safari-601-branch/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#branchessafari601branchSourceWebCorecssStyleBuilderCustomh">branches/safari-601-branch/Source/WebCore/css/StyleBuilderCustom.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreeditingcocoaHTMLConvertermm">branches/safari-601-branch/Source/WebCore/editing/cocoa/HTMLConverter.mm</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsFontCachecpp">branches/safari-601-branch/Source/WebCore/platform/graphics/FontCache.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsFontCacheh">branches/safari-601-branch/Source/WebCore/platform/graphics/FontCache.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsFontCascadecpp">branches/safari-601-branch/Source/WebCore/platform/graphics/FontCascade.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsFontCascadeh">branches/safari-601-branch/Source/WebCore/platform/graphics/FontCascade.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsFontDescriptioncpp">branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsFontDescriptionh">branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsFontFeatureSettingscpp">branches/safari-601-branch/Source/WebCore/platform/graphics/FontFeatureSettings.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsFontFeatureSettingsh">branches/safari-601-branch/Source/WebCore/platform/graphics/FontFeatureSettings.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicscocoaFontCacheCoreTextcpp">branches/safari-601-branch/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsharfbuzzHarfBuzzShapercpp">branches/safari-601-branch/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.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="#branchessafari601branchSourceWebCoreplatformgraphicsmacFontCustomPlatformDatacpp">branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformtextTextFlagsh">branches/safari-601-branch/Source/WebCore/platform/text/TextFlags.h</a></li>
<li><a href="#branchessafari601branchSourceWebCorerenderingRenderThemeIOSmm">branches/safari-601-branch/Source/WebCore/rendering/RenderThemeIOS.mm</a></li>
<li><a href="#branchessafari601branchSourceWebCorerenderinglineBreakingContexth">branches/safari-601-branch/Source/WebCore/rendering/line/BreakingContext.h</a></li>
<li><a href="#branchessafari601branchToolsChangeLog">branches/safari-601-branch/Tools/ChangeLog</a></li>
<li><a href="#branchessafari601branchToolsFontWithFeaturesFontWithFeaturesFontCreatorcpp">branches/safari-601-branch/Tools/FontWithFeatures/FontWithFeatures/FontCreator.cpp</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 (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/ChangeLog        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/LayoutTests/ChangeLog        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -1,3 +1,54 @@
</span><ins>+2015-09-23 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [Cocoa] [Font Features] Implement font-variant-*
+ https://bugs.webkit.org/show_bug.cgi?id=148413
+
+ Reviewed by Darin Adler.
+
+ Updating tests because font-variant-ligatures is being unprefixed.
+
+ Also, update css3/resources/FontWithFeatures.otf to support "lnum" feature.
+
+ * css3/font-feature-settings-rendering-2-expected.html:
+ * css3/font-feature-settings-rendering-2.html:
+ * css3/font-variant-all-webfont-expected.html: Added.
+ * css3/font-variant-all-webfont.html: Added.
+ * css3/font-variant-parsing-expected.txt: Added.
+ * css3/font-variant-parsing.html: Added.
+ * css3/resources/FontWithFeatures.otf:
+ * fast/css/getComputedStyle/computed-style-expected.txt:
+ * fast/css/getComputedStyle/computed-style-font-family-expected.txt:
+ * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+ * fast/css/getComputedStyle/resources/property-names.js:
+ * fast/css/parsing-font-variant-ligatures.html:
+ * fast/text/font-variant-ligatures.html:
+ * platform/mac/TestExpectations:
+ * svg/css/getComputedStyle-basic-expected.txt:
+
+2015-08-06 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Font feature settings comparisons are order-dependent and case-dependent
+ https://bugs.webkit.org/show_bug.cgi?id=147719
+
+ Reviewed by Benjamin Poulain.
+
+ Make the test insensitive to order and case.
+
+ * css3/font-feature-settings-parsing-expected.txt:
+ * css3/font-feature-settings-parsing.html:
+
+2015-08-11 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [font-features] Map OpenType feature tags to TrueType feature selectors
+ https://bugs.webkit.org/show_bug.cgi?id=147819
+
+ Reviewed by Dean Jackson.
+
+ Updated test results.
+
+ * platform/mac/css3/font-feature-settings-preinstalled-fonts-expected.png: Added.
+ * platform/mac/css3/font-feature-settings-preinstalled-fonts-expected.txt:
+
</ins><span class="cx"> 2015-12-05 Matthew Hanson <matthew_hanson@apple.com>
</span><span class="cx">
</span><span class="cx"> Rollout r193474. rdar://problem/23732400
</span></span></pre></div>
<a id="branchessafari601branchLayoutTestscss3fontfeaturesettingsparsingexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/css3/font-feature-settings-parsing-expected.txt (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/css3/font-feature-settings-parsing-expected.txt        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/LayoutTests/css3/font-feature-settings-parsing-expected.txt        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -4,17 +4,17 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> - Tests valid inputs.
</span><del>-PASS parseResultOf("valid_normal") is "normal"
-PASS parseResultOf("valid_value_1") is "'dlig' 1"
-PASS parseResultOf("valid_value_2") is "'swsh' 2"
-PASS parseResultOf("valid_value_on") is "'smcp' 1"
-PASS parseResultOf("valid_value_off") is "'liga' 0"
-PASS parseResultOf("valid_value_omit") is "'c2sc' 1"
-PASS parseResultOf("valid_valuelist") is "'tnum' 1, 'hist' 1"
-PASS parseResultOf("valid_singlequote") is "'PKRN' 1"
-PASS parseResultOf("valid_unusual_tag") is "'!@#$' 1"
-PASS parseResultOf("valid_tag_space") is "'a bc' 1"
-PASS parseResultOf("valid_composite") is "'dlig' 1, 'smcp' 1, 'lig ' 0"
</del><ins>+PASS canonicalize(parseResultOf("valid_normal")) is "normal"
+PASS canonicalize(parseResultOf("valid_value_1")) is "'dlig' 1"
+PASS canonicalize(parseResultOf("valid_value_2")) is "'swsh' 2"
+PASS canonicalize(parseResultOf("valid_value_on")) is "'smcp' 1"
+PASS canonicalize(parseResultOf("valid_value_off")) is "'liga' 0"
+PASS canonicalize(parseResultOf("valid_value_omit")) is "'c2sc' 1"
+PASS canonicalize(parseResultOf("valid_valuelist")) is "'hist' 1, 'tnum' 1"
+PASS canonicalize(parseResultOf("valid_singlequote")) is "'pkrn' 1"
+PASS canonicalize(parseResultOf("valid_unusual_tag")) is "'!@#$' 1"
+PASS canonicalize(parseResultOf("valid_tag_space")) is "'a bc' 1"
+PASS canonicalize(parseResultOf("valid_composite")) is "'dlig' 1, 'lig ' 0, 'smcp' 1"
</ins><span class="cx"> - Tests invalid inputs. Results should be "normal".
</span><span class="cx"> PASS parseResultOf("invalid_ident") is "normal"
</span><span class="cx"> PASS parseResultOf("invalid_cases") is "normal"
</span><span class="lines">@@ -34,10 +34,10 @@
</span><span class="cx"> PASS parseResultOf("invalid_on") is "normal"
</span><span class="cx"> PASS parseResultOf("invalid_0") is "normal"
</span><span class="cx"> - Tests inherit.
</span><del>-PASS parseResultOf("outer") is "'dlig' 1"
-PASS parseResultOf("inner") is "'dlig' 1"
</del><ins>+PASS canonicalize(parseResultOf("outer")) is "'dlig' 1"
+PASS canonicalize(parseResultOf("inner")) is "'dlig' 1"
</ins><span class="cx"> - Tests @font-face.
</span><del>-PASS fontFaceRuleValid is "'liga' 1"
</del><ins>+PASS canonicalize(fontFaceRuleValid) is "'liga' 1"
</ins><span class="cx"> PASS fontFaceRuleInvalid is ""
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari601branchLayoutTestscss3fontfeaturesettingsrendering2expectedhtml"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/css3/font-feature-settings-rendering-2-expected.html (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/css3/font-feature-settings-rendering-2-expected.html        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/LayoutTests/css3/font-feature-settings-rendering-2-expected.html        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> <span style="font-family: FontFeaturesTest;">BA</span>
</span><span class="cx"> <span style="font-family: FontFeaturesTest;">BA</span>
</span><span class="cx"> <span style="font-family: FontFeaturesTest;">BA</span>
</span><ins>+<span style="font-family: FontFeaturesTest;">BA</span>
</ins><span class="cx"> </div>
</span><span class="cx"> </body>
</span><span class="cx"> </html>
</span></span></pre></div>
<a id="branchessafari601branchLayoutTestscss3fontfeaturesettingsrendering2html"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/css3/font-feature-settings-rendering-2.html (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/css3/font-feature-settings-rendering-2.html        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/LayoutTests/css3/font-feature-settings-rendering-2.html        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -38,23 +38,24 @@
</span><span class="cx"> addElement("c2pc", "M");
</span><span class="cx"> addElement("unic", "N");
</span><span class="cx"> addElement("titl", "O");
</span><del>-addElement("onum", "P");
-addElement("pnum", "Q");
-addElement("tnum", "R");
-addElement("frac", "S");
-//addElement("afrc", "T");
-addElement("ordn", "U");
-addElement("zero", "V");
-addElement("hist", "W");
-addElement("jp78", "X");
-addElement("jp83", "Y");
-addElement("jp90", "Z");
-addElement("jp04", "a");
-addElement("smpl", "b");
-addElement("trad", "c");
-addElement("fwid", "d");
-addElement("pwid", "e");
-addElement("ruby", "f");
</del><ins>+addElement("lnum", "P");
+addElement("onum", "Q");
+addElement("pnum", "R");
+addElement("tnum", "S");
+addElement("frac", "T");
+//addElement("afrc", "U");
+addElement("ordn", "V");
+addElement("zero", "W");
+addElement("hist", "X");
+addElement("jp78", "Y");
+addElement("jp83", "Z");
+addElement("jp90", "a");
+addElement("jp04", "b");
+addElement("smpl", "c");
+addElement("trad", "d");
+addElement("fwid", "e");
+addElement("pwid", "f");
+addElement("ruby", "g");
</ins><span class="cx"> </script>
</span><span class="cx"> </body>
</span><span class="cx"> </html>
</span></span></pre></div>
<a id="branchessafari601branchLayoutTestsfastcssgetComputedStylecomputedstyleexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -159,7 +159,25 @@
</span><span class="cx"> justify-items: start;
</span><span class="cx"> -webkit-font-kerning: auto;
</span><span class="cx"> -webkit-font-smoothing: auto;
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> -webkit-font-variant-ligatures: normal;
</span><ins>+=======
+font-variant-ligatures: normal;
+font-variant-position: normal;
+font-variant-caps: normal;
+font-variant-numeric: normal;
+font-variant-alternates: normal;
+font-variant-east-asian: normal;
+-webkit-grid-auto-columns: auto;
+-webkit-grid-auto-flow: row;
+-webkit-grid-auto-rows: auto;
+-webkit-grid-column-end: auto;
+-webkit-grid-column-start: auto;
+-webkit-grid-template-columns: none;
+-webkit-grid-template-rows: none;
+-webkit-grid-row-end: auto;
+-webkit-grid-row-start: auto;
+>>>>>>> 105717c... [Cocoa] [Font Features] Implement font-variant-*
</ins><span class="cx"> -webkit-hyphenate-character: auto;
</span><span class="cx"> -webkit-hyphenate-limit-after: auto;
</span><span class="cx"> -webkit-hyphenate-limit-before: auto;
</span></span></pre></div>
<a id="branchessafari601branchLayoutTestsfastcssgetComputedStylecomputedstylefontfamilyexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/fast/css/getComputedStyle/computed-style-font-family-expected.txt (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/fast/css/getComputedStyle/computed-style-font-family-expected.txt        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/LayoutTests/fast/css/getComputedStyle/computed-style-font-family-expected.txt        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -6,4 +6,10 @@
</span><span class="cx"> font-synthesis: style weight;
</span><span class="cx"> font-variant: normal;
</span><span class="cx"> font-weight: normal;
</span><ins>+font-variant-ligatures: normal;
+font-variant-position: normal;
+font-variant-caps: normal;
+font-variant-numeric: normal;
+font-variant-alternates: normal;
+font-variant-east-asian: normal;
</ins><span class="cx">
</span></span></pre></div>
<a id="branchessafari601branchLayoutTestsfastcssgetComputedStylecomputedstylewithoutrendererexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -158,7 +158,25 @@
</span><span class="cx"> justify-items: auto
</span><span class="cx"> -webkit-font-kerning: auto
</span><span class="cx"> -webkit-font-smoothing: auto
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> -webkit-font-variant-ligatures: normal
</span><ins>+=======
+font-variant-ligatures: normal
+font-variant-position: normal
+font-variant-caps: normal
+font-variant-numeric: normal
+font-variant-alternates: normal
+font-variant-east-asian: normal
+-webkit-grid-auto-columns: auto
+-webkit-grid-auto-flow: row
+-webkit-grid-auto-rows: auto
+-webkit-grid-column-end: auto
+-webkit-grid-column-start: auto
+-webkit-grid-template-columns: none
+-webkit-grid-template-rows: none
+-webkit-grid-row-end: auto
+-webkit-grid-row-start: auto
+>>>>>>> 105717c... [Cocoa] [Font Features] Implement font-variant-*
</ins><span class="cx"> -webkit-hyphenate-character: auto
</span><span class="cx"> -webkit-hyphenate-limit-after: auto
</span><span class="cx"> -webkit-hyphenate-limit-before: auto
</span></span></pre></div>
<a id="branchessafari601branchLayoutTestsfastcssgetComputedStyleresourcespropertynamesjs"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/fast/css/getComputedStyle/resources/property-names.js (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/fast/css/getComputedStyle/resources/property-names.js        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/LayoutTests/fast/css/getComputedStyle/resources/property-names.js        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -49,7 +49,6 @@
</span><span class="cx"> "flex-wrap": true,
</span><span class="cx"> "-webkit-font-kerning": true,
</span><span class="cx"> "-webkit-font-smoothing": true,
</span><del>- "-webkit-font-variant-ligatures": true,
</del><span class="cx"> "-webkit-grid-auto-columns": true,
</span><span class="cx"> "-webkit-grid-auto-flow": true,
</span><span class="cx"> "-webkit-grid-auto-rows": true,
</span><span class="lines">@@ -184,6 +183,12 @@
</span><span class="cx"> "font-style": true,
</span><span class="cx"> "font-synthesis": true,
</span><span class="cx"> "font-variant": true,
</span><ins>+ "font-variant-ligatures": true,
+ "font-variant-position": true,
+ "font-variant-caps": true,
+ "font-variant-numeric": true,
+ "font-variant-alternates": true,
+ "font-variant-east-asian": true,
</ins><span class="cx"> "font-weight": true,
</span><span class="cx"> "glyph-orientation-horizontal": true,
</span><span class="cx"> "glyph-orientation-vertical": true,
</span></span></pre></div>
<a id="branchessafari601branchLayoutTestsfastcssparsingfontvariantligatureshtml"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/fast/css/parsing-font-variant-ligatures.html (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/fast/css/parsing-font-variant-ligatures.html        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/LayoutTests/fast/css/parsing-font-variant-ligatures.html        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -11,10 +11,10 @@
</span><span class="cx"> function test(value, expectedCSSText, expectedComputedCSSText)
</span><span class="cx"> {
</span><span class="cx"> var element = document.createElement("div");
</span><del>- element.style.setProperty("-webkit-font-variant-ligatures", value);
- var cssText = element.style.webkitFontVariantLigatures;
</del><ins>+ element.style.setProperty("font-variant-ligatures", value);
+ var cssText = element.style.fontVariantLigatures;
</ins><span class="cx"> document.body.appendChild(element);
</span><del>- var computedCSSText = getComputedStyle(element).webkitFontVariantLigatures;
</del><ins>+ var computedCSSText = getComputedStyle(element).fontVariantLigatures;
</ins><span class="cx"> document.body.removeChild(element);
</span><span class="cx"> if (cssText === expectedCSSText && computedCSSText == expectedComputedCSSText)
</span><span class="cx"> log("PASS: '" + value + "' parsed as '" + expectedCSSText + "' and computed to '" + computedCSSText + "'");
</span></span></pre></div>
<a id="branchessafari601branchLayoutTestsfasttextfontvariantligatureshtml"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/fast/text/font-variant-ligatures.html (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/fast/text/font-variant-ligatures.html        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/LayoutTests/fast/text/font-variant-ligatures.html        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> <style>
</span><del>- .common-ligatures-disabled { -webkit-font-variant-ligatures: no-common-ligatures; }
- .common-ligatures-enabled { -webkit-font-variant-ligatures: common-ligatures; }
- .common-ligatures-normal { -webkit-font-variant-ligatures: normal; }
</del><ins>+ .common-ligatures-disabled { font-variant-ligatures: no-common-ligatures; }
+ .common-ligatures-enabled { font-variant-ligatures: common-ligatures; }
+ .common-ligatures-normal { font-variant-ligatures: normal; }
</ins><span class="cx"> </style>
</span><span class="cx"> <body style="font-size: 36px;">
</span><span class="cx"> <div>
</span></span></pre></div>
<a id="branchessafari601branchLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/platform/mac/TestExpectations (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/platform/mac/TestExpectations        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/LayoutTests/platform/mac/TestExpectations        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -269,10 +269,16 @@
</span><span class="cx"> # Font feature settings is not implemented.
</span><span class="cx"> css3/font-feature-settings-rendering.html
</span><span class="cx">
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> # This feature is disabled on Mavericks.
</span><span class="cx"> [ Mavericks ] http/tests/navigation/page-cache-pending-image-load.html [ Skip ]
</span><span class="cx"> [ Mavericks ] http/tests/navigation/page-cache-pending-image-load-cache-partition.html [ Skip ]
</span><span class="cx"> [ Mavericks ] http/tests/navigation/page-cache-xhr.html [ Skip ]
</span><ins>+=======
+webkit.org/b/149246 [ Mavericks ] css3/font-feature-settings-rendering-2.html
+webkit.org/b/149246 [ Mavericks ] css3/font-variant-all-webfont.html
+webkit.org/b/149246 [ Mavericks ] css3/font-variant-parsing.html
+>>>>>>> 105717c... [Cocoa] [Font Features] Implement font-variant-*
</ins><span class="cx">
</span><span class="cx"> # This feature is disabled on Mavericks.
</span><span class="cx"> [ Mavericks ] http/tests/navigation/page-cache-pending-image-load.html [ Skip ]
</span></span></pre></div>
<a id="branchessafari601branchLayoutTestssvgcssgetComputedStylebasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/svg/css/getComputedStyle-basic-expected.txt (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/svg/css/getComputedStyle-basic-expected.txt        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/LayoutTests/svg/css/getComputedStyle-basic-expected.txt        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -316,8 +316,41 @@
</span><span class="cx"> rect: style.getPropertyCSSValue(-webkit-font-kerning) : [object CSSPrimitiveValue]
</span><span class="cx"> rect: style.getPropertyValue(-webkit-font-smoothing) : auto
</span><span class="cx"> rect: style.getPropertyCSSValue(-webkit-font-smoothing) : [object CSSPrimitiveValue]
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> rect: style.getPropertyValue(-webkit-font-variant-ligatures) : normal
</span><span class="cx"> rect: style.getPropertyCSSValue(-webkit-font-variant-ligatures) : [object CSSPrimitiveValue]
</span><ins>+=======
+rect: style.getPropertyValue(font-variant-ligatures) : normal
+rect: style.getPropertyCSSValue(font-variant-ligatures) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(font-variant-position) : normal
+rect: style.getPropertyCSSValue(font-variant-position) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(font-variant-caps) : normal
+rect: style.getPropertyCSSValue(font-variant-caps) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(font-variant-numeric) : normal
+rect: style.getPropertyCSSValue(font-variant-numeric) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(font-variant-alternates) : normal
+rect: style.getPropertyCSSValue(font-variant-alternates) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(font-variant-east-asian) : normal
+rect: style.getPropertyCSSValue(font-variant-east-asian) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-grid-auto-columns) : auto
+rect: style.getPropertyCSSValue(-webkit-grid-auto-columns) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-grid-auto-flow) : row
+rect: style.getPropertyCSSValue(-webkit-grid-auto-flow) : [object CSSValueList]
+rect: style.getPropertyValue(-webkit-grid-auto-rows) : auto
+rect: style.getPropertyCSSValue(-webkit-grid-auto-rows) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-grid-column-end) : auto
+rect: style.getPropertyCSSValue(-webkit-grid-column-end) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-grid-column-start) : auto
+rect: style.getPropertyCSSValue(-webkit-grid-column-start) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-grid-template-columns) : none
+rect: style.getPropertyCSSValue(-webkit-grid-template-columns) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-grid-template-rows) : none
+rect: style.getPropertyCSSValue(-webkit-grid-template-rows) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-grid-row-end) : auto
+rect: style.getPropertyCSSValue(-webkit-grid-row-end) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-grid-row-start) : auto
+rect: style.getPropertyCSSValue(-webkit-grid-row-start) : [object CSSPrimitiveValue]
+>>>>>>> 105717c... [Cocoa] [Font Features] Implement font-variant-*
</ins><span class="cx"> rect: style.getPropertyValue(-webkit-hyphenate-character) : auto
</span><span class="cx"> rect: style.getPropertyCSSValue(-webkit-hyphenate-character) : [object CSSPrimitiveValue]
</span><span class="cx"> rect: style.getPropertyValue(-webkit-hyphenate-limit-after) : auto
</span><span class="lines">@@ -822,8 +855,41 @@
</span><span class="cx"> g: style.getPropertyCSSValue(-webkit-font-kerning) : [object CSSPrimitiveValue]
</span><span class="cx"> g: style.getPropertyValue(-webkit-font-smoothing) : auto
</span><span class="cx"> g: style.getPropertyCSSValue(-webkit-font-smoothing) : [object CSSPrimitiveValue]
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> g: style.getPropertyValue(-webkit-font-variant-ligatures) : normal
</span><span class="cx"> g: style.getPropertyCSSValue(-webkit-font-variant-ligatures) : [object CSSPrimitiveValue]
</span><ins>+=======
+g: style.getPropertyValue(font-variant-ligatures) : normal
+g: style.getPropertyCSSValue(font-variant-ligatures) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(font-variant-position) : normal
+g: style.getPropertyCSSValue(font-variant-position) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(font-variant-caps) : normal
+g: style.getPropertyCSSValue(font-variant-caps) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(font-variant-numeric) : normal
+g: style.getPropertyCSSValue(font-variant-numeric) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(font-variant-alternates) : normal
+g: style.getPropertyCSSValue(font-variant-alternates) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(font-variant-east-asian) : normal
+g: style.getPropertyCSSValue(font-variant-east-asian) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-grid-auto-columns) : auto
+g: style.getPropertyCSSValue(-webkit-grid-auto-columns) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-grid-auto-flow) : row
+g: style.getPropertyCSSValue(-webkit-grid-auto-flow) : [object CSSValueList]
+g: style.getPropertyValue(-webkit-grid-auto-rows) : auto
+g: style.getPropertyCSSValue(-webkit-grid-auto-rows) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-grid-column-end) : auto
+g: style.getPropertyCSSValue(-webkit-grid-column-end) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-grid-column-start) : auto
+g: style.getPropertyCSSValue(-webkit-grid-column-start) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-grid-template-columns) : none
+g: style.getPropertyCSSValue(-webkit-grid-template-columns) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-grid-template-rows) : none
+g: style.getPropertyCSSValue(-webkit-grid-template-rows) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-grid-row-end) : auto
+g: style.getPropertyCSSValue(-webkit-grid-row-end) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-grid-row-start) : auto
+g: style.getPropertyCSSValue(-webkit-grid-row-start) : [object CSSPrimitiveValue]
+>>>>>>> 105717c... [Cocoa] [Font Features] Implement font-variant-*
</ins><span class="cx"> g: style.getPropertyValue(-webkit-hyphenate-character) : auto
</span><span class="cx"> g: style.getPropertyCSSValue(-webkit-hyphenate-character) : [object CSSPrimitiveValue]
</span><span class="cx"> g: style.getPropertyValue(-webkit-hyphenate-limit-after) : auto
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/ChangeLog        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -1,3 +1,308 @@
</span><ins>+2015-09-23 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [Cocoa] [Font Features] Implement font-variant-*
+ https://bugs.webkit.org/show_bug.cgi?id=148413
+
+ Reviewed by Darin Adler.
+
+ This patch is the first pass of implementing of the font-variant-* properties. Specifically,
+ these properties are:
+ font-variant-ligatures
+ font-variant-position
+ font-variant-caps
+ font-variant-numeric
+ font-variant-alternates
+ font-variant-east-asian
+
+ These new properties are held inside FontDescription as bit fields. At font creation time,
+ we consult with the FontDescription to figure out which variants are specified. We then
+ convert those variants to font features, and resolve these font features with the additional
+ features specified by font-feature-settings (as the spec requires). This patch also makes
+ our caches sensitive to these new properties of FontDescription so we don't look up cached,
+ stale fonts.
+
+ The implementation has some caveats, however. They are listed here:
+ 1. These new properties need to interact correctly with @font-face declarations. In
+ particular, only certain properties of the FontDescription should be considered when
+ detecting if a @font-face declaration applies to a particular element. This discrimination
+ does not happen correctly. In addition, any feature-specific CSS properties inside the
+ @font-face declaration need to be consulted at a particular point during the feature
+ resolve. This does not currently occur.
+ 2. One of the properties, font-variant-alternates, has a few values which require custom
+ CSS functions, which makes modeling the properties as bit fields tricky. These extra values
+ need to be implemented. This patch implements all the values which do not require extra CSS
+ features.
+ 3. These new properties have a shorthand, font-variant, which is designed to be backward-
+ compatible with CSS 2.1's concept of font-variant. In particular, CSS 2.1 allows you to use
+ "normal" and "small-caps" with font-variant. Both of these values are values of the new
+ property font-variant-caps. However, our existing implementation of small-caps does not
+ use font features when they exist; instead, it simply draws text at a smaller font size and
+ uses (effectively) text-transform to force capital letters. This implementation needs to be
+ unified with the new font-variant-caps property so that we can expand font-variant to be
+ a shorthand for the new properties.
+ 4. font-variant-position and font-variant-caps should provide appropriate synthesis if no
+ matching font-feature exists.
+ 5. FontCascade::typesettingFeatures() is now no-longer accurate. Fixing this would be large
+ enough to warrant its own patch.
+ 6. These properties are not tested with TrueType fonts.
+
+ Tests: css3/font-variant-all-webfont.html
+ css3/font-variant-parsing.html
+
+ * css/CSSComputedStyleDeclaration.cpp: Reconstruct StyleProperties from a RenderStyle.
+ (WebCore::appendLigaturesValue):
+ (WebCore::fontVariantLigaturesPropertyValue):
+ (WebCore::fontVariantPositionPropertyValue):
+ (WebCore::fontVariantCapsPropertyValue):
+ (WebCore::fontVariantNumericPropertyValue):
+ (WebCore::fontVariantAlternatesPropertyValue):
+ (WebCore::fontVariantEastAsianPropertyValue):
+ (WebCore::ComputedStyleExtractor::propertyValue):
+ * css/CSSFontFeatureValue.cpp: Update to FontFeatureTag instead of WTF::String.
+ (WebCore::CSSFontFeatureValue::CSSFontFeatureValue):
+ (WebCore::CSSFontFeatureValue::customCSSText):
+ * css/CSSFontFeatureValue.h: Ditto.
+ (WebCore::CSSFontFeatureValue::create):
+ (WebCore::CSSFontFeatureValue::tag):
+ * css/CSSParser.cpp: Parse the new properties according to the CSS3 fonts spec.
+ (WebCore::isValidKeywordPropertyAndValue):
+ (WebCore::isKeywordPropertyID):
+ (WebCore::CSSParser::parseValue):
+ (WebCore::CSSParser::parseFontFeatureTag):
+ (WebCore::CSSParser::parseFontVariantLigatures):
+ (WebCore::CSSParser::parseFontVariantNumeric):
+ (WebCore::CSSParser::parseFontVariantEastAsian):
+ * css/CSSParser.h:
+ * css/CSSPrimitiveValueMappings.h: For the three properties which are simple keyword value
+ properties, implement casting operators to automatically convert between RenderStyle
+ objects and CSS property objects.
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator FontVariantPosition):
+ (WebCore::CSSPrimitiveValue::operator FontVariantCaps):
+ (WebCore::CSSPrimitiveValue::operator FontVariantAlternates):
+ * css/CSSPropertyNames.in: New properties.
+ * css/CSSValueKeywords.in: New values.
+ * css/StyleBuilderConverter.h:
+ (WebCore::StyleBuilderConverter::convertFontFeatureSettings): Update to not use
+ RefPtrs.
+ * css/StyleBuilderCustom.h: Properties which are not simple keyword value properties are
+ decomposed into multiple members of FontDescription. These properties exist to convert
+ between these aggregate members and the CSS properties.
+ (WebCore::StyleBuilderCustom::applyInheritFontVariantLigatures):
+ (WebCore::StyleBuilderCustom::applyInitialFontVariantLigatures):
+ (WebCore::StyleBuilderCustom::applyValueFontVariantLigatures):
+ (WebCore::StyleBuilderCustom::applyInheritFontVariantNumeric):
+ (WebCore::StyleBuilderCustom::applyInitialFontVariantNumeric):
+ (WebCore::StyleBuilderCustom::applyValueFontVariantNumeric):
+ (WebCore::StyleBuilderCustom::applyInheritFontVariantEastAsian):
+ (WebCore::StyleBuilderCustom::applyInitialFontVariantEastAsian):
+ (WebCore::StyleBuilderCustom::applyValueFontVariantEastAsian):
+ (WebCore::StyleBuilderCustom::applyInitialWebkitFontVariantLigatures): Deleted.
+ (WebCore::StyleBuilderCustom::applyInheritWebkitFontVariantLigatures): Deleted.
+ (WebCore::StyleBuilderCustom::applyValueWebkitFontVariantLigatures): Deleted.
+ * editing/cocoa/HTMLConverter.mm:
+ (HTMLConverter::computedAttributesForElement): Unprefix font-variant-ligatures.
+ * platform/graphics/FontCache.h: Update cache to be sensitive to new state in
+ FontDescription.
+ (WebCore::FontDescriptionKey::FontDescriptionKey):
+ (WebCore::FontDescriptionKey::operator==):
+ (WebCore::FontDescriptionKey::computeHash):
+ (WebCore::FontDescriptionKey::makeFlagsKey):
+ (WebCore::FontDescriptionKey::makeFlagKey): Deleted.
+ * platform/graphics/FontCascade.cpp:
+ (WebCore::FontCascade::codePath): These new variants should trigger the complex text
+ codepath.
+ * platform/graphics/FontCascade.h:
+ (WebCore::FontCascade::computeTypesettingFeatures): Update to use new state enum.
+ * platform/graphics/FontDescription.cpp: Add state to hold new property values.
+ (WebCore::FontDescription::FontDescription):
+ (WebCore::FontCascadeDescription::FontCascadeDescription): Deleted.
+ * platform/graphics/FontDescription.h: Add state to hold new property values.
+ (WebCore::FontDescription::featureSettings):
+ (WebCore::FontDescription::variantCommonLigatures):
+ (WebCore::FontDescription::variantDiscretionaryLigatures):
+ (WebCore::FontDescription::variantHistoricalLigatures):
+ (WebCore::FontDescription::variantContextualAlternates):
+ (WebCore::FontDescription::variantPosition):
+ (WebCore::FontDescription::variantCaps):
+ (WebCore::FontDescription::variantNumericFigure):
+ (WebCore::FontDescription::variantNumericSpacing):
+ (WebCore::FontDescription::variantNumericFraction):
+ (WebCore::FontDescription::variantNumericOrdinal):
+ (WebCore::FontDescription::variantNumericSlashedZero):
+ (WebCore::FontDescription::variantAlternates):
+ (WebCore::FontDescription::variantEastAsianVariant):
+ (WebCore::FontDescription::variantEastAsianWidth):
+ (WebCore::FontDescription::variantEastAsianRuby):
+ (WebCore::FontDescription::variantSettings):
+ (WebCore::FontDescription::setFeatureSettings):
+ (WebCore::FontDescription::setVariantCommonLigatures):
+ (WebCore::FontDescription::setVariantDiscretionaryLigatures):
+ (WebCore::FontDescription::setVariantHistoricalLigatures):
+ (WebCore::FontDescription::setVariantContextualAlternates):
+ (WebCore::FontDescription::setVariantPosition):
+ (WebCore::FontDescription::setVariantCaps):
+ (WebCore::FontDescription::setVariantNumericFigure):
+ (WebCore::FontDescription::setVariantNumericSpacing):
+ (WebCore::FontDescription::setVariantNumericFraction):
+ (WebCore::FontDescription::setVariantNumericOrdinal):
+ (WebCore::FontDescription::setVariantNumericSlashedZero):
+ (WebCore::FontDescription::setVariantAlternates):
+ (WebCore::FontDescription::setVariantEastAsianVariant):
+ (WebCore::FontDescription::setVariantEastAsianWidth):
+ (WebCore::FontDescription::setVariantEastAsianRuby):
+ (WebCore::FontDescription::operator==):
+ (WebCore::FontCascadeDescription::initialVariantPosition):
+ (WebCore::FontCascadeDescription::initialVariantCaps):
+ (WebCore::FontCascadeDescription::initialVariantAlternates):
+ (WebCore::FontCascadeDescription::commonLigaturesState): Deleted.
+ (WebCore::FontCascadeDescription::discretionaryLigaturesState): Deleted.
+ (WebCore::FontCascadeDescription::historicalLigaturesState): Deleted.
+ (WebCore::FontCascadeDescription::setCommonLigaturesState): Deleted.
+ (WebCore::FontCascadeDescription::setDiscretionaryLigaturesState): Deleted.
+ (WebCore::FontCascadeDescription::setHistoricalLigaturesState): Deleted.
+ (WebCore::FontCascadeDescription::operator==): Deleted.
+ * platform/graphics/FontFeatureSettings.cpp: Update to use FontFeatureTag instead of
+ WTF::String.
+ (WebCore::FontFeature::FontFeature):
+ (WebCore::FontFeature::operator==):
+ (WebCore::FontFeature::operator<):
+ (WebCore::FontFeatureSettings::hash):
+ (WebCore::FontFeatureSettings::create): Deleted.
+ * platform/graphics/FontFeatureSettings.h: Update to use FontFeatureTag instead of
+ WTF::String.
+ (WebCore::fontFeatureTag):
+ (WebCore::FontFeatureTagHash::hash):
+ (WebCore::FontFeatureTagHash::equal):
+ (WebCore::FontFeatureTagHashTraits::constructDeletedValue):
+ (WebCore::FontFeatureTagHashTraits::isDeletedValue):
+ (WebCore::FontFeature::tag):
+ (WebCore::FontFeatureSettings::operator==):
+ (WebCore::FontFeatureSettings::begin):
+ (WebCore::FontFeatureSettings::end):
+ (WebCore::FontFeatureSettings::FontFeatureSettings): Deleted.
+ * platform/graphics/cocoa/FontCacheCoreText.cpp: Ditto. Also, when computing font
+ features, consult with the state inside FontDescription.
+ (WebCore::tagEquals):
+ (WebCore::appendTrueTypeFeature):
+ (WebCore::appendOpenTypeFeature):
+ (WebCore::computeFeatureSettingsFromVariants):
+ (WebCore::preparePlatformFont):
+ (WebCore::platformFontLookupWithFamily):
+ (WebCore::fontWithFamily):
+ (WebCore::FontCache::createFontPlatformData):
+ (WebCore::FontCache::systemFallbackForCharacters):
+ * platform/graphics/harfbuzz/HarfBuzzShaper.cpp: Update to use references instead of
+ pointers.
+ (WebCore::HarfBuzzShaper::setFontFeatures):
+ * platform/graphics/mac/FontCacheMac.mm:
+ (WebCore::platformFontWithFamily): Ditto.
+ * platform/graphics/mac/FontCustomPlatformData.cpp:
+ (WebCore::FontCustomPlatformData::fontPlatformData): Be sensitive to new state inside FontDescription.
+ * platform/text/TextFlags.h:
+ (WebCore::FontVariantSettings::isAllNormal): New state enums.
+ * rendering/RenderThemeIOS.mm:
+ (WebCore::RenderThemeIOS::updateCachedSystemFontDescription): Be sensitive to new state inside
+ FontDescription.
+ * rendering/line/BreakingContext.h:
+
+2015-07-30 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Clean up makeFontCascadeCacheKey()
+ https://bugs.webkit.org/show_bug.cgi?id=147430
+
+ Reviewed by Benjamin Poulain.
+
+ FontDescriptionKey is designed to encapsulate all the cacheable properties of a FontDescription.
+ However, a higher-level cache, FontCascadeCacheKey, was taking some values from FontDescriptions.
+ The fact that there wasn't a bug before is just a happy coincidence. This patch moves those bits
+ from the higher-level cache and puts them into FontDescriptionKey where they belong.
+
+ No new tests because there is no behavior change.
+
+ * platform/graphics/FontCache.h:
+ (WebCore::FontDescriptionKey::makeFlagKey):
+ * platform/graphics/FontCascade.cpp:
+ (WebCore::operator==):
+ (WebCore::makeFontSelectorFlags): Deleted.
+ (WebCore::makeFontCascadeCacheKey): Deleted.
+ (WebCore::computeFontCascadeCacheHash): Deleted.
+
+2015-08-06 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Make FontDescriptionKey sensitive to FontFeatureSettings
+ https://bugs.webkit.org/show_bug.cgi?id=147751
+
+ Reviewed by Anders Carlsson.
+
+ Just like how FontDescription hashes should be sensitive to locale, they should
+ also be sensitive to font features.
+
+ This patch also fixes operator== for FontDescriptionKey, which was previously
+ comparing hashes for equality instead of the underlying data. Comparing hashes
+ for equality is useless inside hashmaps.
+
+ This is in preparation for implementing font-feature-settings.
+
+ No new tests because there is no behavior change.
+
+ * platform/graphics/FontCache.cpp:
+ (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
+ (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
+ (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize): Deleted.
+ * platform/graphics/FontCache.h:
+ (WebCore::FontDescriptionKey::FontDescriptionKey):
+ (WebCore::FontDescriptionKey::operator==):
+ (WebCore::FontDescriptionKey::operator!=):
+ (WebCore::FontDescriptionKey::isHashTableDeletedValue):
+ (WebCore::FontDescriptionKey::computeHash):
+ * platform/graphics/FontFeatureSettings.cpp:
+ (WebCore::FontFeature::hash):
+ (WebCore::FontFeatureSettings::hash):
+ * platform/graphics/FontFeatureSettings.h:
+
+2015-08-06 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Font feature settings comparisons are order-dependent and case-dependent
+ https://bugs.webkit.org/show_bug.cgi?id=147719
+
+ Reviewed by Benjamin Poulain.
+
+ We should make our settings vector order-independent and case-independent.
+
+ Test: css3/font-feature-settings-parsing.html
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseFontFeatureTag):
+ * css/StyleBuilderConverter.h:
+ (WebCore::StyleBuilderConverter::convertFontFeatureSettings):
+ * platform/graphics/FontFeatureSettings.cpp:
+ (WebCore::FontFeature::FontFeature):
+ (WebCore::FontFeature::operator==):
+ (WebCore::FontFeatureSettings::FontFeatureSettings):
+ * platform/graphics/FontFeatureSettings.h:
+ (WebCore::FontFeature::FontFeature):
+ (WebCore::FontFeature::operator==):
+ (WebCore::FontFeature::operator<):
+ (WebCore::FontFeatureSettings::insert):
+ (WebCore::FontFeatureSettings::FontFeatureSettings):
+ (WebCore::FontFeatureSettings::append): Deleted.
+
+2015-08-11 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [font-features] Map OpenType feature tags to TrueType feature selectors
+ https://bugs.webkit.org/show_bug.cgi?id=147819
+
+ Reviewed by Dean Jackson.
+
+ Allow uses of font-feature-settings even on TrueType fonts.
+
+ Test: css3/font-feature-settings-preinstalled-fonts.html
+
+ * platform/graphics/cocoa/FontCacheCoreText.cpp:
+ (WebCore::appendRawTrueTypeFeature):
+ (WebCore::appendTrueTypeFeature):
+
</ins><span class="cx"> 2015-12-05 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r193479.
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -320,7 +320,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> CSSPropertyWebkitFontKerning,
</span><span class="cx"> CSSPropertyWebkitFontSmoothing,
</span><del>- CSSPropertyWebkitFontVariantLigatures,
</del><ins>+ CSSPropertyFontVariantLigatures,
+ CSSPropertyFontVariantPosition,
+ CSSPropertyFontVariantCaps,
+ CSSPropertyFontVariantNumeric,
+ CSSPropertyFontVariantAlternates,
+ CSSPropertyFontVariantEastAsian,
</ins><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx"> CSSPropertyWebkitGridAutoColumns,
</span><span class="cx"> CSSPropertyWebkitGridAutoFlow,
</span><span class="lines">@@ -1189,6 +1194,186 @@
</span><span class="cx"> return WTF::move(list);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline void appendLigaturesValue(CSSValueList& list, FontVariantLigatures value, CSSValueID yesValue, CSSValueID noValue)
+{
+ switch (value) {
+ case FontVariantLigatures::Normal:
+ return;
+ case FontVariantLigatures::No:
+ list.append(cssValuePool().createIdentifierValue(noValue));
+ return;
+ case FontVariantLigatures::Yes:
+ list.append(cssValuePool().createIdentifierValue(yesValue));
+ return;
+ }
+ ASSERT_NOT_REACHED();
+}
+
+static Ref<CSSValue> fontVariantLigaturesPropertyValue(FontVariantLigatures common, FontVariantLigatures discretionary, FontVariantLigatures historical, FontVariantLigatures contextualAlternates)
+{
+ if (common == FontVariantLigatures::No && discretionary == FontVariantLigatures::No && historical == FontVariantLigatures::No && contextualAlternates == FontVariantLigatures::No)
+ return cssValuePool().createIdentifierValue(CSSValueNone);
+ if (common == FontVariantLigatures::Normal && discretionary == FontVariantLigatures::Normal && historical == FontVariantLigatures::Normal && contextualAlternates == FontVariantLigatures::Normal)
+ return cssValuePool().createIdentifierValue(CSSValueNormal);
+
+ auto valueList = CSSValueList::createSpaceSeparated();
+ appendLigaturesValue(valueList, common, CSSValueCommonLigatures, CSSValueNoCommonLigatures);
+ appendLigaturesValue(valueList, discretionary, CSSValueDiscretionaryLigatures, CSSValueNoDiscretionaryLigatures);
+ appendLigaturesValue(valueList, historical, CSSValueHistoricalLigatures, CSSValueNoHistoricalLigatures);
+ appendLigaturesValue(valueList, contextualAlternates, CSSValueContextual, CSSValueNoContextual);
+ return WTF::move(valueList);
+}
+
+static Ref<CSSValue> fontVariantPositionPropertyValue(FontVariantPosition position)
+{
+ CSSValueID valueID = CSSValueNormal;
+ switch (position) {
+ case FontVariantPosition::Normal:
+ break;
+ case FontVariantPosition::Subscript:
+ valueID = CSSValueSub;
+ break;
+ case FontVariantPosition::Superscript:
+ valueID = CSSValueSuper;
+ break;
+ }
+ return cssValuePool().createIdentifierValue(valueID);
+}
+
+static Ref<CSSValue> fontVariantCapsPropertyValue(FontVariantCaps caps)
+{
+ CSSValueID valueID = CSSValueNormal;
+ switch (caps) {
+ case FontVariantCaps::Normal:
+ break;
+ case FontVariantCaps::Small:
+ valueID = CSSValueSmallCaps;
+ break;
+ case FontVariantCaps::AllSmall:
+ valueID = CSSValueAllSmallCaps;
+ break;
+ case FontVariantCaps::Petite:
+ valueID = CSSValuePetiteCaps;
+ break;
+ case FontVariantCaps::AllPetite:
+ valueID = CSSValueAllPetiteCaps;
+ break;
+ case FontVariantCaps::Unicase:
+ valueID = CSSValueUnicase;
+ break;
+ case FontVariantCaps::Titling:
+ valueID = CSSValueTitlingCaps;
+ break;
+ }
+ return cssValuePool().createIdentifierValue(valueID);
+}
+
+static Ref<CSSValue> fontVariantNumericPropertyValue(FontVariantNumericFigure figure, FontVariantNumericSpacing spacing, FontVariantNumericFraction fraction, FontVariantNumericOrdinal ordinal, FontVariantNumericSlashedZero slashedZero)
+{
+ if (figure == FontVariantNumericFigure::Normal && spacing == FontVariantNumericSpacing::Normal && fraction == FontVariantNumericFraction::Normal && ordinal == FontVariantNumericOrdinal::Normal && slashedZero == FontVariantNumericSlashedZero::Normal)
+ return cssValuePool().createIdentifierValue(CSSValueNormal);
+
+ auto valueList = CSSValueList::createSpaceSeparated();
+ switch (figure) {
+ case FontVariantNumericFigure::Normal:
+ break;
+ case FontVariantNumericFigure::LiningNumbers:
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueLiningNums));
+ break;
+ case FontVariantNumericFigure::OldStyleNumbers:
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueOldstyleNums));
+ break;
+ }
+
+ switch (spacing) {
+ case FontVariantNumericSpacing::Normal:
+ break;
+ case FontVariantNumericSpacing::ProportionalNumbers:
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueProportionalNums));
+ break;
+ case FontVariantNumericSpacing::TabularNumbers:
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueTabularNums));
+ break;
+ }
+
+ switch (fraction) {
+ case FontVariantNumericFraction::Normal:
+ break;
+ case FontVariantNumericFraction::DiagonalFractions:
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueDiagonalFractions));
+ break;
+ case FontVariantNumericFraction::StackedFractions:
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueStackedFractions));
+ break;
+ }
+
+ if (ordinal == FontVariantNumericOrdinal::Yes)
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueOrdinal));
+ if (slashedZero == FontVariantNumericSlashedZero::Yes)
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueSlashedZero));
+
+ return WTF::move(valueList);
+}
+
+static Ref<CSSValue> fontVariantAlternatesPropertyValue(FontVariantAlternates alternates)
+{
+ CSSValueID valueID = CSSValueNormal;
+ switch (alternates) {
+ case FontVariantAlternates::Normal:
+ break;
+ case FontVariantAlternates::HistoricalForms:
+ valueID = CSSValueHistoricalForms;
+ break;
+ }
+ return cssValuePool().createIdentifierValue(valueID);
+}
+
+static Ref<CSSValue> fontVariantEastAsianPropertyValue(FontVariantEastAsianVariant variant, FontVariantEastAsianWidth width, FontVariantEastAsianRuby ruby)
+{
+ if (variant == FontVariantEastAsianVariant::Normal && width == FontVariantEastAsianWidth::Normal && ruby == FontVariantEastAsianRuby::Normal)
+ return cssValuePool().createIdentifierValue(CSSValueNormal);
+
+ auto valueList = CSSValueList::createSpaceSeparated();
+ switch (variant) {
+ case FontVariantEastAsianVariant::Normal:
+ break;
+ case FontVariantEastAsianVariant::Jis78:
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueJis78));
+ break;
+ case FontVariantEastAsianVariant::Jis83:
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueJis83));
+ break;
+ case FontVariantEastAsianVariant::Jis90:
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueJis90));
+ break;
+ case FontVariantEastAsianVariant::Jis04:
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueJis04));
+ break;
+ case FontVariantEastAsianVariant::Simplified:
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueSimplified));
+ break;
+ case FontVariantEastAsianVariant::Traditional:
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueTraditional));
+ break;
+ }
+
+ switch (width) {
+ case FontVariantEastAsianWidth::Normal:
+ break;
+ case FontVariantEastAsianWidth::FullWidth:
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueFullWidth));
+ break;
+ case FontVariantEastAsianWidth::ProportionalWidth:
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueProportionalWidth));
+ break;
+ }
+
+ if (ruby == FontVariantEastAsianRuby::Yes)
+ valueList->append(cssValuePool().createIdentifierValue(CSSValueRuby));
+
+ return WTF::move(valueList);
+}
+
</ins><span class="cx"> static Ref<CSSValueList> getDelayValue(const AnimationList* animList)
</span><span class="cx"> {
</span><span class="cx"> auto list = CSSValueList::createCommaSeparated();
</span><span class="lines">@@ -2323,14 +2508,12 @@
</span><span class="cx"> case CSSPropertyFontSynthesis:
</span><span class="cx"> return fontSynthesisFromStyle(*style);
</span><span class="cx"> case CSSPropertyFontFeatureSettings: {
</span><del>- const FontFeatureSettings* featureSettings = style->fontDescription().featureSettings();
- if (!featureSettings || !featureSettings->size())
</del><ins>+ const FontFeatureSettings& featureSettings = style->fontDescription().featureSettings();
+ if (!featureSettings.size())
</ins><span class="cx"> return cssValuePool().createIdentifierValue(CSSValueNormal);
</span><span class="cx"> RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
</span><del>- for (unsigned i = 0; i < featureSettings->size(); ++i) {
- const FontFeature& feature = featureSettings->at(i);
- list->append(CSSFontFeatureValue::create(feature.tag(), feature.value()));
- }
</del><ins>+ for (auto& feature : featureSettings)
+ list->append(CSSFontFeatureValue::create(FontFeatureTag(feature.tag()), feature.value()));
</ins><span class="cx"> return list.release();
</span><span class="cx"> }
</span><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="lines">@@ -2722,23 +2905,18 @@
</span><span class="cx"> return cssValuePool().createValue(style->fontDescription().kerning());
</span><span class="cx"> case CSSPropertyWebkitFontSmoothing:
</span><span class="cx"> return cssValuePool().createValue(style->fontDescription().fontSmoothing());
</span><del>- case CSSPropertyWebkitFontVariantLigatures: {
- FontDescription::LigaturesState commonLigaturesState = style->fontDescription().commonLigaturesState();
- FontDescription::LigaturesState discretionaryLigaturesState = style->fontDescription().discretionaryLigaturesState();
- FontDescription::LigaturesState historicalLigaturesState = style->fontDescription().historicalLigaturesState();
- if (commonLigaturesState == FontDescription::NormalLigaturesState && discretionaryLigaturesState == FontDescription::NormalLigaturesState
- && historicalLigaturesState == FontDescription::NormalLigaturesState)
- return cssValuePool().createIdentifierValue(CSSValueNormal);
-
- RefPtr<CSSValueList> valueList = CSSValueList::createSpaceSeparated();
- if (commonLigaturesState != FontDescription::NormalLigaturesState)
- valueList->append(cssValuePool().createIdentifierValue(commonLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoCommonLigatures : CSSValueCommonLigatures));
- if (discretionaryLigaturesState != FontDescription::NormalLigaturesState)
- valueList->append(cssValuePool().createIdentifierValue(discretionaryLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoDiscretionaryLigatures : CSSValueDiscretionaryLigatures));
- if (historicalLigaturesState != FontDescription::NormalLigaturesState)
- valueList->append(cssValuePool().createIdentifierValue(historicalLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoHistoricalLigatures : CSSValueHistoricalLigatures));
- return valueList;
- }
</del><ins>+ case CSSPropertyFontVariantLigatures:
+ return fontVariantLigaturesPropertyValue(style->fontDescription().variantCommonLigatures(), style->fontDescription().variantDiscretionaryLigatures(), style->fontDescription().variantHistoricalLigatures(), style->fontDescription().variantContextualAlternates());
+ case CSSPropertyFontVariantPosition:
+ return fontVariantPositionPropertyValue(style->fontDescription().variantPosition());
+ case CSSPropertyFontVariantCaps:
+ return fontVariantCapsPropertyValue(style->fontDescription().variantCaps());
+ case CSSPropertyFontVariantNumeric:
+ return fontVariantNumericPropertyValue(style->fontDescription().variantNumericFigure(), style->fontDescription().variantNumericSpacing(), style->fontDescription().variantNumericFraction(), style->fontDescription().variantNumericOrdinal(), style->fontDescription().variantNumericSlashedZero());
+ case CSSPropertyFontVariantAlternates:
+ return fontVariantAlternatesPropertyValue(style->fontDescription().variantAlternates());
+ case CSSPropertyFontVariantEastAsian:
+ return fontVariantEastAsianPropertyValue(style->fontDescription().variantEastAsianVariant(), style->fontDescription().variantEastAsianWidth(), style->fontDescription().variantEastAsianRuby());
</ins><span class="cx"> case CSSPropertyZIndex:
</span><span class="cx"> if (style->hasAutoZIndex())
</span><span class="cx"> return cssValuePool().createIdentifierValue(CSSValueAuto);
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorecssCSSFontFeatureValuecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/css/CSSFontFeatureValue.cpp (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/css/CSSFontFeatureValue.cpp        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/css/CSSFontFeatureValue.cpp        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -32,9 +32,9 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-CSSFontFeatureValue::CSSFontFeatureValue(const String& tag, int value)
</del><ins>+CSSFontFeatureValue::CSSFontFeatureValue(FontFeatureTag&& tag, int value)
</ins><span class="cx"> : CSSValue(FontFeatureClass)
</span><del>- , m_tag(tag)
</del><ins>+ , m_tag(WTF::move(tag))
</ins><span class="cx"> , m_value(value)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -43,7 +43,8 @@
</span><span class="cx"> {
</span><span class="cx"> StringBuilder builder;
</span><span class="cx"> builder.append('\'');
</span><del>- builder.append(m_tag);
</del><ins>+ for (char c : m_tag)
+ builder.append(c);
</ins><span class="cx"> builder.appendLiteral("' ");
</span><span class="cx"> builder.appendNumber(m_value);
</span><span class="cx"> return builder.toString();
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorecssCSSFontFeatureValueh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/css/CSSFontFeatureValue.h (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/css/CSSFontFeatureValue.h        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/css/CSSFontFeatureValue.h        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -27,27 +27,27 @@
</span><span class="cx"> #define CSSFontFeatureValue_h
</span><span class="cx">
</span><span class="cx"> #include "CSSValue.h"
</span><del>-#include <wtf/text/WTFString.h>
</del><ins>+#include "FontFeatureSettings.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class CSSFontFeatureValue : public CSSValue {
</span><span class="cx"> public:
</span><del>- static Ref<CSSFontFeatureValue> create(const String& tag, int value)
</del><ins>+ static Ref<CSSFontFeatureValue> create(FontFeatureTag&& tag, int value)
</ins><span class="cx"> {
</span><del>- return adoptRef(*new CSSFontFeatureValue(tag, value));
</del><ins>+ return adoptRef(*new CSSFontFeatureValue(WTF::move(tag), value));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- const String& tag() const { return m_tag; }
</del><ins>+ const FontFeatureTag& tag() const { return m_tag; }
</ins><span class="cx"> int value() const { return m_value; }
</span><span class="cx"> String customCSSText() const;
</span><span class="cx">
</span><span class="cx"> bool equals(const CSSFontFeatureValue&) const;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- CSSFontFeatureValue(const String&, int);
</del><ins>+ CSSFontFeatureValue(FontFeatureTag&&, int);
</ins><span class="cx">
</span><del>- String m_tag;
</del><ins>+ FontFeatureTag m_tag;
</ins><span class="cx"> const int m_value;
</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 (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/css/CSSParser.cpp        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/css/CSSParser.cpp        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -1043,6 +1043,18 @@
</span><span class="cx"> return true;
</span><span class="cx"> break;
</span><span class="cx"> #endif
</span><ins>+ case CSSPropertyFontVariantPosition: // normal | sub | super
+ if (valueID == CSSValueNormal || valueID == CSSValueSub || valueID == CSSValueSuper)
+ return true;
+ break;
+ case CSSPropertyFontVariantCaps: // normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps
+ if (valueID == CSSValueNormal || valueID == CSSValueSmallCaps || valueID == CSSValueAllSmallCaps || valueID == CSSValuePetiteCaps || valueID == CSSValueAllPetiteCaps || valueID == CSSValueUnicase || valueID == CSSValueTitlingCaps)
+ return true;
+ break;
+ case CSSPropertyFontVariantAlternates: // We only support the normal and historical-forms values.
+ if (valueID == CSSValueNormal || valueID == CSSValueHistoricalForms)
+ 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">@@ -1170,6 +1182,9 @@
</span><span class="cx"> #if ENABLE(CSS_TRAILING_WORD)
</span><span class="cx"> case CSSPropertyAppleTrailingWord:
</span><span class="cx"> #endif
</span><ins>+ case CSSPropertyFontVariantPosition:
+ case CSSPropertyFontVariantCaps:
+ case CSSPropertyFontVariantAlternates:
</ins><span class="cx"> return true;
</span><span class="cx"> default:
</span><span class="cx"> return false;
</span><span class="lines">@@ -3077,13 +3092,25 @@
</span><span class="cx"> else
</span><span class="cx"> return parseFontFeatureSettings(important);
</span><span class="cx"> break;
</span><del>-
- case CSSPropertyWebkitFontVariantLigatures:
- if (id == CSSValueNormal)
</del><ins>+ case CSSPropertyFontVariantLigatures:
+ if (id == CSSValueNormal || id == CSSValueNone)
</ins><span class="cx"> validPrimitive = true;
</span><span class="cx"> else
</span><span class="cx"> return parseFontVariantLigatures(important);
</span><span class="cx"> break;
</span><ins>+ case CSSPropertyFontVariantNumeric:
+ if (id == CSSValueNormal)
+ validPrimitive = true;
+ else
+ return parseFontVariantNumeric(important);
+ break;
+ case CSSPropertyFontVariantEastAsian:
+ if (id == CSSValueNormal)
+ validPrimitive = true;
+ else
+ return parseFontVariantEastAsian(important);
+ break;
+
</ins><span class="cx"> case CSSPropertyWebkitClipPath:
</span><span class="cx"> parsedValue = parseClipPath();
</span><span class="cx"> break;
</span><span class="lines">@@ -10465,23 +10492,21 @@
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseFontFeatureTag(CSSValueList& settings)
</span><span class="cx"> {
</span><del>- // Feature tag name consists of 4-letter characters.
- static const unsigned tagNameLength = 4;
-
</del><span class="cx"> CSSParserValue* value = m_valueList->current();
</span><span class="cx"> // Feature tag name comes first
</span><span class="cx"> if (value->unit != CSSPrimitiveValue::CSS_STRING)
</span><span class="cx"> return false;
</span><del>- if (value->string.length() != tagNameLength)
</del><ins>+ FontFeatureTag tag;
+ if (value->string.length() != tag.size())
</ins><span class="cx"> return false;
</span><del>- for (unsigned i = 0; i < tagNameLength; ++i) {
</del><ins>+ for (unsigned i = 0; i < tag.size(); ++i) {
</ins><span class="cx"> // Limits the range of characters to 0x20-0x7E, following the tag name rules defiend in the OpenType specification.
</span><span class="cx"> UChar character = value->string[i];
</span><span class="cx"> if (character < 0x20 || character > 0x7E)
</span><span class="cx"> return false;
</span><ins>+ tag[i] = toASCIILower(character);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- String tag = value->string;
</del><span class="cx"> int tagValue = 1;
</span><span class="cx"> // Feature tag values could follow: <integer> | on | off
</span><span class="cx"> value = m_valueList->next();
</span><span class="lines">@@ -10496,7 +10521,7 @@
</span><span class="cx"> m_valueList->next();
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- settings.append(CSSFontFeatureValue::create(tag, tagValue));
</del><ins>+ settings.append(CSSFontFeatureValue::create(WTF::move(tag), tagValue));
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -10528,10 +10553,11 @@
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseFontVariantLigatures(bool important)
</span><span class="cx"> {
</span><del>- RefPtr<CSSValueList> ligatureValues = CSSValueList::createSpaceSeparated();
- bool sawCommonLigaturesValue = false;
- bool sawDiscretionaryLigaturesValue = false;
- bool sawHistoricalLigaturesValue = false;
</del><ins>+ auto values = CSSValueList::createSpaceSeparated();
+ bool sawCommonValue = false;
+ bool sawDiscretionaryValue = false;
+ bool sawHistoricalValue = false;
+ bool sawContextualValue = false;
</ins><span class="cx">
</span><span class="cx"> for (CSSParserValue* value = m_valueList->current(); value; value = m_valueList->next()) {
</span><span class="cx"> if (value->unit != CSSPrimitiveValue::CSS_IDENT)
</span><span class="lines">@@ -10540,37 +10566,151 @@
</span><span class="cx"> switch (value->id) {
</span><span class="cx"> case CSSValueNoCommonLigatures:
</span><span class="cx"> case CSSValueCommonLigatures:
</span><del>- if (sawCommonLigaturesValue)
</del><ins>+ if (sawCommonValue)
</ins><span class="cx"> return false;
</span><del>- sawCommonLigaturesValue = true;
- ligatureValues->append(cssValuePool().createIdentifierValue(value->id));
</del><ins>+ sawCommonValue = true;
+ values->append(cssValuePool().createIdentifierValue(value->id));
</ins><span class="cx"> break;
</span><span class="cx"> case CSSValueNoDiscretionaryLigatures:
</span><span class="cx"> case CSSValueDiscretionaryLigatures:
</span><del>- if (sawDiscretionaryLigaturesValue)
</del><ins>+ if (sawDiscretionaryValue)
</ins><span class="cx"> return false;
</span><del>- sawDiscretionaryLigaturesValue = true;
- ligatureValues->append(cssValuePool().createIdentifierValue(value->id));
</del><ins>+ sawDiscretionaryValue = true;
+ values->append(cssValuePool().createIdentifierValue(value->id));
</ins><span class="cx"> break;
</span><span class="cx"> case CSSValueNoHistoricalLigatures:
</span><span class="cx"> case CSSValueHistoricalLigatures:
</span><del>- if (sawHistoricalLigaturesValue)
</del><ins>+ if (sawHistoricalValue)
</ins><span class="cx"> return false;
</span><del>- sawHistoricalLigaturesValue = true;
- ligatureValues->append(cssValuePool().createIdentifierValue(value->id));
</del><ins>+ sawHistoricalValue = true;
+ values->append(cssValuePool().createIdentifierValue(value->id));
</ins><span class="cx"> break;
</span><ins>+ case CSSValueContextual:
+ case CSSValueNoContextual:
+ if (sawContextualValue)
+ return false;
+ sawContextualValue = true;
+ values->append(cssValuePool().createIdentifierValue(value->id));
+ break;
</ins><span class="cx"> default:
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!ligatureValues->length())
</del><ins>+ if (!values->length())
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- addProperty(CSSPropertyWebkitFontVariantLigatures, ligatureValues.release(), important);
</del><ins>+ addProperty(CSSPropertyFontVariantLigatures, WTF::move(values), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool CSSParser::parseFontVariantNumeric(bool important)
+{
+ auto values = CSSValueList::createSpaceSeparated();
+ bool sawFigureValue = false;
+ bool sawSpacingValue = false;
+ bool sawFractionValue = false;
+ bool sawOrdinal = false;
+ bool sawSlashedZero = false;
+
+ for (CSSParserValue* value = m_valueList->current(); value; value = m_valueList->next()) {
+ if (value->unit != CSSPrimitiveValue::CSS_IDENT)
+ return false;
+
+ switch (value->id) {
+ case CSSValueLiningNums:
+ case CSSValueOldstyleNums:
+ if (sawFigureValue)
+ return false;
+ sawFigureValue = true;
+ values->append(cssValuePool().createIdentifierValue(value->id));
+ break;
+ case CSSValueProportionalNums:
+ case CSSValueTabularNums:
+ if (sawSpacingValue)
+ return false;
+ sawSpacingValue = true;
+ values->append(cssValuePool().createIdentifierValue(value->id));
+ break;
+ case CSSValueDiagonalFractions:
+ case CSSValueStackedFractions:
+ if (sawFractionValue)
+ return false;
+ sawFractionValue = true;
+ values->append(cssValuePool().createIdentifierValue(value->id));
+ break;
+ case CSSValueOrdinal:
+ if (sawOrdinal)
+ return false;
+ sawOrdinal = true;
+ values->append(cssValuePool().createIdentifierValue(value->id));
+ break;
+ case CSSValueSlashedZero:
+ if (sawSlashedZero)
+ return false;
+ sawSlashedZero = true;
+ values->append(cssValuePool().createIdentifierValue(value->id));
+ break;
+ default:
+ return false;
+ }
+ }
+
+ if (!values->length())
+ return false;
+
+ addProperty(CSSPropertyFontVariantNumeric, WTF::move(values), important);
+ return true;
+}
+
+bool CSSParser::parseFontVariantEastAsian(bool important)
+{
+ auto values = CSSValueList::createSpaceSeparated();
+ bool sawVariantValue = false;
+ bool sawWidthValue = false;
+ bool sawRuby = false;
+
+ for (CSSParserValue* value = m_valueList->current(); value; value = m_valueList->next()) {
+ if (value->unit != CSSPrimitiveValue::CSS_IDENT)
+ return false;
+
+ switch (value->id) {
+ case CSSValueJis78:
+ case CSSValueJis83:
+ case CSSValueJis90:
+ case CSSValueJis04:
+ case CSSValueSimplified:
+ case CSSValueTraditional:
+ if (sawVariantValue)
+ return false;
+ sawVariantValue = true;
+ values->append(cssValuePool().createIdentifierValue(value->id));
+ break;
+ case CSSValueFullWidth:
+ case CSSValueProportionalWidth:
+ if (sawWidthValue)
+ return false;
+ sawWidthValue = true;
+ values->append(cssValuePool().createIdentifierValue(value->id));
+ break;
+ case CSSValueRuby:
+ sawRuby = true;
+ break;
+ default:
+ return false;
+ }
+ }
+
+ if (sawRuby)
+ values->append(cssValuePool().createIdentifierValue(CSSValueRuby));
+
+ if (!values->length())
+ return false;
+
+ addProperty(CSSPropertyFontVariantEastAsian, WTF::move(values), important);
+ return true;
+}
+
</ins><span class="cx"> static inline bool isValidWillChangeAnimatableFeature(const CSSParserValue& value)
</span><span class="cx"> {
</span><span class="cx"> if (value.id == CSSValueNone || value.id == CSSValueAuto || value.id == CSSValueAll)
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/css/CSSParser.h (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/css/CSSParser.h        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/css/CSSParser.h        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -347,6 +347,8 @@
</span><span class="cx"> bool parseRegionThread(CSSPropertyID, bool important);
</span><span class="cx">
</span><span class="cx"> bool parseFontVariantLigatures(bool important);
</span><ins>+ bool parseFontVariantNumeric(bool important);
+ bool parseFontVariantEastAsian(bool important);
</ins><span class="cx">
</span><span class="cx"> bool parseWillChange(bool important);
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorecssCSSPrimitiveValueMappingsh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/css/CSSPrimitiveValueMappings.h (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/css/CSSPrimitiveValueMappings.h        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/css/CSSPrimitiveValueMappings.h        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -5324,6 +5324,131 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontVariantPosition position)
+ : CSSValue(PrimitiveClass)
+{
+ m_primitiveUnitType = CSS_VALUE_ID;
+ switch (position) {
+ case FontVariantPosition::Normal:
+ m_value.valueID = CSSValueNormal;
+ break;
+ case FontVariantPosition::Subscript:
+ m_value.valueID = CSSValueSub;
+ break;
+ case FontVariantPosition::Superscript:
+ m_value.valueID = CSSValueSuper;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ break;
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+template<> inline CSSPrimitiveValue::operator FontVariantPosition() const
+{
+ ASSERT(isValueID());
+ switch (m_value.valueID) {
+ case CSSValueNormal:
+ return FontVariantPosition::Normal;
+ case CSSValueSub:
+ return FontVariantPosition::Subscript;
+ case CSSValueSuper:
+ return FontVariantPosition::Superscript;
+ default:
+ break;
+ }
+ ASSERT_NOT_REACHED();
+ return FontVariantPosition::Normal;
+}
+
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontVariantCaps caps)
+ : CSSValue(PrimitiveClass)
+{
+ m_primitiveUnitType = CSS_VALUE_ID;
+ switch (caps) {
+ case FontVariantCaps::Normal:
+ m_value.valueID = CSSValueNormal;
+ break;
+ case FontVariantCaps::Small:
+ m_value.valueID = CSSValueSmallCaps;
+ break;
+ case FontVariantCaps::AllSmall:
+ m_value.valueID = CSSValueAllSmallCaps;
+ break;
+ case FontVariantCaps::Petite:
+ m_value.valueID = CSSValuePetiteCaps;
+ break;
+ case FontVariantCaps::AllPetite:
+ m_value.valueID = CSSValueAllPetiteCaps;
+ break;
+ case FontVariantCaps::Unicase:
+ m_value.valueID = CSSValueUnicase;
+ break;
+ case FontVariantCaps::Titling:
+ m_value.valueID = CSSValueTitlingCaps;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ break;
+ }
+}
+
+template<> inline CSSPrimitiveValue::operator FontVariantCaps() const
+{
+ ASSERT(isValueID());
+ switch (m_value.valueID) {
+ case CSSValueNormal:
+ return FontVariantCaps::Normal;
+ case CSSValueSmallCaps:
+ return FontVariantCaps::Small;
+ case CSSValueAllSmallCaps:
+ return FontVariantCaps::AllSmall;
+ case CSSValuePetiteCaps:
+ return FontVariantCaps::Petite;
+ case CSSValueAllPetiteCaps:
+ return FontVariantCaps::AllPetite;
+ case CSSValueUnicase:
+ return FontVariantCaps::Unicase;
+ case CSSValueTitlingCaps:
+ return FontVariantCaps::Titling;
+ default:
+ break;
+ }
+ ASSERT_NOT_REACHED();
+ return FontVariantCaps::Normal;
+}
+
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontVariantAlternates alternates)
+ : CSSValue(PrimitiveClass)
+{
+ m_primitiveUnitType = CSS_VALUE_ID;
+ switch (alternates) {
+ case FontVariantAlternates::Normal:
+ m_value.valueID = CSSValueNormal;
+ break;
+ case FontVariantAlternates::HistoricalForms:
+ m_value.valueID = CSSValueHistoricalForms;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ break;
+ }
+}
+
+template<> inline CSSPrimitiveValue::operator FontVariantAlternates() const
+{
+ ASSERT(isValueID());
+ switch (m_value.valueID) {
+ case CSSValueNormal:
+ return FontVariantAlternates::Normal;
+ case CSSValueHistoricalForms:
+ return FontVariantAlternates::HistoricalForms;
+ default:
+ break;
+ }
+ ASSERT_NOT_REACHED();
+ return FontVariantAlternates::Normal;
+}
+}
+
</ins><span class="cx"> #endif
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/css/CSSPropertyNames.in (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/css/CSSPropertyNames.in        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/css/CSSPropertyNames.in        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -108,7 +108,12 @@
</span><span class="cx"> font-feature-settings [Inherited, FontProperty, Custom=Initial|Inherit, Converter=FontFeatureSettings, NameForMethods=FeatureSettings]
</span><span class="cx"> -webkit-font-kerning [Inherited, FontProperty, NameForMethods=Kerning]
</span><span class="cx"> -webkit-font-smoothing [Inherited, FontProperty]
</span><del>--webkit-font-variant-ligatures [Inherited, Custom=All]
</del><ins>+font-variant-ligatures [Inherited, FontProperty, NameForMethods=VariantLigatures, Custom=All]
+font-variant-position [Inherited, FontProperty, NameForMethods=VariantPosition]
+font-variant-caps [Inherited, FontProperty, NameForMethods=VariantCaps]
+font-variant-numeric [Inherited, FontProperty, NameForMethods=VariantNumeric, Custom=All]
+font-variant-alternates [Inherited, FontProperty, NameForMethods=VariantAlternates]
+font-variant-east-asian [Inherited, FontProperty, NameForMethods=VariantEastAsian, Custom=All]
</ins><span class="cx"> -webkit-locale [Inherited, Custom=Value]
</span><span class="cx"> -webkit-text-orientation [Inherited, Custom=Value]
</span><span class="cx"> -epub-text-orientation = -webkit-text-orientation
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/css/CSSValueKeywords.in (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/css/CSSValueKeywords.in        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/css/CSSValueKeywords.in        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -70,17 +70,55 @@
</span><span class="cx"> //normal
</span><span class="cx"> small-caps
</span><span class="cx">
</span><del>-// -webkit-font-variant-ligatures:
</del><ins>+// font-variant-ligatures:
</ins><span class="cx"> //
</span><del>-// normal
</del><span class="cx"> common-ligatures
</span><span class="cx"> no-common-ligatures
</span><span class="cx"> discretionary-ligatures
</span><span class="cx"> no-discretionary-ligatures
</span><span class="cx"> historical-ligatures
</span><span class="cx"> no-historical-ligatures
</span><ins>+contextual
+no-contextual
</ins><span class="cx">
</span><ins>+// font-variant-caps
</ins><span class="cx"> //
</span><ins>+// FIXME: Unify this with plain font-variant
+// small-caps
+all-small-caps
+petite-caps
+all-petite-caps
+unicase
+titling-caps
+
+// font-variant-numeric
+//
+lining-nums
+oldstyle-nums
+proportional-nums
+tabular-nums
+diagonal-fractions
+stacked-fractions
+ordinal
+slashed-zero
+
+// font-variant-alternates
+//
+historical-forms
+
+// font-variant-east-asian
+//
+jis78
+jis83
+jis90
+jis04
+simplified
+traditional
+full-width
+proportional-width
+ruby
+
+//
</ins><span class="cx"> // CSS_PROP_FONT_WEIGHT:
</span><span class="cx"> //
</span><span class="cx"> normal
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/css/StyleBuilderConverter.h (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/css/StyleBuilderConverter.h        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/css/StyleBuilderConverter.h        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -112,7 +112,7 @@
</span><span class="cx"> #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
</span><span class="cx"> static bool convertOverflowScrolling(StyleResolver&, CSSValue&);
</span><span class="cx"> #endif
</span><del>- static RefPtr<FontFeatureSettings> convertFontFeatureSettings(StyleResolver&, CSSValue&);
</del><ins>+ static FontFeatureSettings convertFontFeatureSettings(StyleResolver&, CSSValue&);
</ins><span class="cx"> static SVGLength convertSVGLength(StyleResolver&, CSSValue&);
</span><span class="cx"> static Vector<SVGLength> convertSVGLengthVector(StyleResolver&, CSSValue&);
</span><span class="cx"> static Vector<SVGLength> convertStrokeDashArray(StyleResolver&, CSSValue&);
</span><span class="lines">@@ -1003,19 +1003,19 @@
</span><span class="cx"> return Nullopt;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline RefPtr<FontFeatureSettings> StyleBuilderConverter::convertFontFeatureSettings(StyleResolver&, CSSValue& value)
</del><ins>+inline FontFeatureSettings StyleBuilderConverter::convertFontFeatureSettings(StyleResolver&, CSSValue& value)
</ins><span class="cx"> {
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><span class="cx"> ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNormal);
</span><del>- return nullptr;
</del><ins>+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<FontFeatureSettings> settings = FontFeatureSettings::create();
</del><ins>+ FontFeatureSettings settings;
</ins><span class="cx"> for (auto& item : downcast<CSSValueList>(value)) {
</span><span class="cx"> auto& feature = downcast<CSSFontFeatureValue>(item.get());
</span><del>- settings->append(FontFeature(feature.tag(), feature.value()));
</del><ins>+ settings.insert(FontFeature(feature.tag(), feature.value()));
</ins><span class="cx"> }
</span><del>- return WTF::move(settings);
</del><ins>+ return settings;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorecssStyleBuilderCustomh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/css/StyleBuilderCustom.h (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/css/StyleBuilderCustom.h        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/css/StyleBuilderCustom.h        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -90,7 +90,9 @@
</span><span class="cx"> DECLARE_PROPERTY_CUSTOM_HANDLERS(TextShadow);
</span><span class="cx"> DECLARE_PROPERTY_CUSTOM_HANDLERS(WebkitAspectRatio);
</span><span class="cx"> DECLARE_PROPERTY_CUSTOM_HANDLERS(WebkitBoxShadow);
</span><del>- DECLARE_PROPERTY_CUSTOM_HANDLERS(WebkitFontVariantLigatures);
</del><ins>+ DECLARE_PROPERTY_CUSTOM_HANDLERS(FontVariantLigatures);
+ DECLARE_PROPERTY_CUSTOM_HANDLERS(FontVariantNumeric);
+ DECLARE_PROPERTY_CUSTOM_HANDLERS(FontVariantEastAsian);
</ins><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx"> DECLARE_PROPERTY_CUSTOM_HANDLERS(WebkitGridTemplateAreas);
</span><span class="cx"> DECLARE_PROPERTY_CUSTOM_HANDLERS(WebkitGridTemplateColumns);
</span><span class="lines">@@ -1380,71 +1382,232 @@
</span><span class="cx"> styleResolver.style()->clearContent();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline void StyleBuilderCustom::applyInitialWebkitFontVariantLigatures(StyleResolver& styleResolver)
</del><ins>+inline void StyleBuilderCustom::applyInheritFontVariantLigatures(StyleResolver& styleResolver)
</ins><span class="cx"> {
</span><del>- FontDescription fontDescription = styleResolver.fontDescription();
-
- fontDescription.setCommonLigaturesState(FontDescription::NormalLigaturesState);
- fontDescription.setDiscretionaryLigaturesState(FontDescription::NormalLigaturesState);
- fontDescription.setHistoricalLigaturesState(FontDescription::NormalLigaturesState);
-
</del><ins>+ auto fontDescription = styleResolver.fontDescription();
+ fontDescription.setVariantCommonLigatures(styleResolver.parentFontDescription().variantCommonLigatures());
+ fontDescription.setVariantDiscretionaryLigatures(styleResolver.parentFontDescription().variantDiscretionaryLigatures());
+ fontDescription.setVariantHistoricalLigatures(styleResolver.parentFontDescription().variantHistoricalLigatures());
+ fontDescription.setVariantContextualAlternates(styleResolver.parentFontDescription().variantContextualAlternates());
</ins><span class="cx"> styleResolver.setFontDescription(fontDescription);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline void StyleBuilderCustom::applyInheritWebkitFontVariantLigatures(StyleResolver& styleResolver)
</del><ins>+inline void StyleBuilderCustom::applyInitialFontVariantLigatures(StyleResolver& styleResolver)
</ins><span class="cx"> {
</span><del>- const FontDescription& parentFontDescription = styleResolver.parentFontDescription();
- FontDescription fontDescription = styleResolver.fontDescription();
-
- fontDescription.setCommonLigaturesState(parentFontDescription.commonLigaturesState());
- fontDescription.setDiscretionaryLigaturesState(parentFontDescription.discretionaryLigaturesState());
- fontDescription.setHistoricalLigaturesState(parentFontDescription.historicalLigaturesState());
-
</del><ins>+ auto fontDescription = styleResolver.fontDescription();
+ fontDescription.setVariantCommonLigatures(FontVariantLigatures::Normal);
+ fontDescription.setVariantDiscretionaryLigatures(FontVariantLigatures::Normal);
+ fontDescription.setVariantHistoricalLigatures(FontVariantLigatures::Normal);
+ fontDescription.setVariantContextualAlternates(FontVariantLigatures::Normal);
</ins><span class="cx"> styleResolver.setFontDescription(fontDescription);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline void StyleBuilderCustom::applyValueWebkitFontVariantLigatures(StyleResolver& styleResolver, CSSValue& value)
</del><ins>+inline void StyleBuilderCustom::applyValueFontVariantLigatures(StyleResolver& styleResolver, CSSValue& value)
</ins><span class="cx"> {
</span><del>- FontDescription::LigaturesState commonLigaturesState = FontDescription::NormalLigaturesState;
- FontDescription::LigaturesState discretionaryLigaturesState = FontDescription::NormalLigaturesState;
- FontDescription::LigaturesState historicalLigaturesState = FontDescription::NormalLigaturesState;
</del><ins>+ FontVariantLigatures common = FontVariantLigatures::Normal;
+ FontVariantLigatures discretionary = FontVariantLigatures::Normal;
+ FontVariantLigatures historical = FontVariantLigatures::Normal;
+ FontVariantLigatures contextualAlternates = FontVariantLigatures::Normal;
</ins><span class="cx">
</span><span class="cx"> if (is<CSSValueList>(value)) {
</span><span class="cx"> for (auto& item : downcast<CSSValueList>(value)) {
</span><span class="cx"> switch (downcast<CSSPrimitiveValue>(item.get()).getValueID()) {
</span><span class="cx"> case CSSValueNoCommonLigatures:
</span><del>- commonLigaturesState = FontDescription::DisabledLigaturesState;
</del><ins>+ common = FontVariantLigatures::No;
</ins><span class="cx"> break;
</span><span class="cx"> case CSSValueCommonLigatures:
</span><del>- commonLigaturesState = FontDescription::EnabledLigaturesState;
</del><ins>+ common = FontVariantLigatures::Yes;
</ins><span class="cx"> break;
</span><span class="cx"> case CSSValueNoDiscretionaryLigatures:
</span><del>- discretionaryLigaturesState = FontDescription::DisabledLigaturesState;
</del><ins>+ discretionary = FontVariantLigatures::No;
</ins><span class="cx"> break;
</span><span class="cx"> case CSSValueDiscretionaryLigatures:
</span><del>- discretionaryLigaturesState = FontDescription::EnabledLigaturesState;
</del><ins>+ discretionary = FontVariantLigatures::Yes;
</ins><span class="cx"> break;
</span><span class="cx"> case CSSValueNoHistoricalLigatures:
</span><del>- historicalLigaturesState = FontDescription::DisabledLigaturesState;
</del><ins>+ historical = FontVariantLigatures::No;
</ins><span class="cx"> break;
</span><span class="cx"> case CSSValueHistoricalLigatures:
</span><del>- historicalLigaturesState = FontDescription::EnabledLigaturesState;
</del><ins>+ historical = FontVariantLigatures::Yes;
</ins><span class="cx"> break;
</span><ins>+ case CSSValueContextual:
+ contextualAlternates = FontVariantLigatures::Yes;
+ break;
+ case CSSValueNoContextual:
+ contextualAlternates = FontVariantLigatures::No;
+ break;
</ins><span class="cx"> default:
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+ } else {
+ switch (downcast<CSSPrimitiveValue>(value).getValueID()) {
+ case CSSValueNormal:
+ break;
+ case CSSValueNone:
+ common = FontVariantLigatures::No;
+ discretionary = FontVariantLigatures::No;
+ historical = FontVariantLigatures::No;
+ contextualAlternates = FontVariantLigatures::No;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ break;
+ }
+ }
+
+ auto fontDescription = styleResolver.fontDescription();
+ fontDescription.setVariantCommonLigatures(common);
+ fontDescription.setVariantDiscretionaryLigatures(discretionary);
+ fontDescription.setVariantHistoricalLigatures(historical);
+ fontDescription.setVariantContextualAlternates(contextualAlternates);
+ styleResolver.setFontDescription(fontDescription);
+}
+
+inline void StyleBuilderCustom::applyInheritFontVariantNumeric(StyleResolver& styleResolver)
+{
+ auto fontDescription = styleResolver.fontDescription();
+ fontDescription.setVariantNumericFigure(styleResolver.parentFontDescription().variantNumericFigure());
+ fontDescription.setVariantNumericSpacing(styleResolver.parentFontDescription().variantNumericSpacing());
+ fontDescription.setVariantNumericFraction(styleResolver.parentFontDescription().variantNumericFraction());
+ fontDescription.setVariantNumericOrdinal(styleResolver.parentFontDescription().variantNumericOrdinal());
+ fontDescription.setVariantNumericSlashedZero(styleResolver.parentFontDescription().variantNumericSlashedZero());
+ styleResolver.setFontDescription(fontDescription);
+}
+
+inline void StyleBuilderCustom::applyInitialFontVariantNumeric(StyleResolver& styleResolver)
+{
+ auto fontDescription = styleResolver.fontDescription();
+ fontDescription.setVariantNumericFigure(FontVariantNumericFigure::Normal);
+ fontDescription.setVariantNumericSpacing(FontVariantNumericSpacing::Normal);
+ fontDescription.setVariantNumericFraction(FontVariantNumericFraction::Normal);
+ fontDescription.setVariantNumericOrdinal(FontVariantNumericOrdinal::Normal);
+ fontDescription.setVariantNumericSlashedZero(FontVariantNumericSlashedZero::Normal);
+ styleResolver.setFontDescription(fontDescription);
+}
+
+inline void StyleBuilderCustom::applyValueFontVariantNumeric(StyleResolver& styleResolver, CSSValue& value)
+{
+ FontVariantNumericFigure figure = FontVariantNumericFigure::Normal;
+ FontVariantNumericSpacing spacing = FontVariantNumericSpacing::Normal;
+ FontVariantNumericFraction fraction = FontVariantNumericFraction::Normal;
+ FontVariantNumericOrdinal ordinal = FontVariantNumericOrdinal::Normal;
+ FontVariantNumericSlashedZero slashedZero = FontVariantNumericSlashedZero::Normal;
+
+ if (is<CSSValueList>(value)) {
+ for (auto& item : downcast<CSSValueList>(value)) {
+ switch (downcast<CSSPrimitiveValue>(item.get()).getValueID()) {
+ case CSSValueLiningNums:
+ figure = FontVariantNumericFigure::LiningNumbers;
+ break;
+ case CSSValueOldstyleNums:
+ figure = FontVariantNumericFigure::OldStyleNumbers;
+ break;
+ case CSSValueProportionalNums:
+ spacing = FontVariantNumericSpacing::ProportionalNumbers;
+ break;
+ case CSSValueTabularNums:
+ spacing = FontVariantNumericSpacing::TabularNumbers;
+ break;
+ case CSSValueDiagonalFractions:
+ fraction = FontVariantNumericFraction::DiagonalFractions;
+ break;
+ case CSSValueStackedFractions:
+ fraction = FontVariantNumericFraction::StackedFractions;
+ break;
+ case CSSValueOrdinal:
+ ordinal = FontVariantNumericOrdinal::Yes;
+ break;
+ case CSSValueSlashedZero:
+ slashedZero = FontVariantNumericSlashedZero::Yes;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ break;
+ }
+ }
</ins><span class="cx"> } else
</span><span class="cx"> ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNormal);
</span><span class="cx">
</span><del>- FontDescription fontDescription = styleResolver.fontDescription();
- fontDescription.setCommonLigaturesState(commonLigaturesState);
- fontDescription.setDiscretionaryLigaturesState(discretionaryLigaturesState);
- fontDescription.setHistoricalLigaturesState(historicalLigaturesState);
</del><ins>+ auto fontDescription = styleResolver.fontDescription();
+ fontDescription.setVariantNumericFigure(figure);
+ fontDescription.setVariantNumericSpacing(spacing);
+ fontDescription.setVariantNumericFraction(fraction);
+ fontDescription.setVariantNumericOrdinal(ordinal);
+ fontDescription.setVariantNumericSlashedZero(slashedZero);
</ins><span class="cx"> styleResolver.setFontDescription(fontDescription);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline void StyleBuilderCustom::applyInheritFontVariantEastAsian(StyleResolver& styleResolver)
+{
+ auto fontDescription = styleResolver.fontDescription();
+ fontDescription.setVariantEastAsianVariant(styleResolver.parentFontDescription().variantEastAsianVariant());
+ fontDescription.setVariantEastAsianWidth(styleResolver.parentFontDescription().variantEastAsianWidth());
+ fontDescription.setVariantEastAsianRuby(styleResolver.parentFontDescription().variantEastAsianRuby());
+ styleResolver.setFontDescription(fontDescription);
+}
+
+inline void StyleBuilderCustom::applyInitialFontVariantEastAsian(StyleResolver& styleResolver)
+{
+ auto fontDescription = styleResolver.fontDescription();
+ fontDescription.setVariantEastAsianVariant(FontVariantEastAsianVariant::Normal);
+ fontDescription.setVariantEastAsianWidth(FontVariantEastAsianWidth::Normal);
+ fontDescription.setVariantEastAsianRuby(FontVariantEastAsianRuby::Normal);
+ styleResolver.setFontDescription(fontDescription);
+}
+
+inline void StyleBuilderCustom::applyValueFontVariantEastAsian(StyleResolver& styleResolver, CSSValue& value)
+{
+ FontVariantEastAsianVariant variant = FontVariantEastAsianVariant::Normal;
+ FontVariantEastAsianWidth width = FontVariantEastAsianWidth::Normal;
+ FontVariantEastAsianRuby ruby = FontVariantEastAsianRuby::Normal;
+
+ if (is<CSSValueList>(value)) {
+ for (auto& item : downcast<CSSValueList>(value)) {
+ switch (downcast<CSSPrimitiveValue>(item.get()).getValueID()) {
+ case CSSValueJis78:
+ variant = FontVariantEastAsianVariant::Jis78;
+ break;
+ case CSSValueJis83:
+ variant = FontVariantEastAsianVariant::Jis83;
+ break;
+ case CSSValueJis90:
+ variant = FontVariantEastAsianVariant::Jis90;
+ break;
+ case CSSValueJis04:
+ variant = FontVariantEastAsianVariant::Jis04;
+ break;
+ case CSSValueSimplified:
+ variant = FontVariantEastAsianVariant::Simplified;
+ break;
+ case CSSValueTraditional:
+ variant = FontVariantEastAsianVariant::Traditional;
+ break;
+ case CSSValueFullWidth:
+ width = FontVariantEastAsianWidth::FullWidth;
+ break;
+ case CSSValueProportionalWidth:
+ width = FontVariantEastAsianWidth::ProportionalWidth;
+ break;
+ case CSSValueRuby:
+ ruby = FontVariantEastAsianRuby::Yes;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ break;
+ }
+ }
+ } else
+ ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNormal);
+
+ auto fontDescription = styleResolver.fontDescription();
+ fontDescription.setVariantEastAsianVariant(variant);
+ fontDescription.setVariantEastAsianWidth(width);
+ fontDescription.setVariantEastAsianRuby(ruby);
+ styleResolver.setFontDescription(fontDescription);
+}
+
</ins><span class="cx"> inline void StyleBuilderCustom::applyInitialFontSize(StyleResolver& styleResolver)
</span><span class="cx"> {
</span><span class="cx"> FontDescription fontDescription = styleResolver.style()->fontDescription();
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreeditingcocoaHTMLConvertermm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/editing/cocoa/HTMLConverter.mm (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/editing/cocoa/HTMLConverter.mm        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/editing/cocoa/HTMLConverter.mm        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -1156,7 +1156,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- String fontLigatures = _caches->propertyValueForNode(element, CSSPropertyWebkitFontVariantLigatures);
</del><ins>+ String fontLigatures = _caches->propertyValueForNode(element, CSSPropertyFontVariantLigatures);
</ins><span class="cx"> if (fontLigatures.length()) {
</span><span class="cx"> if (fontLigatures.contains("normal"))
</span><span class="cx"> ; // default: whatever the system decides to do
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsFontCachecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/FontCache.cpp (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/FontCache.cpp        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/FontCache.cpp        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -105,9 +105,12 @@
</span><span class="cx"> , m_family(family)
</span><span class="cx"> { }
</span><span class="cx">
</span><del>- FontPlatformDataCacheKey(HashTableDeletedValueType) : m_fontDescriptionKey(hashTableDeletedSize()) { }
- bool isHashTableDeletedValue() const { return m_fontDescriptionKey.size == hashTableDeletedSize(); }
</del><ins>+ explicit FontPlatformDataCacheKey(HashTableDeletedValueType t)
+ : m_fontDescriptionKey(t)
+ { }
</ins><span class="cx">
</span><ins>+ bool isHashTableDeletedValue() const { return m_fontDescriptionKey.isHashTableDeletedValue(); }
+
</ins><span class="cx"> bool operator==(const FontPlatformDataCacheKey& other) const
</span><span class="cx"> {
</span><span class="cx"> return equalIgnoringCase(m_family, other.m_family) && m_fontDescriptionKey == other.m_fontDescriptionKey;
</span><span class="lines">@@ -115,9 +118,6 @@
</span><span class="cx">
</span><span class="cx"> FontDescriptionFontDataCacheKey m_fontDescriptionKey;
</span><span class="cx"> AtomicString m_family;
</span><del>-
-private:
- static unsigned hashTableDeletedSize() { return 0xFFFFFFFFU; }
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> inline unsigned computeHash(const FontPlatformDataCacheKey& fontKey)
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsFontCacheh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/FontCache.h (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/FontCache.h        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/FontCache.h        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -32,11 +32,13 @@
</span><span class="cx">
</span><span class="cx"> #include "FontDescription.h"
</span><span class="cx"> #include "Timer.h"
</span><ins>+#include <array>
</ins><span class="cx"> #include <limits.h>
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><ins>+#include <wtf/text/AtomicStringHash.h>
</ins><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="lines">@@ -67,40 +69,74 @@
</span><span class="cx">
</span><span class="cx"> // This key contains the FontDescription fields other than family that matter when fetching FontDatas (platform fonts).
</span><span class="cx"> struct FontDescriptionFontDataCacheKey {
</span><del>- explicit FontDescriptionFontDataCacheKey(unsigned size = 0)
- : size(size)
- , weight(0)
- , flags(0)
- { }
</del><ins>+ FontDescriptionFontDataCacheKey() = default;
+
</ins><span class="cx"> FontDescriptionFontDataCacheKey(const FontDescription& description)
</span><del>- : size(description.computedPixelSize())
- , weight(description.weight())
- , flags(makeFlagKey(description))
</del><ins>+ : m_size(description.computedPixelSize())
+ , m_weight(description.weight())
+ , m_flags(makeFlagsKey(description))
+ , m_featureSettings(description.featureSettings())
</ins><span class="cx"> { }
</span><del>- static unsigned makeFlagKey(const FontDescription& description)
- {
- return static_cast<unsigned>(description.fontSynthesis()) << 6
- | static_cast<unsigned>(description.widthVariant()) << 4
- | static_cast<unsigned>(description.nonCJKGlyphOrientation()) << 3
- | static_cast<unsigned>(description.orientation()) << 2
- | static_cast<unsigned>(description.italic()) << 1
- | static_cast<unsigned>(description.renderingMode());
- }
</del><ins>+
+ explicit FontDescriptionFontDataCacheKey(WTF::HashTableDeletedValueType)
+ : m_size(cHashTableDeletedSize)
+ { }
+
</ins><span class="cx"> bool operator==(const FontDescriptionFontDataCacheKey& other) const
</span><span class="cx"> {
</span><del>- return size == other.size && weight == other.weight && flags == other.flags;
</del><ins>+ return m_size == other.m_size && m_weight == other.m_weight && m_flags == other.m_flags
+ && m_featureSettings == other.m_featureSettings;
</ins><span class="cx"> }
</span><ins>+
</ins><span class="cx"> bool operator!=(const FontDescriptionFontDataCacheKey& other) const
</span><span class="cx"> {
</span><span class="cx"> return !(*this == other);
</span><span class="cx"> }
</span><ins>+
+ bool isHashTableDeletedValue() const { return m_size == cHashTableDeletedSize; }
+
</ins><span class="cx"> inline unsigned computeHash() const
</span><span class="cx"> {
</span><del>- return StringHasher::hashMemory<sizeof(FontDescriptionFontDataCacheKey)>(this);
</del><ins>+ unsigned hashValues[] = { m_size, m_weight, m_flags[0], m_flags[1], m_featureSettings.hash() };
+ return StringHasher::hashMemory(hashValues, sizeof(hashValues));
</ins><span class="cx"> }
</span><del>- unsigned size;
- unsigned weight;
- unsigned flags;
</del><ins>+
+private:
+ static std::array<unsigned, 2> makeFlagsKey(const FontDescription& description)
+ {
+ static_assert(USCRIPT_CODE_LIMIT < 0x1000, "Script code must fit in an unsigned along with the other flags");
+ unsigned first = static_cast<unsigned>(description.script()) << 9
+ | static_cast<unsigned>(description.smallCaps()) << 8
+ | static_cast<unsigned>(description.fontSynthesis()) << 6
+ | static_cast<unsigned>(description.widthVariant()) << 4
+ | static_cast<unsigned>(description.nonCJKGlyphOrientation()) << 3
+ | static_cast<unsigned>(description.orientation()) << 2
+ | static_cast<unsigned>(description.italic()) << 1
+ | static_cast<unsigned>(description.renderingMode());
+ unsigned second = static_cast<unsigned>(description.variantEastAsianRuby()) << 27
+ | static_cast<unsigned>(description.variantEastAsianWidth()) << 25
+ | static_cast<unsigned>(description.variantEastAsianVariant()) << 22
+ | static_cast<unsigned>(description.variantAlternates()) << 21
+ | static_cast<unsigned>(description.variantNumericSlashedZero()) << 20
+ | static_cast<unsigned>(description.variantNumericOrdinal()) << 19
+ | static_cast<unsigned>(description.variantNumericFraction()) << 17
+ | static_cast<unsigned>(description.variantNumericSpacing()) << 15
+ | static_cast<unsigned>(description.variantNumericFigure()) << 13
+ | static_cast<unsigned>(description.variantCaps()) << 10
+ | static_cast<unsigned>(description.variantPosition()) << 8
+ | static_cast<unsigned>(description.variantContextualAlternates()) << 6
+ | static_cast<unsigned>(description.variantHistoricalLigatures()) << 4
+ | static_cast<unsigned>(description.variantDiscretionaryLigatures()) << 2
+ | static_cast<unsigned>(description.variantCommonLigatures());
+ return {{ first, second }};
+ }
+
+ static const unsigned cHashTableDeletedSize = 0xFFFFFFFFU;
+
+ unsigned m_size { 0 };
+ unsigned m_weight { 0 };
+ std::array<unsigned, 2> m_flags {{ 0, 0 }};
+ FontFeatureSettings m_featureSettings;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> class FontCache {
</span><span class="lines">@@ -182,7 +218,7 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-RetainPtr<CTFontRef> applyFontFeatureSettings(CTFontRef, const FontFeatureSettings*);
</del><ins>+RetainPtr<CTFontRef> applyFontFeatureSettings(CTFontRef, const FontFeatureSettings&, const FontVariantSettings&);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if !PLATFORM(MAC)
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsFontCascadecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/FontCascade.cpp (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/FontCascade.cpp        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/FontCascade.cpp        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -200,7 +200,6 @@
</span><span class="cx"> Vector<AtomicString, 3> families;
</span><span class="cx"> unsigned fontSelectorId;
</span><span class="cx"> unsigned fontSelectorVersion;
</span><del>- unsigned fontSelectorFlags;
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> struct FontCascadeCacheEntry {
</span><span class="lines">@@ -220,7 +219,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (a.fontDescriptionCacheKey != b.fontDescriptionCacheKey)
</span><span class="cx"> return false;
</span><del>- if (a.fontSelectorId != b.fontSelectorId || a.fontSelectorVersion != b.fontSelectorVersion || a.fontSelectorFlags != b.fontSelectorFlags)
</del><ins>+ if (a.fontSelectorId != b.fontSelectorId || a.fontSelectorVersion != b.fontSelectorVersion)
</ins><span class="cx"> return false;
</span><span class="cx"> if (a.families.size() != b.families.size())
</span><span class="cx"> return false;
</span><span class="lines">@@ -248,11 +247,6 @@
</span><span class="cx"> value->fonts.get().widthCache().clear();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static unsigned makeFontSelectorFlags(const FontDescription& description)
-{
- return static_cast<unsigned>(description.script()) << 1 | static_cast<unsigned>(description.smallCaps());
-}
-
</del><span class="cx"> static FontCascadeCacheKey makeFontCascadeCacheKey(const FontDescription& description, FontSelector* fontSelector)
</span><span class="cx"> {
</span><span class="cx"> FontCascadeCacheKey key;
</span><span class="lines">@@ -261,7 +255,6 @@
</span><span class="cx"> key.families.append(description.familyAt(i));
</span><span class="cx"> key.fontSelectorId = fontSelector ? fontSelector->uniqueId() : 0;
</span><span class="cx"> key.fontSelectorVersion = fontSelector ? fontSelector->version() : 0;
</span><del>- key.fontSelectorFlags = fontSelector && fontSelector->resolvesFamilyFor(description) ? makeFontSelectorFlags(description) : 0;
</del><span class="cx"> return key;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -273,7 +266,6 @@
</span><span class="cx"> hashCodes.uncheckedAppend(key.fontDescriptionCacheKey.computeHash());
</span><span class="cx"> hashCodes.uncheckedAppend(key.fontSelectorId);
</span><span class="cx"> hashCodes.uncheckedAppend(key.fontSelectorVersion);
</span><del>- hashCodes.uncheckedAppend(key.fontSelectorFlags);
</del><span class="cx"> for (unsigned i = 0; i < key.families.size(); ++i)
</span><span class="cx"> hashCodes.uncheckedAppend(key.families[i].impl() ? CaseFoldingHash::hash(key.families[i]) : 0);
</span><span class="cx">
</span><span class="lines">@@ -624,7 +616,8 @@
</span><span class="cx"> return Simple;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- if (m_fontDescription.featureSettings() && m_fontDescription.featureSettings()->size() > 0)
</del><ins>+ // FIXME: This shouldn't be necessary because Font::applyTransforms() should perform all necessary shaping.
+ if (m_fontDescription.featureSettings().size() > 0 || !m_fontDescription.variantSettings().isAllNormal())
</ins><span class="cx"> return Complex;
</span><span class="cx">
</span><span class="cx"> if (run.length() > 1 && !WidthIterator::supportsTypesettingFeatures(*this))
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsFontCascadeh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/FontCascade.h (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/FontCascade.h        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/FontCascade.h        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -333,14 +333,14 @@
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- switch (m_fontDescription.commonLigaturesState()) {
- case FontDescription::DisabledLigaturesState:
</del><ins>+ switch (m_fontDescription.variantCommonLigatures()) {
+ case FontVariantLigatures::No:
</ins><span class="cx"> features &= ~Ligatures;
</span><span class="cx"> break;
</span><del>- case FontDescription::EnabledLigaturesState:
</del><ins>+ case FontVariantLigatures::Yes:
</ins><span class="cx"> features |= Ligatures;
</span><span class="cx"> break;
</span><del>- case FontDescription::NormalLigaturesState:
</del><ins>+ default:
</ins><span class="cx"> break;
</span><span class="cx"> }
</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 (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.cpp        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.cpp        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -40,8 +40,6 @@
</span><span class="cx"> uint32_t bitfields2 : 8;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-COMPILE_ASSERT(sizeof(FontDescription) == sizeof(SameSizeAsFontDescription), FontDescription_should_stay_small);
-
</del><span class="cx"> FontWeight FontDescription::lighterWeight(void) const
</span><span class="cx"> {
</span><span class="cx"> switch (m_weight) {
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsFontDescriptionh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.h (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.h        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.h        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -42,8 +42,6 @@
</span><span class="cx"> public:
</span><span class="cx"> enum Kerning { AutoKerning, NormalKerning, NoneKerning };
</span><span class="cx">
</span><del>- enum LigaturesState { NormalLigaturesState, DisabledLigaturesState, EnabledLigaturesState };
-
</del><span class="cx"> FontDescription()
</span><span class="cx"> : m_families(1)
</span><span class="cx"> , m_specifiedSize(0)
</span><span class="lines">@@ -57,15 +55,27 @@
</span><span class="cx"> , m_weight(FontWeightNormal)
</span><span class="cx"> , m_renderingMode(NormalRenderingMode)
</span><span class="cx"> , m_kerning(AutoKerning)
</span><del>- , m_commonLigaturesState(NormalLigaturesState)
- , m_discretionaryLigaturesState(NormalLigaturesState)
- , m_historicalLigaturesState(NormalLigaturesState)
</del><span class="cx"> , m_keywordSize(0)
</span><span class="cx"> , m_fontSmoothing(AutoSmoothing)
</span><span class="cx"> , m_textRendering(AutoTextRendering)
</span><span class="cx"> , m_isSpecifiedFont(false)
</span><span class="cx"> , m_script(USCRIPT_COMMON)
</span><span class="cx"> , m_fontSynthesis(initialFontSynthesis())
</span><ins>+ , m_variantCommonLigatures(static_cast<unsigned>(FontVariantLigatures::Normal))
+ , m_variantDiscretionaryLigatures(static_cast<unsigned>(FontVariantLigatures::Normal))
+ , m_variantHistoricalLigatures(static_cast<unsigned>(FontVariantLigatures::Normal))
+ , m_variantContextualAlternates(static_cast<unsigned>(FontVariantLigatures::Normal))
+ , m_variantPosition(static_cast<unsigned>(FontVariantPosition::Normal))
+ , m_variantCaps(static_cast<unsigned>(FontVariantCaps::Normal))
+ , m_variantNumericFigure(static_cast<unsigned>(FontVariantNumericFigure::Normal))
+ , m_variantNumericSpacing(static_cast<unsigned>(FontVariantNumericSpacing::Normal))
+ , m_variantNumericFraction(static_cast<unsigned>(FontVariantNumericFraction::Normal))
+ , m_variantNumericOrdinal(static_cast<unsigned>(FontVariantNumericOrdinal::Normal))
+ , m_variantNumericSlashedZero(static_cast<unsigned>(FontVariantNumericSlashedZero::Normal))
+ , m_variantAlternates(static_cast<unsigned>(FontVariantAlternates::Normal))
+ , m_variantEastAsianVariant(static_cast<unsigned>(FontVariantEastAsianVariant::Normal))
+ , m_variantEastAsianWidth(static_cast<unsigned>(FontVariantEastAsianWidth::Normal))
+ , m_variantEastAsianRuby(static_cast<unsigned>(FontVariantEastAsianRuby::Normal))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -90,9 +100,6 @@
</span><span class="cx"> bool useFixedDefaultSize() const { return familyCount() == 1 && firstFamily() == monospaceFamily; }
</span><span class="cx"> FontRenderingMode renderingMode() const { return static_cast<FontRenderingMode>(m_renderingMode); }
</span><span class="cx"> Kerning kerning() const { return static_cast<Kerning>(m_kerning); }
</span><del>- LigaturesState commonLigaturesState() const { return static_cast<LigaturesState>(m_commonLigaturesState); }
- LigaturesState discretionaryLigaturesState() const { return static_cast<LigaturesState>(m_discretionaryLigaturesState); }
- LigaturesState historicalLigaturesState() const { return static_cast<LigaturesState>(m_historicalLigaturesState); }
</del><span class="cx"> unsigned keywordSize() const { return m_keywordSize; }
</span><span class="cx"> CSSValueID keywordSizeAsIdentifier() const
</span><span class="cx"> {
</span><span class="lines">@@ -109,8 +116,41 @@
</span><span class="cx"> FontOrientation orientation() const { return static_cast<FontOrientation>(m_orientation); }
</span><span class="cx"> NonCJKGlyphOrientation nonCJKGlyphOrientation() const { return static_cast<NonCJKGlyphOrientation>(m_nonCJKGlyphOrientation); }
</span><span class="cx"> FontWidthVariant widthVariant() const { return static_cast<FontWidthVariant>(m_widthVariant); }
</span><del>- FontFeatureSettings* featureSettings() const { return m_featureSettings.get(); }
</del><ins>+ const FontFeatureSettings& featureSettings() const { return m_featureSettings; }
</ins><span class="cx"> FontSynthesis fontSynthesis() const { return static_cast<FontSynthesis>(m_fontSynthesis); }
</span><ins>+ FontVariantLigatures variantCommonLigatures() const { return static_cast<FontVariantLigatures>(m_variantCommonLigatures); }
+ FontVariantLigatures variantDiscretionaryLigatures() const { return static_cast<FontVariantLigatures>(m_variantDiscretionaryLigatures); }
+ FontVariantLigatures variantHistoricalLigatures() const { return static_cast<FontVariantLigatures>(m_variantHistoricalLigatures); }
+ FontVariantLigatures variantContextualAlternates() const { return static_cast<FontVariantLigatures>(m_variantContextualAlternates); }
+ FontVariantPosition variantPosition() const { return static_cast<FontVariantPosition>(m_variantPosition); }
+ FontVariantCaps variantCaps() const { return static_cast<FontVariantCaps>(m_variantCaps); }
+ FontVariantNumericFigure variantNumericFigure() const { return static_cast<FontVariantNumericFigure>(m_variantNumericFigure); }
+ FontVariantNumericSpacing variantNumericSpacing() const { return static_cast<FontVariantNumericSpacing>(m_variantNumericSpacing); }
+ FontVariantNumericFraction variantNumericFraction() const { return static_cast<FontVariantNumericFraction>(m_variantNumericFraction); }
+ FontVariantNumericOrdinal variantNumericOrdinal() const { return static_cast<FontVariantNumericOrdinal>(m_variantNumericOrdinal); }
+ FontVariantNumericSlashedZero variantNumericSlashedZero() const { return static_cast<FontVariantNumericSlashedZero>(m_variantNumericSlashedZero); }
+ FontVariantAlternates variantAlternates() const { return static_cast<FontVariantAlternates>(m_variantAlternates); }
+ FontVariantEastAsianVariant variantEastAsianVariant() const { return static_cast<FontVariantEastAsianVariant>(m_variantEastAsianVariant); }
+ FontVariantEastAsianWidth variantEastAsianWidth() const { return static_cast<FontVariantEastAsianWidth>(m_variantEastAsianWidth); }
+ FontVariantEastAsianRuby variantEastAsianRuby() const { return static_cast<FontVariantEastAsianRuby>(m_variantEastAsianRuby); }
+ FontVariantSettings variantSettings() const
+ {
+ return { variantCommonLigatures(),
+ variantDiscretionaryLigatures(),
+ variantHistoricalLigatures(),
+ variantContextualAlternates(),
+ variantPosition(),
+ variantCaps(),
+ variantNumericFigure(),
+ variantNumericSpacing(),
+ variantNumericFraction(),
+ variantNumericOrdinal(),
+ variantNumericSlashedZero(),
+ variantAlternates(),
+ variantEastAsianVariant(),
+ variantEastAsianWidth(),
+ variantEastAsianRuby() };
+ }
</ins><span class="cx">
</span><span class="cx"> void setOneFamily(const AtomicString& family) { ASSERT(m_families.size() == 1); m_families[0] = family; }
</span><span class="cx"> void setFamilies(const Vector<AtomicString>& families) { m_families = RefCountedArray<AtomicString>(families); }
</span><span class="lines">@@ -125,9 +165,6 @@
</span><span class="cx"> void setWeight(FontWeight w) { m_weight = w; }
</span><span class="cx"> void setRenderingMode(FontRenderingMode mode) { m_renderingMode = mode; }
</span><span class="cx"> void setKerning(Kerning kerning) { m_kerning = kerning; }
</span><del>- void setCommonLigaturesState(LigaturesState commonLigaturesState) { m_commonLigaturesState = commonLigaturesState; }
- void setDiscretionaryLigaturesState(LigaturesState discretionaryLigaturesState) { m_discretionaryLigaturesState = discretionaryLigaturesState; }
- void setHistoricalLigaturesState(LigaturesState historicalLigaturesState) { m_historicalLigaturesState = historicalLigaturesState; }
</del><span class="cx"> void setKeywordSize(unsigned size)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(size <= 8);
</span><span class="lines">@@ -148,8 +185,23 @@
</span><span class="cx"> void setNonCJKGlyphOrientation(NonCJKGlyphOrientation orientation) { m_nonCJKGlyphOrientation = orientation; }
</span><span class="cx"> void setWidthVariant(FontWidthVariant widthVariant) { m_widthVariant = widthVariant; }
</span><span class="cx"> void setScript(UScriptCode s) { m_script = s; }
</span><del>- void setFeatureSettings(PassRefPtr<FontFeatureSettings> settings) { m_featureSettings = settings; }
</del><ins>+ void setFeatureSettings(FontFeatureSettings&& settings) { m_featureSettings = WTF::move(settings); }
</ins><span class="cx"> void setFontSynthesis(FontSynthesis fontSynthesis) { m_fontSynthesis = fontSynthesis; }
</span><ins>+ void setVariantCommonLigatures(FontVariantLigatures variant) { m_variantCommonLigatures = static_cast<unsigned>(variant); }
+ void setVariantDiscretionaryLigatures(FontVariantLigatures variant) { m_variantDiscretionaryLigatures = static_cast<unsigned>(variant); }
+ void setVariantHistoricalLigatures(FontVariantLigatures variant) { m_variantHistoricalLigatures = static_cast<unsigned>(variant); }
+ void setVariantContextualAlternates(FontVariantLigatures variant) { m_variantContextualAlternates = static_cast<unsigned>(variant); }
+ void setVariantPosition(FontVariantPosition variant) { m_variantPosition = static_cast<unsigned>(variant); }
+ void setVariantCaps(FontVariantCaps variant) { m_variantCaps = static_cast<unsigned>(variant); }
+ void setVariantNumericFigure(FontVariantNumericFigure variant) { m_variantNumericFigure = static_cast<unsigned>(variant); }
+ void setVariantNumericSpacing(FontVariantNumericSpacing variant) { m_variantNumericSpacing = static_cast<unsigned>(variant); }
+ void setVariantNumericFraction(FontVariantNumericFraction variant) { m_variantNumericFraction = static_cast<unsigned>(variant); }
+ void setVariantNumericOrdinal(FontVariantNumericOrdinal variant) { m_variantNumericOrdinal = static_cast<unsigned>(variant); }
+ void setVariantNumericSlashedZero(FontVariantNumericSlashedZero variant) { m_variantNumericSlashedZero = static_cast<unsigned>(variant); }
+ void setVariantAlternates(FontVariantAlternates variant) { m_variantAlternates = static_cast<unsigned>(variant); }
+ void setVariantEastAsianVariant(FontVariantEastAsianVariant variant) { m_variantEastAsianVariant = static_cast<unsigned>(variant); }
+ void setVariantEastAsianWidth(FontVariantEastAsianWidth variant) { m_variantEastAsianWidth = static_cast<unsigned>(variant); }
+ void setVariantEastAsianRuby(FontVariantEastAsianRuby variant) { m_variantEastAsianRuby = static_cast<unsigned>(variant); }
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(IOS_TEXT_AUTOSIZING)
</span><span class="cx"> bool familiesEqualForTextAutoSizing(const FontDescription& other) const;
</span><span class="lines">@@ -170,10 +222,13 @@
</span><span class="cx"> static FontSmoothingMode initialFontSmoothing() { return AutoSmoothing; }
</span><span class="cx"> static TextRenderingMode initialTextRenderingMode() { return AutoTextRendering; }
</span><span class="cx"> static FontSynthesis initialFontSynthesis() { return FontSynthesisWeight | FontSynthesisStyle; }
</span><ins>+ static FontVariantPosition initialVariantPosition() { return FontVariantPosition::Normal; }
+ static FontVariantCaps initialVariantCaps() { return FontVariantCaps::Normal; }
+ static FontVariantAlternates initialVariantAlternates() { return FontVariantAlternates::Normal; }
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> RefCountedArray<AtomicString> m_families;
</span><del>- RefPtr<FontFeatureSettings> m_featureSettings;
</del><ins>+ FontFeatureSettings m_featureSettings;
</ins><span class="cx">
</span><span class="cx"> float m_specifiedSize; // Specified CSS value. Independent of rendering issues such as integer
</span><span class="cx"> // rounding, minimum font sizes, and zooming.
</span><span class="lines">@@ -193,10 +248,6 @@
</span><span class="cx"> unsigned m_renderingMode : 1; // Used to switch between CG and GDI text on Windows.
</span><span class="cx"> unsigned m_kerning : 2; // Kerning
</span><span class="cx">
</span><del>- unsigned m_commonLigaturesState : 2;
- unsigned m_discretionaryLigaturesState : 2;
- unsigned m_historicalLigaturesState : 2;
-
</del><span class="cx"> unsigned m_keywordSize : 4; // We cache whether or not a font is currently represented by a CSS keyword (e.g., medium). If so,
</span><span class="cx"> // then we can accurately translate across different generic families to adjust for different preference settings
</span><span class="cx"> // (e.g., 13px monospace vs. 16px everything else). Sizes are 1-8 (like the HTML size values for <font>).
</span><span class="lines">@@ -206,6 +257,21 @@
</span><span class="cx"> unsigned m_isSpecifiedFont : 1; // True if a web page specifies a non-generic font family as the first font family.
</span><span class="cx"> unsigned m_script : 7; // Used to help choose an appropriate font for generic font families.
</span><span class="cx"> unsigned m_fontSynthesis : 2; // FontSynthesis type
</span><ins>+ unsigned m_variantCommonLigatures : 2; // FontVariantLigatures
+ unsigned m_variantDiscretionaryLigatures : 2; // FontVariantLigatures
+ unsigned m_variantHistoricalLigatures : 2; // FontVariantLigatures
+ unsigned m_variantContextualAlternates : 2; // FontVariantLigatures
+ unsigned m_variantPosition : 2; // FontVariantPosition
+ unsigned m_variantCaps : 3; // FontVariantCaps
+ unsigned m_variantNumericFigure : 2; // FontVariantNumericFigure
+ unsigned m_variantNumericSpacing : 2; // FontVariantNumericSpacing
+ unsigned m_variantNumericFraction : 2; // FontVariantNumericFraction
+ unsigned m_variantNumericOrdinal : 1; // FontVariantNumericOrdinal
+ unsigned m_variantNumericSlashedZero : 1; // FontVariantNumericSlashedZero
+ unsigned m_variantAlternates : 1; // FontVariantAlternates
+ unsigned m_variantEastAsianVariant : 3; // FontVariantEastAsianVariant
+ unsigned m_variantEastAsianWidth : 2; // FontVariantEastAsianWidth
+ unsigned m_variantEastAsianRuby : 1; // FontVariantEastAsianRuby
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> inline bool FontDescription::operator==(const FontDescription& other) const
</span><span class="lines">@@ -219,9 +285,6 @@
</span><span class="cx"> && m_weight == other.m_weight
</span><span class="cx"> && m_renderingMode == other.m_renderingMode
</span><span class="cx"> && m_kerning == other.m_kerning
</span><del>- && m_commonLigaturesState == other.m_commonLigaturesState
- && m_discretionaryLigaturesState == other.m_discretionaryLigaturesState
- && m_historicalLigaturesState == other.m_historicalLigaturesState
</del><span class="cx"> && m_keywordSize == other.m_keywordSize
</span><span class="cx"> && m_fontSmoothing == other.m_fontSmoothing
</span><span class="cx"> && m_textRendering == other.m_textRendering
</span><span class="lines">@@ -231,7 +294,23 @@
</span><span class="cx"> && m_widthVariant == other.m_widthVariant
</span><span class="cx"> && m_script == other.m_script
</span><span class="cx"> && m_featureSettings == other.m_featureSettings
</span><del>- && m_fontSynthesis == other.m_fontSynthesis;
</del><ins>+ && m_fontSynthesis == other.m_fontSynthesis
+ && m_fontSynthesis == other.m_fontSynthesis
+ && m_variantCommonLigatures == other.m_variantCommonLigatures
+ && m_variantDiscretionaryLigatures == other.m_variantDiscretionaryLigatures
+ && m_variantHistoricalLigatures == other.m_variantHistoricalLigatures
+ && m_variantContextualAlternates == other.m_variantContextualAlternates
+ && m_variantPosition == other.m_variantPosition
+ && m_variantCaps == other.m_variantCaps
+ && m_variantNumericFigure == other.m_variantNumericFigure
+ && m_variantNumericSpacing == other.m_variantNumericSpacing
+ && m_variantNumericFraction == other.m_variantNumericFraction
+ && m_variantNumericOrdinal == other.m_variantNumericOrdinal
+ && m_variantNumericSlashedZero == other.m_variantNumericSlashedZero
+ && m_variantAlternates == other.m_variantAlternates
+ && m_variantEastAsianVariant == other.m_variantEastAsianVariant
+ && m_variantEastAsianWidth == other.m_variantEastAsianWidth
+ && m_variantEastAsianRuby == other.m_variantEastAsianRuby;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsFontFeatureSettingscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/FontFeatureSettings.cpp (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/FontFeatureSettings.cpp        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/FontFeatureSettings.cpp        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -26,21 +26,51 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "FontFeatureSettings.h"
</span><span class="cx">
</span><ins>+#include <wtf/text/AtomicStringHash.h>
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-FontFeature::FontFeature(const AtomicString& tag, int value)
</del><ins>+FontFeature::FontFeature(const FontFeatureTag& tag, int value)
</ins><span class="cx"> : m_tag(tag)
</span><span class="cx"> , m_value(value)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool FontFeature::operator==(const FontFeature& other)
</del><ins>+FontFeature::FontFeature(FontFeatureTag&& tag, int value)
+ : m_tag(WTF::move(tag))
+ , m_value(value)
</ins><span class="cx"> {
</span><ins>+}
+
+bool FontFeature::operator==(const FontFeature& other) const
+{
</ins><span class="cx"> return m_tag == other.m_tag && m_value == other.m_value;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-FontFeatureSettings::FontFeatureSettings()
</del><ins>+bool FontFeature::operator<(const FontFeature& other) const
</ins><span class="cx"> {
</span><ins>+ return (m_tag < other.m_tag) || (m_tag == other.m_tag && m_value < other.m_value);
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+void FontFeatureSettings::insert(FontFeature&& feature)
+{
+ // This vector will almost always have 0 or 1 items in it. Don't bother with the overhead of a binary search or a hash set.
+ size_t i;
+ for (i = 0; i < m_list.size(); ++i) {
+ if (feature < m_list[i])
+ break;
+ }
+ m_list.insert(i, WTF::move(feature));
</ins><span class="cx"> }
</span><ins>+
+unsigned FontFeatureSettings::hash() const
+{
+ unsigned result = 0;
+ for (size_t i = 0; i < size(); ++i) {
+ auto& item = at(i);
+ result = WTF::pairIntHash(result, WTF::pairIntHash(FontFeatureTagHash::hash(item.tag()), item.value()));
+ }
+ return result;
+}
+
+}
</ins></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsFontFeatureSettingsh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/FontFeatureSettings.h (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/FontFeatureSettings.h        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/FontFeatureSettings.h        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #ifndef FontFeatureSettings_h
</span><span class="cx"> #define FontFeatureSettings_h
</span><span class="cx">
</span><ins>+#include <array>
</ins><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="lines">@@ -34,32 +35,55 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+typedef std::array<char, 4> FontFeatureTag;
+
+inline FontFeatureTag fontFeatureTag(const char arr[4]) { return {{ arr[0], arr[1], arr[2], arr[3] }}; }
+
+struct FontFeatureTagHash {
+ static unsigned hash(const FontFeatureTag& characters) { return (characters[0] << 24) | (characters[1] << 16) | (characters[2] << 8) | characters[3]; }
+ static bool equal(const FontFeatureTag& a, const FontFeatureTag& b) { return a == b; }
+ static const bool safeToCompareToEmptyOrDeleted = true;
+};
+
+struct FontFeatureTagHashTraits : WTF::GenericHashTraits<FontFeatureTag> {
+ static const bool emptyValueIsZero = true;
+ static void constructDeletedValue(FontFeatureTag& slot) { new (NotNull, std::addressof(slot)) FontFeatureTag({{ -1, -1, -1, -1 }}); }
+ static bool isDeletedValue(const FontFeatureTag& value) { return value == FontFeatureTag({{ -1, -1, -1, -1 }}); }
+};
+
</ins><span class="cx"> class FontFeature {
</span><span class="cx"> public:
</span><del>- FontFeature(const AtomicString& tag, int value);
- bool operator==(const FontFeature&);
</del><ins>+ FontFeature() = delete;
+ FontFeature(const FontFeatureTag&, int value);
+ FontFeature(FontFeatureTag&&, int value);
</ins><span class="cx">
</span><del>- const AtomicString& tag() const { return m_tag; }
</del><ins>+ bool operator==(const FontFeature& other) const;
+ bool operator<(const FontFeature& other) const;
+
+ const FontFeatureTag& tag() const { return m_tag; }
</ins><span class="cx"> int value() const { return m_value; }
</span><ins>+ bool enabled() const { return value(); }
</ins><span class="cx">
</span><span class="cx"> private:
</span><del>- AtomicString m_tag;
- const int m_value;
</del><ins>+ FontFeatureTag m_tag;
+ int m_value;
</ins><span class="cx"> };
</span><span class="cx">
</span><del>-class FontFeatureSettings : public RefCounted<FontFeatureSettings> {
</del><ins>+class FontFeatureSettings {
</ins><span class="cx"> public:
</span><del>- static Ref<FontFeatureSettings> create()
- {
- return adoptRef(*new FontFeatureSettings);
- }
- void append(const FontFeature& feature) { m_list.append(feature); }
</del><ins>+ void insert(FontFeature&&);
+ bool operator==(const FontFeatureSettings& other) const { return m_list == other.m_list; }
+
</ins><span class="cx"> size_t size() const { return m_list.size(); }
</span><span class="cx"> const FontFeature& operator[](int index) const { return m_list[index]; }
</span><span class="cx"> const FontFeature& at(size_t index) const { return m_list.at(index); }
</span><span class="cx">
</span><ins>+ Vector<FontFeature>::const_iterator begin() const { return m_list.begin(); }
+ Vector<FontFeature>::const_iterator end() const { return m_list.end(); }
+
+ unsigned hash() const;
+
</ins><span class="cx"> private:
</span><del>- FontFeatureSettings();
</del><span class="cx"> Vector<FontFeature> m_list;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicscocoaFontCacheCoreTextcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -23,20 +23,114 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#import "config.h"
-#import "FontCache.h"
</del><ins>+#include "config.h"
+#include "FontCache.h"
</ins><span class="cx">
</span><ins>+#include <CoreText/SFNTLayoutTypes.h>
+
+#include <wtf/HashMap.h>
+#include <wtf/NeverDestroyed.h>
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-static inline void appendTrueTypeFeature(CFMutableArrayRef, const FontFeature&)
</del><ins>+static inline void appendRawTrueTypeFeature(CFMutableArrayRef features, int type, int selector)
</ins><span class="cx"> {
</span><del>- // FIXME: We should map OpenType feature strings to the TrueType feature type identifiers listed in <CoreText/SFNTLayoutTypes.h>.
</del><ins>+ RetainPtr<CFNumberRef> typeNumber = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &type));
+ RetainPtr<CFNumberRef> selectorNumber = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &selector));
+ CFTypeRef featureKeys[] = { kCTFontFeatureTypeIdentifierKey, kCTFontFeatureSelectorIdentifierKey };
+ CFTypeRef featureValues[] = { typeNumber.get(), selectorNumber.get() };
+ RetainPtr<CFDictionaryRef> feature = adoptCF(CFDictionaryCreate(kCFAllocatorDefault, featureKeys, featureValues, WTF_ARRAY_LENGTH(featureKeys), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
+ CFArrayAppendValue(features, feature.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline bool tagEquals(FontFeatureTag tag, const char comparison[4])
+{
+ return equalIgnoringASCIICase(tag.data(), comparison, 4);
+}
+
+static inline void appendTrueTypeFeature(CFMutableArrayRef features, const FontFeature& feature)
+{
+ if (tagEquals(feature.tag(), "liga") || tagEquals(feature.tag(), "clig")) {
+ if (feature.enabled()) {
+ appendRawTrueTypeFeature(features, kLigaturesType, kCommonLigaturesOnSelector);
+ appendRawTrueTypeFeature(features, kLigaturesType, kContextualLigaturesOnSelector);
+ } else {
+ appendRawTrueTypeFeature(features, kLigaturesType, kCommonLigaturesOffSelector);
+ appendRawTrueTypeFeature(features, kLigaturesType, kContextualLigaturesOffSelector);
+ }
+ } else if (tagEquals(feature.tag(), "dlig")) {
+ if (feature.enabled())
+ appendRawTrueTypeFeature(features, kLigaturesType, kRareLigaturesOnSelector);
+ else
+ appendRawTrueTypeFeature(features, kLigaturesType, kRareLigaturesOffSelector);
+ } else if (tagEquals(feature.tag(), "hlig")) {
+ if (feature.enabled())
+ appendRawTrueTypeFeature(features, kLigaturesType, kHistoricalLigaturesOnSelector);
+ else
+ appendRawTrueTypeFeature(features, kLigaturesType, kHistoricalLigaturesOffSelector);
+ } else if (tagEquals(feature.tag(), "calt")) {
+ if (feature.enabled())
+ appendRawTrueTypeFeature(features, kContextualAlternatesType, kContextualAlternatesOnSelector);
+ else
+ appendRawTrueTypeFeature(features, kContextualAlternatesType, kContextualAlternatesOffSelector);
+ } else if (tagEquals(feature.tag(), "subs") && feature.enabled())
+ appendRawTrueTypeFeature(features, kVerticalPositionType, kInferiorsSelector);
+ else if (tagEquals(feature.tag(), "sups") && feature.enabled())
+ appendRawTrueTypeFeature(features, kVerticalPositionType, kSuperiorsSelector);
+ else if (tagEquals(feature.tag(), "smcp") && feature.enabled())
+ appendRawTrueTypeFeature(features, kLowerCaseType, kLowerCaseSmallCapsSelector);
+ else if (tagEquals(feature.tag(), "c2sc") && feature.enabled())
+ appendRawTrueTypeFeature(features, kUpperCaseType, kUpperCaseSmallCapsSelector);
+ else if (tagEquals(feature.tag(), "pcap") && feature.enabled())
+ appendRawTrueTypeFeature(features, kLowerCaseType, kLowerCasePetiteCapsSelector);
+ else if (tagEquals(feature.tag(), "c2pc") && feature.enabled())
+ appendRawTrueTypeFeature(features, kUpperCaseType, kUpperCasePetiteCapsSelector);
+ else if (tagEquals(feature.tag(), "unic") && feature.enabled())
+ appendRawTrueTypeFeature(features, kLetterCaseType, 14);
+ else if (tagEquals(feature.tag(), "titl") && feature.enabled())
+ appendRawTrueTypeFeature(features, kStyleOptionsType, kTitlingCapsSelector);
+ else if (tagEquals(feature.tag(), "lnum") && feature.enabled())
+ appendRawTrueTypeFeature(features, kNumberCaseType, kUpperCaseNumbersSelector);
+ else if (tagEquals(feature.tag(), "onum") && feature.enabled())
+ appendRawTrueTypeFeature(features, kNumberCaseType, kLowerCaseNumbersSelector);
+ else if (tagEquals(feature.tag(), "pnum") && feature.enabled())
+ appendRawTrueTypeFeature(features, kNumberSpacingType, kProportionalNumbersSelector);
+ else if (tagEquals(feature.tag(), "tnum") && feature.enabled())
+ appendRawTrueTypeFeature(features, kNumberSpacingType, kMonospacedNumbersSelector);
+ else if (tagEquals(feature.tag(), "frac") && feature.enabled())
+ appendRawTrueTypeFeature(features, kFractionsType, kDiagonalFractionsSelector);
+ else if (tagEquals(feature.tag(), "afrc") && feature.enabled())
+ appendRawTrueTypeFeature(features, kFractionsType, kVerticalFractionsSelector);
+ else if (tagEquals(feature.tag(), "ordn") && feature.enabled())
+ appendRawTrueTypeFeature(features, kVerticalPositionType, kOrdinalsSelector);
+ else if (tagEquals(feature.tag(), "zero") && feature.enabled())
+ appendRawTrueTypeFeature(features, kTypographicExtrasType, kSlashedZeroOnSelector);
+ else if (tagEquals(feature.tag(), "hist") && feature.enabled())
+ appendRawTrueTypeFeature(features, kLigaturesType, kHistoricalLigaturesOnSelector);
+ else if (tagEquals(feature.tag(), "jp78") && feature.enabled())
+ appendRawTrueTypeFeature(features, kCharacterShapeType, kJIS1978CharactersSelector);
+ else if (tagEquals(feature.tag(), "jp83") && feature.enabled())
+ appendRawTrueTypeFeature(features, kCharacterShapeType, kJIS1983CharactersSelector);
+ else if (tagEquals(feature.tag(), "jp90") && feature.enabled())
+ appendRawTrueTypeFeature(features, kCharacterShapeType, kJIS1990CharactersSelector);
+ else if (tagEquals(feature.tag(), "jp04") && feature.enabled())
+ appendRawTrueTypeFeature(features, kCharacterShapeType, kJIS2004CharactersSelector);
+ else if (tagEquals(feature.tag(), "smpl") && feature.enabled())
+ appendRawTrueTypeFeature(features, kCharacterShapeType, kSimplifiedCharactersSelector);
+ else if (tagEquals(feature.tag(), "trad") && feature.enabled())
+ appendRawTrueTypeFeature(features, kCharacterShapeType, kTraditionalCharactersSelector);
+ else if (tagEquals(feature.tag(), "fwid") && feature.enabled())
+ appendRawTrueTypeFeature(features, kTextSpacingType, kMonospacedTextSelector);
+ else if (tagEquals(feature.tag(), "pwid") && feature.enabled())
+ appendRawTrueTypeFeature(features, kTextSpacingType, kProportionalTextSelector);
+ else if (tagEquals(feature.tag(), "ruby") && feature.enabled())
+ appendRawTrueTypeFeature(features, kRubyKanaType, kRubyKanaOnSelector);
+}
+
</ins><span class="cx"> static inline void appendOpenTypeFeature(CFMutableArrayRef features, const FontFeature& feature)
</span><span class="cx"> {
</span><span class="cx"> #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000)
</span><del>- RetainPtr<CFStringRef> featureKey = feature.tag().string().createCFString();
</del><ins>+ RetainPtr<CFStringRef> featureKey = adoptCF(CFStringCreateWithBytes(kCFAllocatorDefault, reinterpret_cast<const UInt8*>(feature.tag().data()), feature.tag().size() * sizeof(FontFeatureTag::value_type), kCFStringEncodingASCII, false));
</ins><span class="cx"> int rawFeatureValue = feature.value();
</span><span class="cx"> RetainPtr<CFNumberRef> featureValue = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &rawFeatureValue));
</span><span class="cx"> CFStringRef featureDictionaryKeys[] = { kCTFontOpenTypeFeatureTag, kCTFontOpenTypeFeatureValue };
</span><span class="lines">@@ -49,15 +143,198 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RetainPtr<CTFontRef> applyFontFeatureSettings(CTFontRef originalFont, const FontFeatureSettings* features)
</del><ins>+typedef HashMap<FontFeatureTag, int, FontFeatureTagHash, FontFeatureTagHashTraits> FeaturesMap;
+
+static FeaturesMap computeFeatureSettingsFromVariants(const FontVariantSettings& variantSettings)
+{
+ FeaturesMap result;
+
+ switch (variantSettings.commonLigatures) {
+ case FontVariantLigatures::Yes:
+ result.add(fontFeatureTag("liga"), 1);
+ result.add(fontFeatureTag("clig"), 1);
+ break;
+ case FontVariantLigatures::No:
+ result.add(fontFeatureTag("liga"), 0);
+ result.add(fontFeatureTag("clig"), 0);
+ break;
+ default:
+ break;
+ }
+
+ switch (variantSettings.discretionaryLigatures) {
+ case FontVariantLigatures::Yes:
+ result.add(fontFeatureTag("dlig"), 1);
+ break;
+ case FontVariantLigatures::No:
+ result.add(fontFeatureTag("dlig"), 0);
+ break;
+ default:
+ break;
+ }
+
+ switch (variantSettings.historicalLigatures) {
+ case FontVariantLigatures::Yes:
+ result.add(fontFeatureTag("hlig"), 1);
+ break;
+ case FontVariantLigatures::No:
+ result.add(fontFeatureTag("hlig"), 0);
+ break;
+ default:
+ break;
+ }
+
+ switch (variantSettings.contextualAlternates) {
+ case FontVariantLigatures::Yes:
+ result.add(fontFeatureTag("calt"), 1);
+ break;
+ case FontVariantLigatures::No:
+ result.add(fontFeatureTag("calt"), 0);
+ break;
+ default:
+ break;
+ }
+
+ switch (variantSettings.position) {
+ case FontVariantPosition::Subscript:
+ result.add(fontFeatureTag("subs"), 1);
+ break;
+ case FontVariantPosition::Superscript:
+ result.add(fontFeatureTag("sups"), 1);
+ break;
+ default:
+ break;
+ }
+
+ switch (variantSettings.caps) {
+ case FontVariantCaps::AllSmall:
+ result.add(fontFeatureTag("c2sc"), 1);
+ FALLTHROUGH;
+ case FontVariantCaps::Small:
+ result.add(fontFeatureTag("smcp"), 1);
+ break;
+ case FontVariantCaps::AllPetite:
+ result.add(fontFeatureTag("c2pc"), 1);
+ FALLTHROUGH;
+ case FontVariantCaps::Petite:
+ result.add(fontFeatureTag("pcap"), 1);
+ break;
+ case FontVariantCaps::Unicase:
+ result.add(fontFeatureTag("unic"), 1);
+ break;
+ case FontVariantCaps::Titling:
+ result.add(fontFeatureTag("titl"), 1);
+ break;
+ default:
+ break;
+ }
+
+ switch (variantSettings.numericFigure) {
+ case FontVariantNumericFigure::LiningNumbers:
+ result.add(fontFeatureTag("lnum"), 1);
+ break;
+ case FontVariantNumericFigure::OldStyleNumbers:
+ result.add(fontFeatureTag("onum"), 1);
+ break;
+ default:
+ break;
+ }
+
+ switch (variantSettings.numericSpacing) {
+ case FontVariantNumericSpacing::ProportionalNumbers:
+ result.add(fontFeatureTag("pnum"), 1);
+ break;
+ case FontVariantNumericSpacing::TabularNumbers:
+ result.add(fontFeatureTag("tnum"), 1);
+ break;
+ default:
+ break;
+ }
+
+ switch (variantSettings.numericFraction) {
+ case FontVariantNumericFraction::DiagonalFractions:
+ result.add(fontFeatureTag("frac"), 1);
+ break;
+ case FontVariantNumericFraction::StackedFractions:
+ result.add(fontFeatureTag("afrc"), 1);
+ break;
+ default:
+ break;
+ }
+
+ if (variantSettings.numericOrdinal == FontVariantNumericOrdinal::Yes)
+ result.add(fontFeatureTag("ordn"), 1);
+ if (variantSettings.numericSlashedZero == FontVariantNumericSlashedZero::Yes)
+ result.add(fontFeatureTag("zero"), 1);
+
+ switch (variantSettings.alternates) {
+ case FontVariantAlternates::HistoricalForms:
+ result.add(fontFeatureTag("hist"), 1);
+ break;
+ default:
+ break;
+ }
+
+ switch (variantSettings.eastAsianVariant) {
+ case FontVariantEastAsianVariant::Jis78:
+ result.add(fontFeatureTag("jp78"), 1);
+ break;
+ case FontVariantEastAsianVariant::Jis83:
+ result.add(fontFeatureTag("jp83"), 1);
+ break;
+ case FontVariantEastAsianVariant::Jis90:
+ result.add(fontFeatureTag("jp90"), 1);
+ break;
+ case FontVariantEastAsianVariant::Jis04:
+ result.add(fontFeatureTag("jp04"), 1);
+ break;
+ case FontVariantEastAsianVariant::Simplified:
+ result.add(fontFeatureTag("smpl"), 1);
+ break;
+ case FontVariantEastAsianVariant::Traditional:
+ result.add(fontFeatureTag("trad"), 1);
+ break;
+ default:
+ break;
+ }
+
+ switch (variantSettings.eastAsianWidth) {
+ case FontVariantEastAsianWidth::FullWidth:
+ result.add(fontFeatureTag("fwid"), 1);
+ break;
+ case FontVariantEastAsianWidth::ProportionalWidth:
+ result.add(fontFeatureTag("pwid"), 1);
+ break;
+ default:
+ break;
+ }
+
+ if (variantSettings.eastAsianRuby == FontVariantEastAsianRuby::Yes)
+ result.add(fontFeatureTag("ruby"), 1);
+
+ return result;
+}
+
+RetainPtr<CTFontRef> applyFontFeatureSettings(CTFontRef originalFont, const FontFeatureSettings& features, const FontVariantSettings& variantSettings)
</ins><span class="cx"> {
</span><del>- if (!originalFont || !features || !features->size())
</del><ins>+ if (!originalFont || (!features.size() && variantSettings.isAllNormal()))
</ins><span class="cx"> return originalFont;
</span><span class="cx">
</span><del>- RetainPtr<CFMutableArrayRef> featureArray = adoptCF(CFArrayCreateMutable(kCFAllocatorDefault, features->size(), &kCFTypeArrayCallBacks));
- for (size_t i = 0; i < features->size(); ++i) {
- appendTrueTypeFeature(featureArray.get(), features->at(i));
- appendOpenTypeFeature(featureArray.get(), features->at(i));
</del><ins>+ // FIXME: We don't consult with the @font-face first, like the spec says we should.
+
+ // Spec says that font-feature-settings should override font-variant-*.
+ auto fontFeatureSettingsFromVariants = computeFeatureSettingsFromVariants(variantSettings);
+ for (auto& newFeature : features)
+ fontFeatureSettingsFromVariants.set(newFeature.tag(), newFeature.value());
+
+ if (!fontFeatureSettingsFromVariants.size())
+ return originalFont;
+
+ RetainPtr<CFMutableArrayRef> featureArray = adoptCF(CFArrayCreateMutable(kCFAllocatorDefault, features.size(), &kCFTypeArrayCallBacks));
+ for (auto& p : fontFeatureSettingsFromVariants) {
+ auto feature = FontFeature(p.key, p.value);
+ appendTrueTypeFeature(featureArray.get(), feature);
+ appendOpenTypeFeature(featureArray.get(), feature);
</ins><span class="cx"> }
</span><span class="cx"> CFArrayRef featureArrayPtr = featureArray.get();
</span><span class="cx"> RetainPtr<CFDictionaryRef> dictionary = adoptCF(CFDictionaryCreate(kCFAllocatorDefault, (const void**)&kCTFontFeatureSettingsAttribute, (const void**)&featureArrayPtr, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsharfbuzzHarfBuzzShapercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -352,16 +352,14 @@
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- FontFeatureSettings* settings = description.featureSettings();
- if (!settings)
- return;
</del><ins>+ const FontFeatureSettings& settings = description.featureSettings();
</ins><span class="cx">
</span><del>- unsigned numFeatures = settings->size();
</del><ins>+ unsigned numFeatures = settings.size();
</ins><span class="cx"> for (unsigned i = 0; i < numFeatures; ++i) {
</span><span class="cx"> hb_feature_t feature;
</span><del>- auto& tag = settings->at(i).tag();
</del><ins>+ auto& tag = settings[i].tag();
</ins><span class="cx"> feature.tag = HB_TAG(tag[0], tag[1], tag[2], tag[3]);
</span><del>- feature.value = settings->at(i).value();
</del><ins>+ feature.value = settings[i].value();
</ins><span class="cx"> feature.start = 0;
</span><span class="cx"> feature.end = static_cast<unsigned>(-1);
</span><span class="cx"> m_features.append(feature);
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsiosFontCacheIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> if (!substituteFont)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- substituteFont = applyFontFeatureSettings(substituteFont.get(), description.featureSettings());
</del><ins>+ substituteFont = applyFontFeatureSettings(substituteFont.get(), description.featureSettings(), description.variantSettings());
</ins><span class="cx">
</span><span class="cx"> CTFontSymbolicTraits originalTraits = CTFontGetSymbolicTraits(ctFont);
</span><span class="cx"> CTFontSymbolicTraits actualTraits = 0;
</span><span class="lines">@@ -701,7 +701,7 @@
</span><span class="cx"> if (!ctFont)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- ctFont = applyFontFeatureSettings(ctFont.get(), fontDescription.featureSettings());
</del><ins>+ ctFont = applyFontFeatureSettings(ctFont.get(), fontDescription.featureSettings(), fontDescription.variantSettings());
</ins><span class="cx">
</span><span class="cx"> CTFontSymbolicTraits actualTraits = 0;
</span><span class="cx"> if (isFontWeightBold(fontDescription.weight()) || fontDescription.italic())
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsmacFontCacheMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -264,7 +264,7 @@
</span><span class="cx"> // Family name is somewhat of a misnomer here. We first attempt to find an exact match
</span><span class="cx"> // comparing the desiredFamily to the PostScript name of the installed fonts. If that fails
</span><span class="cx"> // we then do a search based on the family names of the installed fonts.
</span><del>-static NSFont *fontWithFamily(const AtomicString& family, NSFontTraitMask desiredTraits, FontWeight weight, const FontFeatureSettings* featureSettings, float size)
</del><ins>+static NSFont *fontWithFamily(const AtomicString& family, NSFontTraitMask desiredTraits, FontWeight weight, const FontFeatureSettings& featureSettings, const FontVariantSettings& variantSettings, float size)
</ins><span class="cx"> {
</span><span class="cx"> if (const auto& specialCase = fontWithFamilySpecialCase(family, weight, desiredTraits, size))
</span><span class="cx"> return specialCase.value();
</span><span class="lines">@@ -287,7 +287,7 @@
</span><span class="cx">
</span><span class="cx"> NSString *desiredFamily = family;
</span><span class="cx"> RetainPtr<CTFontRef> foundFont = adoptCF(CTFontCreateForCSS((CFStringRef)desiredFamily, toCoreTextFontWeight(weight), requestedTraits, size));
</span><del>- foundFont = applyFontFeatureSettings(foundFont.get(), featureSettings);
</del><ins>+ foundFont = applyFontFeatureSettings(foundFont.get(), featureSettings, variantSettings);
</ins><span class="cx"> if (!foundFont)
</span><span class="cx"> return nil;
</span><span class="cx"> font = CFBridgingRelease(CFRetain(foundFont.get()));
</span><span class="lines">@@ -512,7 +512,7 @@
</span><span class="cx"> const FontPlatformData& platformData = originalFontData->platformData();
</span><span class="cx"> NSFont *nsFont = platformData.nsFont();
</span><span class="cx"> RetainPtr<CTFontRef> result = lookupCTFont(platformData.font(), platformData.size(), characters, length);
</span><del>- result = applyFontFeatureSettings(result.get(), description.featureSettings());
</del><ins>+ result = applyFontFeatureSettings(result.get(), description.featureSettings(), description.variantSettings());
</ins><span class="cx"> if (!result)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="lines">@@ -671,7 +671,7 @@
</span><span class="cx"> NSFontTraitMask traits = fontDescription.italic() ? NSFontItalicTrait : 0;
</span><span class="cx"> float size = fontDescription.computedPixelSize();
</span><span class="cx">
</span><del>- NSFont *nsFont = fontWithFamily(family, traits, fontDescription.weight(), fontDescription.featureSettings(), size);
</del><ins>+ NSFont *nsFont = fontWithFamily(family, traits, fontDescription.weight(), fontDescription.featureSettings(), fontDescription.variantSettings(), size);
</ins><span class="cx"> if (!nsFont) {
</span><span class="cx"> if (!shouldAutoActivateFontIfNeeded(family))
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -680,7 +680,7 @@
</span><span class="cx"> // Ignore the result because we want to use our own algorithm to actually find the font.
</span><span class="cx"> [NSFont fontWithName:family size:size];
</span><span class="cx">
</span><del>- nsFont = fontWithFamily(family, traits, fontDescription.weight(), fontDescription.featureSettings(), size);
</del><ins>+ nsFont = fontWithFamily(family, traits, fontDescription.weight(), fontDescription.featureSettings(), fontDescription.variantSettings(), size);
</ins><span class="cx"> if (!nsFont)
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsmacFontCustomPlatformDatacpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> FontWidthVariant widthVariant = fontDescription.widthVariant();
</span><span class="cx"> #if CORETEXT_WEB_FONTS
</span><span class="cx"> RetainPtr<CTFontRef> font = adoptCF(CTFontCreateWithFontDescriptor(m_fontDescriptor.get(), size, nullptr));
</span><del>- font = applyFontFeatureSettings(font.get(), fontDescription.featureSettings());
</del><ins>+ font = applyFontFeatureSettings(font.get(), fontDescription.featureSettings(), fontDescription.variantSettings());
</ins><span class="cx"> return FontPlatformData(font.get(), size, bold, italic, orientation, widthVariant);
</span><span class="cx"> #else
</span><span class="cx"> return FontPlatformData(m_cgFont.get(), size, bold, italic, orientation, widthVariant);
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformtextTextFlagsh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/text/TextFlags.h (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/text/TextFlags.h        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/platform/text/TextFlags.h        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -72,6 +72,119 @@
</span><span class="cx"> typedef unsigned FontSynthesis;
</span><span class="cx"> const unsigned FontSynthesisWidth = 2;
</span><span class="cx">
</span><ins>+enum class FontVariantLigatures {
+ Normal,
+ Yes,
+ No
+};
+
+enum class FontVariantPosition {
+ Normal,
+ Subscript,
+ Superscript
+};
+
+enum class FontVariantCaps {
+ Normal,
+ Small,
+ AllSmall,
+ Petite,
+ AllPetite,
+ Unicase,
+ Titling
+};
+
+enum class FontVariantNumericFigure {
+ Normal,
+ LiningNumbers,
+ OldStyleNumbers
+};
+
+enum class FontVariantNumericSpacing {
+ Normal,
+ ProportionalNumbers,
+ TabularNumbers
+};
+
+enum class FontVariantNumericFraction {
+ Normal,
+ DiagonalFractions,
+ StackedFractions
+};
+
+enum class FontVariantNumericOrdinal {
+ Normal,
+ Yes
+};
+
+enum class FontVariantNumericSlashedZero {
+ Normal,
+ Yes
+};
+
+enum class FontVariantAlternates {
+ Normal,
+ HistoricalForms
+};
+
+enum class FontVariantEastAsianVariant {
+ Normal,
+ Jis78,
+ Jis83,
+ Jis90,
+ Jis04,
+ Simplified,
+ Traditional
+};
+
+enum class FontVariantEastAsianWidth {
+ Normal,
+ FullWidth,
+ ProportionalWidth
+};
+
+enum class FontVariantEastAsianRuby {
+ Normal,
+ Yes
+};
+
+struct FontVariantSettings {
+ bool isAllNormal() const
+ {
+ return commonLigatures == FontVariantLigatures::Normal
+ && discretionaryLigatures == FontVariantLigatures::Normal
+ && historicalLigatures == FontVariantLigatures::Normal
+ && contextualAlternates == FontVariantLigatures::Normal
+ && position == FontVariantPosition::Normal
+ && caps == FontVariantCaps::Normal
+ && numericFigure == FontVariantNumericFigure::Normal
+ && numericSpacing == FontVariantNumericSpacing::Normal
+ && numericFraction == FontVariantNumericFraction::Normal
+ && numericOrdinal == FontVariantNumericOrdinal::Normal
+ && numericSlashedZero == FontVariantNumericSlashedZero::Normal
+ && alternates == FontVariantAlternates::Normal
+ && eastAsianVariant == FontVariantEastAsianVariant::Normal
+ && eastAsianWidth == FontVariantEastAsianWidth::Normal
+ && eastAsianRuby == FontVariantEastAsianRuby::Normal;
+ }
+
+ FontVariantLigatures commonLigatures;
+ FontVariantLigatures discretionaryLigatures;
+ FontVariantLigatures historicalLigatures;
+ FontVariantLigatures contextualAlternates;
+ FontVariantPosition position;
+ FontVariantCaps caps;
+ FontVariantNumericFigure numericFigure;
+ FontVariantNumericSpacing numericSpacing;
+ FontVariantNumericFraction numericFraction;
+ FontVariantNumericOrdinal numericOrdinal;
+ FontVariantNumericSlashedZero numericSlashedZero;
+ FontVariantAlternates alternates;
+ FontVariantEastAsianVariant eastAsianVariant;
+ FontVariantEastAsianWidth eastAsianWidth;
+ FontVariantEastAsianRuby eastAsianRuby;
+};
+
</ins><span class="cx"> enum FontWidthVariant {
</span><span class="cx"> RegularWidth,
</span><span class="cx"> HalfWidth,
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorerenderingRenderThemeIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/rendering/RenderThemeIOS.mm (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/rendering/RenderThemeIOS.mm        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/rendering/RenderThemeIOS.mm        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -1271,7 +1271,7 @@
</span><span class="cx">
</span><span class="cx"> ASSERT(fontDescriptor);
</span><span class="cx"> RetainPtr<CTFontRef> font = adoptCF(CTFontCreateWithFontDescriptor(fontDescriptor.get(), 0, nullptr));
</span><del>- font = applyFontFeatureSettings(font.get(), fontDescription.featureSettings());
</del><ins>+ font = applyFontFeatureSettings(font.get(), fontDescription.featureSettings(), fontDescription.variantSettings(), fontDescription.variantSettings());
</ins><span class="cx"> fontDescription.setIsAbsoluteSize(true);
</span><span class="cx"> fontDescription.setOneFamily(textStyle);
</span><span class="cx"> fontDescription.setSpecifiedSize(CTFontGetSize(font.get()));
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorerenderinglineBreakingContexth"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/rendering/line/BreakingContext.h (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/rendering/line/BreakingContext.h        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Source/WebCore/rendering/line/BreakingContext.h        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -82,6 +82,7 @@
</span><span class="cx"> m_state = WordTrailingSpaceState::Computed;
</span><span class="cx"> return m_width;
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> private:
</span><span class="cx"> enum class WordTrailingSpaceState { Uninitialized, Computed };
</span><span class="cx"> WordTrailingSpaceState m_state { WordTrailingSpaceState::Uninitialized };
</span></span></pre></div>
<a id="branchessafari601branchToolsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Tools/ChangeLog (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Tools/ChangeLog        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Tools/ChangeLog        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-09-23 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [Cocoa] [Font Features] Implement font-variant-*
+ https://bugs.webkit.org/show_bug.cgi?id=148413
+
+ Reviewed by Darin Adler.
+
+ Update test font to use "lnum" feature.
+
+ * FontWithFeatures/FontWithFeatures/FontCreator.cpp:
+ (Generator::appendGSUBTable):
+
</ins><span class="cx"> 2015-12-05 Matthew Hanson <matthew_hanson@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r189943. rdar://problem/23769735
</span></span></pre></div>
<a id="branchessafari601branchToolsFontWithFeaturesFontWithFeaturesFontCreatorcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Tools/FontWithFeatures/FontWithFeatures/FontCreator.cpp (193574 => 193575)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Tools/FontWithFeatures/FontWithFeatures/FontCreator.cpp        2015-12-06 08:10:15 UTC (rev 193574)
+++ branches/safari-601-branch/Tools/FontWithFeatures/FontWithFeatures/FontCreator.cpp        2015-12-06 10:37:02 UTC (rev 193575)
</span><span class="lines">@@ -470,7 +470,7 @@
</span><span class="cx">
</span><span class="cx"> void appendGSUBTable()
</span><span class="cx"> {
</span><del>- std::vector<std::array<char, 5>> features {{"liga"}, {"clig"}, {"dlig"}, {"hlig"}, {"calt"}, {"subs"}, {"sups"}, {"smcp"}, {"c2sc"}, {"pcap"}, {"c2pc"}, {"unic"}, {"titl"}, {"onum"}, {"pnum"}, {"tnum"}, {"frac"}, {"afrc"}, {"ordn"}, {"zero"}, {"hist"}, {"jp78"}, {"jp83"}, {"jp90"}, {"jp04"}, {"smpl"}, {"trad"}, {"fwid"}, {"pwid"}, {"ruby"}};
</del><ins>+ std::vector<std::array<char, 5>> features {{"liga"}, {"clig"}, {"dlig"}, {"hlig"}, {"calt"}, {"subs"}, {"sups"}, {"smcp"}, {"c2sc"}, {"pcap"}, {"c2pc"}, {"unic"}, {"titl"}, {"lnum"}, {"onum"}, {"pnum"}, {"tnum"}, {"frac"}, {"afrc"}, {"ordn"}, {"zero"}, {"hist"}, {"jp78"}, {"jp83"}, {"jp90"}, {"jp04"}, {"smpl"}, {"trad"}, {"fwid"}, {"pwid"}, {"ruby"}};
</ins><span class="cx"> auto tableLocation = result.size();
</span><span class="cx"> auto headerSize = 10;
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>