<!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>[214546] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/214546">214546</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2017-03-29 10:40:21 -0700 (Wed, 29 Mar 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Variation fonts: Make sure that feature detection and preprocessor macros are right
https://bugs.webkit.org/show_bug.cgi?id=169518
Reviewed by Simon Fraser.
Source/WebCore:
When I added variable fonts support, I made all OSes parse the newly accepted values,
instead of just the OSes which support variable fonts.
Test: fast/text/font-variations-feature-detection.html
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeFontStretch):
(WebCore::consumeFontStyle):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::divisibleBy100):
(WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
LayoutTests:
Create platform-specific results for mac-elcapitan which doesn't support variation fonts.
* fast/text/font-variations-feature-detection-expected.html: Added.
* fast/text/font-variations-feature-detection.html: Added.
* platform/ios-simulator/TestExpectations:
* platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt:
* platform/mac-elcapitan/fast/text/font-selection-font-loading-api-parse-expected.txt: Added.
* platform/mac-elcapitan/fast/text/font-stretch-parse-expected.txt: Added.
* platform/mac-elcapitan/fast/text/font-style-parse-expected.txt: Added.
* platform/mac-elcapitan/fast/text/font-weight-parse-expected.txt: Added.
* platform/mac/TestExpectations:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformiosTestExpectations">trunk/LayoutTests/platform/ios/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacelcapitanfasttextfontselectionfontfaceparseexpectedtxt">trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSPropertyParsercpp">trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSPropertyParserHelperscpp">trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasttextfontvariationsfeaturedetectionexpectedhtml">trunk/LayoutTests/fast/text/font-variations-feature-detection-expected.html</a></li>
<li><a href="#trunkLayoutTestsfasttextfontvariationsfeaturedetectionhtml">trunk/LayoutTests/fast/text/font-variations-feature-detection.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacelcapitanfasttextfontselectionfontloadingapiparseexpectedtxt">trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-loading-api-parse-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacelcapitanfasttextfontstretchparseexpectedtxt">trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-stretch-parse-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacelcapitanfasttextfontstyleparseexpectedtxt">trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-style-parse-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacelcapitanfasttextfontweightparseexpectedtxt">trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-weight-parse-expected.txt</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (214545 => 214546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-03-29 17:28:48 UTC (rev 214545)
+++ trunk/LayoutTests/ChangeLog        2017-03-29 17:40:21 UTC (rev 214546)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2017-03-29 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Variation fonts: Make sure that feature detection and preprocessor macros are right
+ https://bugs.webkit.org/show_bug.cgi?id=169518
+
+ Reviewed by Simon Fraser.
+
+ Create platform-specific results for mac-elcapitan which doesn't support variation fonts.
+
+ * fast/text/font-variations-feature-detection-expected.html: Added.
+ * fast/text/font-variations-feature-detection.html: Added.
+ * platform/ios-simulator/TestExpectations:
+ * platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt:
+ * platform/mac-elcapitan/fast/text/font-selection-font-loading-api-parse-expected.txt: Added.
+ * platform/mac-elcapitan/fast/text/font-stretch-parse-expected.txt: Added.
+ * platform/mac-elcapitan/fast/text/font-style-parse-expected.txt: Added.
+ * platform/mac-elcapitan/fast/text/font-weight-parse-expected.txt: Added.
+ * platform/mac/TestExpectations:
+
</ins><span class="cx"> 2017-03-29 Antoine Quint <graouts@apple.com>
</span><span class="cx">
</span><span class="cx"> [Modern Media Controls] Controls bar may disappear while captions menu is visible (redux)
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontvariationsfeaturedetectionexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/font-variations-feature-detection-expected.html (0 => 214546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-variations-feature-detection-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/text/font-variations-feature-detection-expected.html        2017-03-29 17:40:21 UTC (rev 214546)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+This test makes sure that font-variations can be feature-detected on OSes which don't support it.
+<div id="container" style="font-size: 36px;">
+<span style="font-family: 'Helvetica';">Hello</span>
+<span style="font-family: 'Helvetica';">Hello</span>
+<span style="font-family: 'Helvetica';">Hello</span>
+<span style="font-family: 'Helvetica';">Hello</span>
+<span style="font-family: 'Helvetica';">Hello</span>
+<span style="font-family: 'Helvetica';">Hello</span>
+<span style="font-family: 'Helvetica';">Hello</span>
+<span style="font-family: 'Helvetica';">Hello</span>
+<span style="font-family: 'Helvetica';">Hello</span>
+<span style="font-family: 'Helvetica';">Hello</span>
+<span style="font-family: 'Helvetica';">Hello</span>
+<span style="font-family: 'Helvetica';">Hello</span>
+<span>Pass</span>
+<span>Pass</span>
+<span>Pass</span>
+<span>Pass</span>
+<span>Pass</span>
+</div>
+</body>
+</html>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontvariationsfeaturedetectionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/font-variations-feature-detection.html (0 => 214546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-variations-feature-detection.html         (rev 0)
+++ trunk/LayoutTests/fast/text/font-variations-feature-detection.html        2017-03-29 17:40:21 UTC (rev 214546)
</span><span class="lines">@@ -0,0 +1,157 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+        font-family: "WebFont";
+        src: url("../../resources/Ahem.otf") format("woff-variations"), local("Helvetica");
+}
+@font-face {
+        font-family: "WebFont2";
+        src: url("../../resources/Ahem.otf") format("truetype-variations"), local("Helvetica");
+}
+@font-face {
+        font-family: "WebFont3";
+        src: url("../../resources/Ahem.otf") format("opentype-variations"), local("Helvetica");
+}
+
+@font-face {
+        font-family: "WebFont4";
+        font-weight: 100;
+        font-weight: 332;
+        src: url("../../resources/Ahem.otf");
+}
+@font-face {
+        font-family: "WebFont4";
+        font-weight: 200;
+        src: local("Helvetica");
+}
+@font-face {
+        font-family: "WebFont5";
+        font-weight: 700;
+        src: url("../../resources/Ahem.otf");
+}
+@font-face {
+        font-family: "WebFont5";
+        font-weight: 400;
+        src: local("Helvetica");
+}
+
+@font-face {
+        font-family: "WebFont6";
+        font-stretch: ultra-expanded;
+        font-stretch: 110%;
+        src: url("../../resources/Ahem.otf");
+}
+@font-face {
+        font-family: "WebFont6";
+        font-stretch: expanded;
+        src: local("Helvetica");
+}
+@font-face {
+        font-family: "WebFont7";
+        font-stretch: extra-expanded;
+        src: url("../../resources/Ahem.otf");
+}
+@font-face {
+        font-family: "WebFont7";
+        font-stretch: semi-expanded;
+        src: local("Helvetica");
+}
+
+@font-face {
+        font-family: "WebFont8";
+        font-style: oblique;
+        src: url("../../resources/Ahem.otf");
+}
+@font-face {
+        font-family: "WebFont8";
+        font-style: normal;
+        src: local("Helvetica");
+}
+
+#supportsTest1 {
+        font-family: "Helvetica";
+}
+@supports (font-variation-settings: 'abcd' 3) {
+        #supportsTest1 {
+                font-family: "Ahem";
+        }
+}
+#supportsTest2 {
+        font-family: "Helvetica";
+}
+@supports (font-weight: 401) {
+        #supportsTest2 {
+                font-family: "Ahem";
+        }
+}
+#supportsTest3 {
+        font-family: "Helvetica";
+}
+@supports (font-stretch: 101%) {
+        #supportsTest3 {
+                font-family: "Ahem";
+        }
+}
+#supportsTest4 {
+        font-family: "Helvetica";
+}
+@supports (font-style: oblique 21deg) {
+        #supportsTest4 {
+                font-family: "Ahem";
+        }
+}
+</style>
+</head>
+<body>
+This test makes sure that font-variations can be feature-detected on OSes which don't support it.
+<div id="container" style="font-size: 36px;">
+<span style="font-family: 'WebFont';">Hello</span>
+<span style="font-family: 'WebFont2';">Hello</span>
+<span style="font-family: 'WebFont3';">Hello</span>
+<span style="font-family: 'WebFont4';">Hello</span>
+<span style="font-family: 'WebFont5'; font-weight: 899;">Hello</span>
+<span style="font-family: 'WebFont6';">Hello</span>
+<span style="font-family: 'WebFont7'; font-stretch: 200%;">Hello</span>
+<span style="font-family: 'WebFont7'; font-style: italic 80deg;">Hello</span>
+<span id="supportsTest1">Hello</span>
+<span id="supportsTest2">Hello</span>
+<span id="supportsTest3">Hello</span>
+<span id="supportsTest4">Hello</span>
+<span id="result1"></span>
+<span id="result2"></span>
+<span id="result3"></span>
+<span id="result4"></span>
+<span id="result5"></span>
+</div>
+<script>
+var container = document.getElementById("container");
+var result1 = document.getElementById("result1");
+var result2 = document.getElementById("result2");
+var result3 = document.getElementById("result3");
+var result4 = document.getElementById("result4");
+var result5 = document.getElementById("result5");
+if (!CSS.supports("font-variation-settings", "'abcd' 3"))
+        result1.textContent = "Pass";
+else
+        result1.textContent = "Fail";
+if (!CSS.supports("font-weight", "401"))
+        result2.textContent = "Pass";
+else
+        result2.textContent = "Fail";
+if (!CSS.supports("font-stretch", "101%"))
+        result3.textContent = "Pass";
+else
+        result3.textContent = "Fail";
+if (!CSS.supports("font-style", "oblique 21deg"))
+        result4.textContent = "Pass";
+else
+        result4.textContent = "Fail";
+if (!window.getComputedStyle(container).getPropertyValue("font-variation-settings"))
+        result5.textContent = "Pass";
+else
+        result5.textContent = "Fail";
+</script>
+</body>
+</html>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiosTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios/TestExpectations (214545 => 214546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios/TestExpectations        2017-03-29 17:28:48 UTC (rev 214545)
+++ trunk/LayoutTests/platform/ios/TestExpectations        2017-03-29 17:40:21 UTC (rev 214546)
</span><span class="lines">@@ -2742,6 +2742,7 @@
</span><span class="cx"> webkit.org/b/163093 fast/text/variations/advances.html [ Failure ]
</span><span class="cx"> webkit.org/b/163093 fast/text/variations/outofbounds.html [ ImageOnlyFailure ]
</span><span class="cx"> webkit.org/b/163093 fast/text/variations/default-value.html [ ImageOnlyFailure ]
</span><ins>+webkit.org/b/169518 fast/text/font-variations-feature-detection.html [ ImageOnlyFailure ]
</ins><span class="cx">
</span><span class="cx"> webkit.org/b/162647 http/tests/xmlhttprequest/onabort-response-getters.html [ Pass Failure ]
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (214545 => 214546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations        2017-03-29 17:28:48 UTC (rev 214545)
+++ trunk/LayoutTests/platform/mac/TestExpectations        2017-03-29 17:40:21 UTC (rev 214546)
</span><span class="lines">@@ -1431,6 +1431,11 @@
</span><span class="cx"> [ ElCapitan Yosemite ] fast/text/variations [ Pass Failure ImageOnlyFailure ]
</span><span class="cx"> [ ElCapitan Yosemite ] animations/font-variations [ Pass Failure ImageOnlyFailure ]
</span><span class="cx">
</span><ins>+# This test makes sure that variation fonts are disabled on OSes which don't support them. So,
+# the test should be skipped on OSes which do support them. As soon as all OSes support them,
+# we should delete the test.
+[ Sierra+ ] fast/text/font-variations-feature-detection.html [ ImageOnlyFailure ]
+
</ins><span class="cx"> [ Debug ] fast/selectors/slow-style-sharing-with-long-cousin-list.html [ Skip ]
</span><span class="cx">
</span><span class="cx"> webkit.org/b/161720 [ Debug ] storage/indexeddb/key-type-array.html [ Pass Timeout ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacelcapitanfasttextfontselectionfontfaceparseexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt (214545 => 214546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt        2017-03-29 17:28:48 UTC (rev 214545)
+++ trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt        2017-03-29 17:40:21 UTC (rev 214546)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-PASS weightTestSheet.cssRules[0].style.fontWeight is "1"
</del><ins>+FAIL weightTestSheet.cssRules[0].style.fontWeight should be 1. Was .
</ins><span class="cx"> PASS weightTestSheet.cssRules[1].style.fontWeight is "100"
</span><span class="cx"> PASS weightTestSheet.cssRules[2].style.fontWeight is "200"
</span><span class="cx"> PASS weightTestSheet.cssRules[3].style.fontWeight is "300"
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> PASS weightTestSheet.cssRules[12].style.fontWeight is ""
</span><span class="cx"> PASS weightTestSheet.cssRules[13].style.fontWeight is ""
</span><span class="cx"> PASS weightTestSheet.cssRules[14].style.fontWeight is ""
</span><del>-PASS weightTestSheet.cssRules[15].style.fontWeight is "7"
</del><ins>+FAIL weightTestSheet.cssRules[15].style.fontWeight should be 7. Was .
</ins><span class="cx"> PASS weightTestSheet.cssRules[16].style.fontWeight is "300"
</span><span class="cx"> PASS weightTestSheet.cssRules[17].style.fontWeight is "200"
</span><span class="cx"> FAIL weightTestSheet.cssRules[18].style.fontWeight should be 100 200. Was .
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> PASS weightTestSheet.cssRules[28].style.fontWeight is ""
</span><span class="cx"> FAIL weightTestSheet.cssRules[29].style.fontWeight should be 7 8. Was .
</span><span class="cx"> FAIL weightTestSheet.cssRules[30].style.fontWeight should be 2 7. Was .
</span><del>-PASS stretchTestSheet.cssRules[0].style.fontStretch is "1%"
</del><ins>+FAIL stretchTestSheet.cssRules[0].style.fontStretch should be 1%. Was .
</ins><span class="cx"> PASS stretchTestSheet.cssRules[1].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[2].style.fontStretch is "ultra-condensed"
</span><span class="cx"> PASS stretchTestSheet.cssRules[3].style.fontStretch is "extra-condensed"
</span><span class="lines">@@ -71,10 +71,10 @@
</span><span class="cx"> PASS stretchTestSheet.cssRules[39].style.fontStretch is ""
</span><span class="cx"> FAIL stretchTestSheet.cssRules[40].style.fontStretch should be calc(7%) 8%. Was .
</span><span class="cx"> FAIL stretchTestSheet.cssRules[41].style.fontStretch should be 2% calc(7%). Was .
</span><del>-PASS styleTestSheet.cssRules[0].style.fontStyle is "oblique 1deg"
-PASS styleTestSheet.cssRules[1].style.fontStyle is "oblique 20grad"
-PASS styleTestSheet.cssRules[2].style.fontStyle is "oblique 0.28318rad"
-PASS styleTestSheet.cssRules[3].style.fontStyle is "oblique 0.04turn"
</del><ins>+FAIL styleTestSheet.cssRules[0].style.fontStyle should be oblique 1deg. Was .
+FAIL styleTestSheet.cssRules[1].style.fontStyle should be oblique 20grad. Was .
+FAIL styleTestSheet.cssRules[2].style.fontStyle should be oblique 0.28318rad. Was .
+FAIL styleTestSheet.cssRules[3].style.fontStyle should be oblique 0.04turn. Was .
</ins><span class="cx"> PASS styleTestSheet.cssRules[4].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[5].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[6].style.fontStyle is "italic"
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[9].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[10].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[11].style.fontStyle is ""
</span><del>-PASS styleTestSheet.cssRules[12].style.fontStyle is "oblique calc(15.4deg)"
</del><ins>+FAIL styleTestSheet.cssRules[12].style.fontStyle should be oblique calc(15.4deg). Was .
</ins><span class="cx"> PASS styleTestSheet.cssRules[13].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[14].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[15].style.fontStyle is ""
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacelcapitanfasttextfontselectionfontloadingapiparseexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-loading-api-parse-expected.txt (0 => 214546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-loading-api-parse-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-loading-api-parse-expected.txt        2017-03-29 17:40:21 UTC (rev 214546)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+PASS window.getComputedStyle(document.getElementById('test1')).fontStyle is "normal"
+FAIL window.getComputedStyle(document.getElementById('test2')).fontStyle should be oblique 1deg. Was normal.
+FAIL window.getComputedStyle(document.getElementById('test3')).fontStyle should be oblique 18deg. Was normal.
+FAIL window.getComputedStyle(document.getElementById('test4')).fontStyle should be oblique 16deg. Was normal.
+FAIL window.getComputedStyle(document.getElementById('test5')).fontStyle should be oblique 14.25deg. Was normal.
+PASS window.getComputedStyle(document.getElementById('test6')).fontStyle is "normal"
+PASS window.getComputedStyle(document.getElementById('test7')).fontStyle is "normal"
+PASS window.getComputedStyle(document.getElementById('test8')).fontStyle is "italic"
+PASS window.getComputedStyle(document.getElementById('test9')).fontStyle is "italic"
+PASS window.getComputedStyle(document.getElementById('test10')).fontStyle is "normal"
+PASS window.getComputedStyle(document.getElementById('test11')).fontStyle is "normal"
+PASS window.getComputedStyle(document.getElementById('test12')).fontStyle is "normal"
+PASS window.getComputedStyle(document.getElementById('test13')).fontStyle is "normal"
+FAIL window.getComputedStyle(document.getElementById('test14')).fontStyle should be oblique 15.25deg. Was normal.
+PASS window.getComputedStyle(document.getElementById('test15')).fontStyle is "italic"
+PASS window.getComputedStyle(document.getElementById('test16')).fontStyle is "italic"
+PASS window.getComputedStyle(document.getElementById('test17')).fontStyle is "normal"
+PASS window.getComputedStyle(document.getElementById('test18')).fontStyle is "italic"
+PASS window.getComputedStyle(document.getElementById('test19')).fontStyle is "italic"
+PASS window.getComputedStyle(document.getElementById('test20')).fontStyle is "normal"
+FAIL window.getComputedStyle(document.getElementById('test21')).fontStyle should be oblique 14deg. Was normal.
+PASS window.getComputedStyle(document.getElementById('test1')).font is "normal normal normal normal 16px/18px Times"
+FAIL window.getComputedStyle(document.getElementById('test2')).font should be 16px/18px Times. Was normal normal normal normal 16px/18px Times.
+FAIL window.getComputedStyle(document.getElementById('test3')).font should be 16px/18px Times. Was normal normal normal normal 16px/18px Times.
+FAIL window.getComputedStyle(document.getElementById('test4')).font should be 16px/18px Times. Was normal normal normal normal 16px/18px Times.
+FAIL window.getComputedStyle(document.getElementById('test5')).font should be 16px/18px Times. Was normal normal normal normal 16px/18px Times.
+PASS window.getComputedStyle(document.getElementById('test6')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test7')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test8')).font is "italic normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test9')).font is "italic normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test10')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test11')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test12')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test13')).font is "normal normal normal normal 16px/18px Times"
+FAIL window.getComputedStyle(document.getElementById('test14')).font should be 16px/18px Times. Was normal normal normal normal 16px/18px Times.
+PASS window.getComputedStyle(document.getElementById('test15')).font is "italic normal 100 normal 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test16')).font is "italic normal 100 normal 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test17')).font is "normal normal 100 normal 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test18')).font is "italic normal normal normal 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test19')).font is "italic small-caps 100 extra-expanded 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test20')).font is "normal normal normal normal 16px/18px Times"
+FAIL window.getComputedStyle(document.getElementById('test21')).font should be 48px/49px 'Helvetica Neue'. Was normal normal normal normal 16px/18px Times.
+PASS document.getElementById('test1').style.font is ""
+PASS document.getElementById('test15').style.font is "italic 100 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test16').style.font is "italic 100 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test17').style.font is "100 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test18').style.font is "italic 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test19').style.font is "italic small-caps 100 extra-expanded 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test20').style.font is ""
+FAIL document.getElementById('test21').style.font should be oblique 14deg small-caps 123 extra-expanded 48px/49px 'Helvetica Neue'. Was .
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-loading-api-parse-expected.txt
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Author Date Id Rev URL
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsplatformmacelcapitanfasttextfontstretchparseexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-stretch-parse-expected.txt (0 => 214546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-stretch-parse-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-stretch-parse-expected.txt        2017-03-29 17:40:21 UTC (rev 214546)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+PASS window.getComputedStyle(document.getElementById('test1')).fontStretch is "normal"
+FAIL window.getComputedStyle(document.getElementById('test2')).fontStretch should be 1%. Was normal.
+PASS window.getComputedStyle(document.getElementById('test3')).fontStretch is "normal"
+PASS window.getComputedStyle(document.getElementById('test4')).fontStretch is "ultra-condensed"
+PASS window.getComputedStyle(document.getElementById('test5')).fontStretch is "extra-condensed"
+PASS window.getComputedStyle(document.getElementById('test6')).fontStretch is "condensed"
+PASS window.getComputedStyle(document.getElementById('test7')).fontStretch is "semi-condensed"
+PASS window.getComputedStyle(document.getElementById('test8')).fontStretch is "normal"
+PASS window.getComputedStyle(document.getElementById('test9')).fontStretch is "semi-expanded"
+PASS window.getComputedStyle(document.getElementById('test10')).fontStretch is "expanded"
+PASS window.getComputedStyle(document.getElementById('test11')).fontStretch is "extra-expanded"
+PASS window.getComputedStyle(document.getElementById('test12')).fontStretch is "ultra-expanded"
+PASS window.getComputedStyle(document.getElementById('test13')).fontStretch is "normal"
+PASS window.getComputedStyle(document.getElementById('test14')).fontStretch is "normal"
+PASS window.getComputedStyle(document.getElementById('test15')).fontStretch is "normal"
+PASS window.getComputedStyle(document.getElementById('test16')).fontStretch is "extra-condensed"
+PASS window.getComputedStyle(document.getElementById('test17')).fontStretch is "extra-condensed"
+PASS window.getComputedStyle(document.getElementById('test18')).fontStretch is "normal"
+PASS window.getComputedStyle(document.getElementById('test19')).fontStretch is "normal"
+PASS window.getComputedStyle(document.getElementById('test20')).fontStretch is "extra-expanded"
+FAIL window.getComputedStyle(document.getElementById('test21')).fontStretch should be 7%. Was normal.
+PASS window.getComputedStyle(document.getElementById('test1')).font is "normal normal normal normal 16px/18px Times"
+FAIL window.getComputedStyle(document.getElementById('test2')).font should be 16px/18px Times. Was normal normal normal normal 16px/18px Times.
+PASS window.getComputedStyle(document.getElementById('test3')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test4')).font is "normal normal normal ultra-condensed 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test5')).font is "normal normal normal extra-condensed 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test6')).font is "normal normal normal condensed 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test7')).font is "normal normal normal semi-condensed 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test8')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test9')).font is "normal normal normal semi-expanded 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test10')).font is "normal normal normal expanded 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test11')).font is "normal normal normal extra-expanded 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test12')).font is "normal normal normal ultra-expanded 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test13')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test14')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test15')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test16')).font is "normal normal 100 extra-condensed 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test17')).font is "normal normal 100 extra-condensed 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test18')).font is "normal normal 100 normal 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test19')).font is "normal normal 100 normal 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test20')).font is "italic small-caps 100 extra-expanded 48px/49px 'Helvetica Neue'"
+FAIL window.getComputedStyle(document.getElementById('test21')).font should be 16px/18px Times. Was normal normal normal normal 16px/18px Times.
+PASS document.getElementById('test1').style.font is ""
+PASS document.getElementById('test16').style.font is "100 extra-condensed 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test17').style.font is "100 extra-condensed 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test18').style.font is "100 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test19').style.font is "100 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test20').style.font is "italic small-caps 100 extra-expanded 48px/49px 'Helvetica Neue'"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-stretch-parse-expected.txt
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Author Date Id Rev URL
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsplatformmacelcapitanfasttextfontstyleparseexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-style-parse-expected.txt (0 => 214546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-style-parse-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-style-parse-expected.txt        2017-03-29 17:40:21 UTC (rev 214546)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+PASS window.getComputedStyle(document.getElementById('test1')).fontStyle is "normal"
+FAIL window.getComputedStyle(document.getElementById('test2')).fontStyle should be oblique 1deg. Was normal.
+FAIL window.getComputedStyle(document.getElementById('test3')).fontStyle should be oblique 180deg. Was normal.
+FAIL window.getComputedStyle(document.getElementById('test4')).fontStyle should be oblique 359.75deg. Was normal.
+FAIL window.getComputedStyle(document.getElementById('test5')).fontStyle should be oblique 1440deg. Was normal.
+PASS window.getComputedStyle(document.getElementById('test6')).fontStyle is "normal"
+PASS window.getComputedStyle(document.getElementById('test7')).fontStyle is "normal"
+PASS window.getComputedStyle(document.getElementById('test8')).fontStyle is "italic"
+PASS window.getComputedStyle(document.getElementById('test9')).fontStyle is "italic"
+PASS window.getComputedStyle(document.getElementById('test10')).fontStyle is "normal"
+PASS window.getComputedStyle(document.getElementById('test11')).fontStyle is "normal"
+PASS window.getComputedStyle(document.getElementById('test12')).fontStyle is "normal"
+PASS window.getComputedStyle(document.getElementById('test13')).fontStyle is "normal"
+FAIL window.getComputedStyle(document.getElementById('test14')).fontStyle should be oblique 1441deg. Was normal.
+PASS window.getComputedStyle(document.getElementById('test15')).fontStyle is "italic"
+PASS window.getComputedStyle(document.getElementById('test16')).fontStyle is "italic"
+PASS window.getComputedStyle(document.getElementById('test17')).fontStyle is "normal"
+PASS window.getComputedStyle(document.getElementById('test18')).fontStyle is "italic"
+PASS window.getComputedStyle(document.getElementById('test19')).fontStyle is "italic"
+PASS window.getComputedStyle(document.getElementById('test20')).fontStyle is "normal"
+FAIL window.getComputedStyle(document.getElementById('test21')).fontStyle should be oblique 14deg. Was normal.
+PASS window.getComputedStyle(document.getElementById('test1')).font is "normal normal normal normal 16px/18px Times"
+FAIL window.getComputedStyle(document.getElementById('test2')).font should be 16px/18px Times. Was normal normal normal normal 16px/18px Times.
+FAIL window.getComputedStyle(document.getElementById('test3')).font should be 16px/18px Times. Was normal normal normal normal 16px/18px Times.
+FAIL window.getComputedStyle(document.getElementById('test4')).font should be 16px/18px Times. Was normal normal normal normal 16px/18px Times.
+FAIL window.getComputedStyle(document.getElementById('test5')).font should be 16px/18px Times. Was normal normal normal normal 16px/18px Times.
+PASS window.getComputedStyle(document.getElementById('test6')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test7')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test8')).font is "italic normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test9')).font is "italic normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test10')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test11')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test12')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test13')).font is "normal normal normal normal 16px/18px Times"
+FAIL window.getComputedStyle(document.getElementById('test14')).font should be 16px/18px Times. Was normal normal normal normal 16px/18px Times.
+PASS window.getComputedStyle(document.getElementById('test15')).font is "italic normal 100 normal 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test16')).font is "italic normal 100 normal 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test17')).font is "normal normal 100 normal 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test18')).font is "italic normal normal normal 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test19')).font is "italic small-caps 100 extra-expanded 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test20')).font is "normal normal normal normal 16px/18px Times"
+FAIL window.getComputedStyle(document.getElementById('test21')).font should be 48px/49px 'Helvetica Neue'. Was normal normal normal normal 16px/18px Times.
+PASS document.getElementById('test1').style.font is ""
+PASS document.getElementById('test15').style.font is "italic 100 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test16').style.font is "italic 100 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test17').style.font is "100 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test18').style.font is "italic 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test19').style.font is "italic small-caps 100 extra-expanded 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test20').style.font is ""
+FAIL document.getElementById('test21').style.font should be oblique 14deg small-caps 123 extra-expanded 48px/49px 'Helvetica Neue'. Was .
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-style-parse-expected.txt
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Author Date Id Rev URL
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsplatformmacelcapitanfasttextfontweightparseexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-weight-parse-expected.txt (0 => 214546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-weight-parse-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-weight-parse-expected.txt        2017-03-29 17:40:21 UTC (rev 214546)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+PASS window.getComputedStyle(document.getElementById('test1')).fontWeight is "normal"
+FAIL window.getComputedStyle(document.getElementById('test2')).fontWeight should be 1. Was normal.
+PASS window.getComputedStyle(document.getElementById('test3')).fontWeight is "100"
+PASS window.getComputedStyle(document.getElementById('test4')).fontWeight is "200"
+PASS window.getComputedStyle(document.getElementById('test5')).fontWeight is "300"
+PASS window.getComputedStyle(document.getElementById('test6')).fontWeight is "normal"
+PASS window.getComputedStyle(document.getElementById('test7')).fontWeight is "normal"
+PASS window.getComputedStyle(document.getElementById('test8')).fontWeight is "500"
+PASS window.getComputedStyle(document.getElementById('test9')).fontWeight is "600"
+PASS window.getComputedStyle(document.getElementById('test10')).fontWeight is "bold"
+PASS window.getComputedStyle(document.getElementById('test11')).fontWeight is "bold"
+PASS window.getComputedStyle(document.getElementById('test12')).fontWeight is "800"
+PASS window.getComputedStyle(document.getElementById('test13')).fontWeight is "900"
+PASS window.getComputedStyle(document.getElementById('test14')).fontWeight is "normal"
+PASS window.getComputedStyle(document.getElementById('test15')).fontWeight is "normal"
+FAIL window.getComputedStyle(document.getElementById('test16')).fontWeight should be 7. Was normal.
+PASS window.getComputedStyle(document.getElementById('test17')).fontWeight is "300"
+PASS window.getComputedStyle(document.getElementById('test18')).fontWeight is "200"
+PASS window.getComputedStyle(document.getElementById('test19')).fontWeight is "100"
+PASS window.getComputedStyle(document.getElementById('test20')).fontWeight is "100"
+PASS window.getComputedStyle(document.getElementById('test21')).fontWeight is "normal"
+PASS window.getComputedStyle(document.getElementById('test22')).fontWeight is "100"
+PASS window.getComputedStyle(document.getElementById('test23')).fontWeight is "100"
+FAIL window.getComputedStyle(document.getElementById('test24')).fontWeight should be 123. Was normal.
+PASS window.getComputedStyle(document.getElementById('test25')).fontWeight is "normal"
+PASS window.getComputedStyle(document.getElementById('test26')).fontWeight is "normal"
+PASS window.getComputedStyle(document.getElementById('test27')).fontWeight is "normal"
+FAIL window.getComputedStyle(document.getElementById('test28')).fontWeight should be 0. Was normal.
+FAIL window.getComputedStyle(document.getElementById('test29')).fontWeight should be 1000. Was normal.
+PASS window.getComputedStyle(document.getElementById('test1')).font is "normal normal normal normal 16px/18px Times"
+FAIL window.getComputedStyle(document.getElementById('test2')).font should be 16px/18px Times. Was normal normal normal normal 16px/18px Times.
+PASS window.getComputedStyle(document.getElementById('test3')).font is "normal normal 100 normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test4')).font is "normal normal 200 normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test5')).font is "normal normal 300 normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test6')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test7')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test8')).font is "normal normal 500 normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test9')).font is "normal normal 600 normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test10')).font is "normal normal bold normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test11')).font is "normal normal bold normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test12')).font is "normal normal 800 normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test13')).font is "normal normal 900 normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test14')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test15')).font is "normal normal normal normal 16px/18px Times"
+FAIL window.getComputedStyle(document.getElementById('test16')).font should be 16px/18px Times. Was normal normal normal normal 16px/18px Times.
+PASS window.getComputedStyle(document.getElementById('test17')).font is "normal normal 300 normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test18')).font is "normal normal 200 normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test19')).font is "normal normal 100 extra-condensed 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test20')).font is "normal normal 100 extra-condensed 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test21')).font is "normal normal normal extra-condensed 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test22')).font is "normal normal 100 normal 48px/49px 'Helvetica Neue'"
+PASS window.getComputedStyle(document.getElementById('test23')).font is "italic small-caps 100 extra-expanded 48px/49px 'Helvetica Neue'"
+FAIL window.getComputedStyle(document.getElementById('test24')).font should be 48px/49px 'Helvetica Neue'. Was normal normal normal normal 16px/18px Times.
+PASS window.getComputedStyle(document.getElementById('test25')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test26')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test27')).font is "normal normal normal normal 16px/18px Times"
+FAIL window.getComputedStyle(document.getElementById('test28')).font should be 16px/18px Times. Was normal normal normal normal 16px/18px Times.
+FAIL window.getComputedStyle(document.getElementById('test29')).font should be 16px/18px Times. Was normal normal normal normal 16px/18px Times.
+PASS document.getElementById('test1').style.font is ""
+PASS document.getElementById('test19').style.font is "100 extra-condensed 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test20').style.font is "100 extra-condensed 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test21').style.font is "extra-condensed 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test22').style.font is "100 48px/49px 'Helvetica Neue'"
+PASS document.getElementById('test23').style.font is "italic small-caps 100 extra-expanded 48px/49px 'Helvetica Neue'"
+FAIL document.getElementById('test24').style.font should be italic small-caps 123 extra-expanded 48px/49px 'Helvetica Neue'. Was .
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-weight-parse-expected.txt
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Author Date Id Rev URL
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (214545 => 214546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-29 17:28:48 UTC (rev 214545)
+++ trunk/Source/WebCore/ChangeLog        2017-03-29 17:40:21 UTC (rev 214546)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2017-03-29 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Variation fonts: Make sure that feature detection and preprocessor macros are right
+ https://bugs.webkit.org/show_bug.cgi?id=169518
+
+ Reviewed by Simon Fraser.
+
+ When I added variable fonts support, I made all OSes parse the newly accepted values,
+ instead of just the OSes which support variable fonts.
+
+ Test: fast/text/font-variations-feature-detection.html
+
+ * css/parser/CSSPropertyParser.cpp:
+ (WebCore::consumeFontStretch):
+ (WebCore::consumeFontStyle):
+ * css/parser/CSSPropertyParserHelpers.cpp:
+ (WebCore::CSSPropertyParserHelpers::divisibleBy100):
+ (WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
+
</ins><span class="cx"> 2017-03-29 Antoine Quint <graouts@apple.com>
</span><span class="cx">
</span><span class="cx"> [Modern Media Controls] Controls bar may disappear while captions menu is visible (redux)
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (214545 => 214546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2017-03-29 17:28:48 UTC (rev 214545)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2017-03-29 17:40:21 UTC (rev 214546)
</span><span class="lines">@@ -903,17 +903,21 @@
</span><span class="cx"> return consumeIdent<CSSValueUltraCondensed, CSSValueExtraCondensed, CSSValueCondensed, CSSValueSemiCondensed, CSSValueNormal, CSSValueSemiExpanded, CSSValueExpanded, CSSValueExtraExpanded, CSSValueUltraExpanded>(range);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(VARIATION_FONTS)
</ins><span class="cx"> static bool fontStretchIsWithinRange(float stretch)
</span><span class="cx"> {
</span><span class="cx"> return stretch > 0;
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> static RefPtr<CSSPrimitiveValue> consumeFontStretch(CSSParserTokenRange& range)
</span><span class="cx"> {
</span><span class="cx"> if (auto result = consumeFontStretchKeywordValue(range))
</span><span class="cx"> return result;
</span><ins>+#if ENABLE(VARIATION_FONTS)
</ins><span class="cx"> if (auto percent = consumePercent(range, ValueRangeNonNegative))
</span><span class="cx"> return fontStretchIsWithinRange(percent->value<float>()) ? percent : nullptr;
</span><ins>+#endif
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -942,10 +946,12 @@
</span><span class="cx"> return consumeIdent<CSSValueNormal, CSSValueItalic, CSSValueOblique>(range);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(VARIATION_FONTS)
</ins><span class="cx"> static bool fontStyleIsWithinRange(float oblique)
</span><span class="cx"> {
</span><span class="cx"> return oblique > -90 && oblique < 90;
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> static RefPtr<CSSFontStyleValue> consumeFontStyle(CSSParserTokenRange& range, CSSParserMode cssParserMode)
</span><span class="cx"> {
</span><span class="lines">@@ -953,18 +959,21 @@
</span><span class="cx"> if (!result)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- if (result->valueID() == CSSValueNormal)
- return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueNormal));
- if (result->valueID() == CSSValueItalic)
- return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueItalic));
</del><ins>+ auto valueID = result->valueID();
+ if (valueID == CSSValueNormal || valueID == CSSValueItalic)
+ return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(valueID));
</ins><span class="cx"> ASSERT(result->valueID() == CSSValueOblique);
</span><del>- if (range.atEnd())
- return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique));
- if (auto angle = consumeAngle(range, cssParserMode)) {
- if (fontStyleIsWithinRange(angle->value<float>(CSSPrimitiveValue::CSS_DEG)))
- return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique), WTFMove(angle));
- return nullptr;
</del><ins>+#if ENABLE(VARIATION_FONTS)
+ if (!range.atEnd()) {
+ if (auto angle = consumeAngle(range, cssParserMode)) {
+ if (fontStyleIsWithinRange(angle->value<float>(CSSPrimitiveValue::CSS_DEG)))
+ return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique), WTFMove(angle));
+ return nullptr;
+ }
</ins><span class="cx"> }
</span><ins>+#else
+ UNUSED_PARAM(cssParserMode);
+#endif
</ins><span class="cx"> return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique));
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParserHelperscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp (214545 => 214546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp        2017-03-29 17:28:48 UTC (rev 214545)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp        2017-03-29 17:40:21 UTC (rev 214546)
</span><span class="lines">@@ -197,17 +197,32 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if !ENABLE(VARIATION_FONTS)
+static inline bool divisibleBy100(double value)
+{
+ return static_cast<int>(value / 100) * 100 == value;
+}
+#endif
+
</ins><span class="cx"> RefPtr<CSSPrimitiveValue> consumeFontWeightNumber(CSSParserTokenRange& range)
</span><span class="cx"> {
</span><span class="cx"> // Values less than or equal to 0 or greater than or equal to 1000 are parse errors.
</span><span class="cx"> auto& token = range.peek();
</span><del>- if (token.type() == NumberToken && token.numericValue() > 0 && token.numericValue() < 1000)
</del><ins>+ if (token.type() == NumberToken && token.numericValue() > 0 && token.numericValue() < 1000
+#if !ENABLE(VARIATION_FONTS)
+ && token.numericValueType() == IntegerValueType && divisibleBy100(token.numericValue())
+#endif
+ )
</ins><span class="cx"> return consumeNumber(range, ValueRangeAll);
</span><span class="cx">
</span><span class="cx"> // "[For calc()], the used value resulting from an expression must be clamped to the range allowed in the target context."
</span><span class="cx"> CalcParser calcParser(range, ValueRangeAll);
</span><span class="cx"> double result;
</span><del>- if (calcParser.consumeNumberRaw(result)) {
</del><ins>+ if (calcParser.consumeNumberRaw(result)
+#if !ENABLE(VARIATION_FONTS)
+ && result > 0 && result < 1000 && divisibleBy100(result)
+#endif
+ ) {
</ins><span class="cx"> result = std::min(std::max(result, std::nextafter(0., 1.)), std::nextafter(1000., 0.));
</span><span class="cx"> return CSSValuePool::singleton().createValue(result, CSSPrimitiveValue::UnitType::CSS_NUMBER);
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>