<!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>[214507] 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/214507">214507</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2017-03-28 16:53:28 -0700 (Tue, 28 Mar 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Ranges for variation font properties are not enforced
https://bugs.webkit.org/show_bug.cgi?id=169979
Reviewed by David Hyatt.
Source/WebCore:
The spec specifies that:
- Font weights less than or equal to 0, or greater than or equal to 1000 are parse errors
- Font stretch values less than or equal to 0% are parse errors
- Font style values less than or equal to -90deg or greater than or equal to 90deg are parse errors
Test: fast/text/variations/out-of-bounds-selection-properties.html
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeFontWeightRange):
(WebCore::fontStretchIsWithinRange):
(WebCore::consumeFontStretch):
(WebCore::consumeFontStretchRange):
(WebCore::fontStyleIsWithinRange):
(WebCore::consumeFontStyle):
(WebCore::consumeFontStyleRange):
LayoutTests:
* fast/text/font-selection-font-face-parse-expected.txt:
* fast/text/font-selection-font-face-parse.html:
* fast/text/font-selection-font-loading-api-parse-expected.txt:
* fast/text/font-selection-font-loading-api-parse.html:
* fast/text/font-style-parse-expected.txt:
* fast/text/font-style-parse.html:
* fast/text/variations/font-loading-api-parse-ranges-expected.txt:
* fast/text/variations/font-loading-api-parse-ranges.html:
* fast/text/variations/out-of-bounds-selection-properties-expected.txt: Added.
* fast/text/variations/out-of-bounds-selection-properties.html: Added.
* platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfasttextfontselectionfontfaceparseexpectedtxt">trunk/LayoutTests/fast/text/font-selection-font-face-parse-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasttextfontselectionfontfaceparsehtml">trunk/LayoutTests/fast/text/font-selection-font-face-parse.html</a></li>
<li><a href="#trunkLayoutTestsfasttextfontselectionfontloadingapiparseexpectedtxt">trunk/LayoutTests/fast/text/font-selection-font-loading-api-parse-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasttextfontselectionfontloadingapiparsehtml">trunk/LayoutTests/fast/text/font-selection-font-loading-api-parse.html</a></li>
<li><a href="#trunkLayoutTestsfasttextfontstyleparseexpectedtxt">trunk/LayoutTests/fast/text/font-style-parse-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasttextfontstyleparsehtml">trunk/LayoutTests/fast/text/font-style-parse.html</a></li>
<li><a href="#trunkLayoutTestsfasttextvariationsfontloadingapiparserangesexpectedtxt">trunk/LayoutTests/fast/text/variations/font-loading-api-parse-ranges-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasttextvariationsfontloadingapiparserangeshtml">trunk/LayoutTests/fast/text/variations/font-loading-api-parse-ranges.html</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>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasttextvariationsoutofboundsselectionpropertiesexpectedtxt">trunk/LayoutTests/fast/text/variations/out-of-bounds-selection-properties-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasttextvariationsoutofboundsselectionpropertieshtml">trunk/LayoutTests/fast/text/variations/out-of-bounds-selection-properties.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (214506 => 214507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-03-28 23:50:55 UTC (rev 214506)
+++ trunk/LayoutTests/ChangeLog        2017-03-28 23:53:28 UTC (rev 214507)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2017-03-28 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Ranges for variation font properties are not enforced
+ https://bugs.webkit.org/show_bug.cgi?id=169979
+
+ Reviewed by David Hyatt.
+
+ * fast/text/font-selection-font-face-parse-expected.txt:
+ * fast/text/font-selection-font-face-parse.html:
+ * fast/text/font-selection-font-loading-api-parse-expected.txt:
+ * fast/text/font-selection-font-loading-api-parse.html:
+ * fast/text/font-style-parse-expected.txt:
+ * fast/text/font-style-parse.html:
+ * fast/text/variations/font-loading-api-parse-ranges-expected.txt:
+ * fast/text/variations/font-loading-api-parse-ranges.html:
+ * fast/text/variations/out-of-bounds-selection-properties-expected.txt: Added.
+ * fast/text/variations/out-of-bounds-selection-properties.html: Added.
+ * platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt:
+
</ins><span class="cx"> 2017-03-28 Andy Estes <aestes@apple.com>
</span><span class="cx">
</span><span class="cx"> [iOS] Crash in -[WebPreviewLoader failed] when running http/tests/multipart/policy-ignore-crash.php
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontselectionfontfaceparseexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-selection-font-face-parse-expected.txt (214506 => 214507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-selection-font-face-parse-expected.txt        2017-03-28 23:50:55 UTC (rev 214506)
+++ trunk/LayoutTests/fast/text/font-selection-font-face-parse-expected.txt        2017-03-28 23:53:28 UTC (rev 214507)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> PASS weightTestSheet.cssRules[24].style.fontWeight is ""
</span><span class="cx"> PASS weightTestSheet.cssRules[25].style.fontWeight is ""
</span><span class="cx"> PASS weightTestSheet.cssRules[26].style.fontWeight is "1 2"
</span><del>-PASS weightTestSheet.cssRules[27].style.fontWeight is "-2 -1"
</del><ins>+PASS weightTestSheet.cssRules[27].style.fontWeight is ""
</ins><span class="cx"> PASS weightTestSheet.cssRules[28].style.fontWeight is ""
</span><span class="cx"> PASS weightTestSheet.cssRules[29].style.fontWeight is "7 8"
</span><span class="cx"> PASS weightTestSheet.cssRules[30].style.fontWeight is "2 7"
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> PASS stretchTestSheet.cssRules[31].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[32].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[33].style.fontStretch is "1% 2%"
</span><del>-PASS stretchTestSheet.cssRules[34].style.fontStretch is "-2% -1%"
</del><ins>+PASS stretchTestSheet.cssRules[34].style.fontStretch is ""
</ins><span class="cx"> PASS stretchTestSheet.cssRules[35].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[36].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[37].style.fontStretch is ""
</span><span class="lines">@@ -72,9 +72,9 @@
</span><span class="cx"> PASS stretchTestSheet.cssRules[40].style.fontStretch is "calc(7%) 8%"
</span><span class="cx"> PASS stretchTestSheet.cssRules[41].style.fontStretch is "2% calc(7%)"
</span><span class="cx"> PASS styleTestSheet.cssRules[0].style.fontStyle is "oblique 1deg"
</span><del>-PASS styleTestSheet.cssRules[1].style.fontStyle is "oblique 200grad"
-PASS styleTestSheet.cssRules[2].style.fontStyle is "oblique 6.28318rad"
-PASS styleTestSheet.cssRules[3].style.fontStyle is "oblique 4turn"
</del><ins>+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"
</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(1441deg)"
</del><ins>+PASS styleTestSheet.cssRules[12].style.fontStyle is "oblique calc(15.4deg)"
</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 class="lines">@@ -95,8 +95,8 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[21].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[22].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[23].style.fontStyle is ""
</span><del>-PASS styleTestSheet.cssRules[24].style.fontStyle is "oblique 100deg 200deg"
-PASS styleTestSheet.cssRules[25].style.fontStyle is "oblique 100deg 200deg"
</del><ins>+PASS styleTestSheet.cssRules[24].style.fontStyle is "oblique 10deg 20deg"
+PASS styleTestSheet.cssRules[25].style.fontStyle is "oblique 10deg 20deg"
</ins><span class="cx"> PASS styleTestSheet.cssRules[26].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[27].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[28].style.fontStyle is ""
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[34].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[35].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[36].style.fontStyle is ""
</span><del>-PASS styleTestSheet.cssRules[37].style.fontStyle is "oblique 2deg 1turn"
</del><ins>+PASS styleTestSheet.cssRules[37].style.fontStyle is "oblique 2deg 4grad"
</ins><span class="cx"> PASS styleTestSheet.cssRules[38].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[39].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[40].style.fontStyle is "oblique calc(7deg) 8deg"
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontselectionfontfaceparsehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-selection-font-face-parse.html (214506 => 214507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-selection-font-face-parse.html        2017-03-28 23:50:55 UTC (rev 214506)
+++ trunk/LayoutTests/fast/text/font-selection-font-face-parse.html        2017-03-28 23:53:28 UTC (rev 214507)
</span><span class="lines">@@ -231,13 +231,13 @@
</span><span class="cx"> font-style: oblique 1deg;
</span><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 200grad;
</del><ins>+ font-style: oblique 20grad;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 6.28318rad;
</del><ins>+ font-style: oblique 0.28318rad;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 4turn;
</del><ins>+ font-style: oblique 0.04turn;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><span class="cx"> font-style: oblique 5;
</span><span class="lines">@@ -264,31 +264,31 @@
</span><span class="cx"> font-style: oblique calc(3 + 4);
</span><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique calc(4turn + 1deg);
</del><ins>+ font-style: oblique calc(0.04turn + 1deg);
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100 200;
</del><ins>+ font-style: oblique 10 20;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100 200;
</del><ins>+ font-style: oblique 10 20;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique a 100 200;
</del><ins>+ font-style: oblique a 10 20;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100 200 a;
</del><ins>+ font-style: oblique 10 20 a;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100 a 200;
</del><ins>+ font-style: oblique 10 a 20;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100 a200;
</del><ins>+ font-style: oblique 10 a20;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100a 200;
</del><ins>+ font-style: oblique 10a 20;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100 a200;
</del><ins>+ font-style: oblique 10 a20;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><span class="cx"> font-style: oblique 1 2;
</span><span class="lines">@@ -300,28 +300,28 @@
</span><span class="cx"> font-style: oblique 2 1;
</span><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100deg 200deg;
</del><ins>+ font-style: oblique 10deg 20deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100deg 200deg;
</del><ins>+ font-style: oblique 10deg 20deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique a 100deg 200deg;
</del><ins>+ font-style: oblique a 10deg 20deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100deg 200deg a;
</del><ins>+ font-style: oblique 10deg 20deg a;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100deg a 200deg;
</del><ins>+ font-style: oblique 10deg a 20deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100deg a200deg;
</del><ins>+ font-style: oblique 10deg a20deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100dega 200deg;
</del><ins>+ font-style: oblique 10dega 20deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100deg a200deg;
</del><ins>+ font-style: oblique 10deg a20deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><span class="cx"> font-style: oblique 1deg 2deg;
</span><span class="lines">@@ -339,7 +339,7 @@
</span><span class="cx"> font-style: oblique 1deg 2;
</span><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 2deg 1turn;
</del><ins>+ font-style: oblique 2deg 4grad;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><span class="cx"> font-style: oblique calc(3 + 4) 8;
</span><span class="lines">@@ -385,7 +385,7 @@
</span><span class="cx"> shouldBeEqualToString("weightTestSheet.cssRules[24].style.fontWeight", "");
</span><span class="cx"> shouldBeEqualToString("weightTestSheet.cssRules[25].style.fontWeight", "");
</span><span class="cx"> shouldBeEqualToString("weightTestSheet.cssRules[26].style.fontWeight", "1 2");
</span><del>-shouldBeEqualToString("weightTestSheet.cssRules[27].style.fontWeight", "-2 -1");
</del><ins>+shouldBeEqualToString("weightTestSheet.cssRules[27].style.fontWeight", "");
</ins><span class="cx"> shouldBeEqualToString("weightTestSheet.cssRules[28].style.fontWeight", "");
</span><span class="cx"> shouldBeEqualToString("weightTestSheet.cssRules[29].style.fontWeight", "7 8");
</span><span class="cx"> shouldBeEqualToString("weightTestSheet.cssRules[30].style.fontWeight", "2 7");
</span><span class="lines">@@ -425,7 +425,7 @@
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[31].style.fontStretch", "");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[32].style.fontStretch", "");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[33].style.fontStretch", "1% 2%");
</span><del>-shouldBeEqualToString("stretchTestSheet.cssRules[34].style.fontStretch", "-2% -1%");
</del><ins>+shouldBeEqualToString("stretchTestSheet.cssRules[34].style.fontStretch", "");
</ins><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[35].style.fontStretch", "");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[36].style.fontStretch", "");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[37].style.fontStretch", "");
</span><span class="lines">@@ -436,9 +436,9 @@
</span><span class="cx">
</span><span class="cx"> var styleTestSheet = document.getElementById("styleTest").sheet;
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[0].style.fontStyle", "oblique 1deg");
</span><del>-shouldBeEqualToString("styleTestSheet.cssRules[1].style.fontStyle", "oblique 200grad");
-shouldBeEqualToString("styleTestSheet.cssRules[2].style.fontStyle", "oblique 6.28318rad");
-shouldBeEqualToString("styleTestSheet.cssRules[3].style.fontStyle", "oblique 4turn");
</del><ins>+shouldBeEqualToString("styleTestSheet.cssRules[1].style.fontStyle", "oblique 20grad");
+shouldBeEqualToString("styleTestSheet.cssRules[2].style.fontStyle", "oblique 0.28318rad");
+shouldBeEqualToString("styleTestSheet.cssRules[3].style.fontStyle", "oblique 0.04turn");
</ins><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[4].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[5].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[6].style.fontStyle", "italic");
</span><span class="lines">@@ -447,7 +447,7 @@
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[9].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[10].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[11].style.fontStyle", "");
</span><del>-shouldBeEqualToString("styleTestSheet.cssRules[12].style.fontStyle", "oblique calc(1441deg)");
</del><ins>+shouldBeEqualToString("styleTestSheet.cssRules[12].style.fontStyle", "oblique calc(15.4deg)");
</ins><span class="cx">
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[13].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[14].style.fontStyle", "");
</span><span class="lines">@@ -460,8 +460,8 @@
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[21].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[22].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[23].style.fontStyle", "");
</span><del>-shouldBeEqualToString("styleTestSheet.cssRules[24].style.fontStyle", "oblique 100deg 200deg");
-shouldBeEqualToString("styleTestSheet.cssRules[25].style.fontStyle", "oblique 100deg 200deg");
</del><ins>+shouldBeEqualToString("styleTestSheet.cssRules[24].style.fontStyle", "oblique 10deg 20deg");
+shouldBeEqualToString("styleTestSheet.cssRules[25].style.fontStyle", "oblique 10deg 20deg");
</ins><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[26].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[27].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[28].style.fontStyle", "");
</span><span class="lines">@@ -473,7 +473,7 @@
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[34].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[35].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[36].style.fontStyle", "");
</span><del>-shouldBeEqualToString("styleTestSheet.cssRules[37].style.fontStyle", "oblique 2deg 1turn");
</del><ins>+shouldBeEqualToString("styleTestSheet.cssRules[37].style.fontStyle", "oblique 2deg 4grad");
</ins><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[38].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[39].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[40].style.fontStyle", "oblique calc(7deg) 8deg");
</span><span class="lines">@@ -481,4 +481,4 @@
</span><span class="cx"> </script>
</span><span class="cx"> <script src="../../resources/js-test-post.js"></script>
</span><span class="cx"> </body>
</span><del>-</html>
</del><span class="cx">\ No newline at end of file
</span><ins>+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfasttextfontselectionfontloadingapiparseexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-selection-font-loading-api-parse-expected.txt (214506 => 214507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-selection-font-loading-api-parse-expected.txt        2017-03-28 23:50:55 UTC (rev 214506)
+++ trunk/LayoutTests/fast/text/font-selection-font-loading-api-parse-expected.txt        2017-03-28 23:53:28 UTC (rev 214507)
</span><span class="lines">@@ -31,9 +31,9 @@
</span><span class="cx"> PASS setFontFaceStretch(fontFace, 'calc(3 + 4)') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><span class="cx"> PASS setFontFaceStretch(fontFace, 'calc(3% + 4%)') is "7%"
</span><span class="cx"> PASS setFontFaceStyle(fontFace, 'oblique 1deg') is "oblique 1deg"
</span><del>-PASS setFontFaceStyle(fontFace, 'oblique 200grad') is "oblique 180deg"
-PASS setFontFaceStyle(fontFace, 'oblique 6.28318rad') is "oblique 359.75deg"
-PASS setFontFaceStyle(fontFace, 'oblique 4turn') is "oblique 1440deg"
</del><ins>+PASS setFontFaceStyle(fontFace, 'oblique 20grad') is "oblique 18deg"
+PASS setFontFaceStyle(fontFace, 'oblique 0.28318rad') is "oblique 16deg"
+PASS setFontFaceStyle(fontFace, 'oblique 0.04turn') is "oblique 14.25deg"
</ins><span class="cx"> PASS setFontFaceStyle(fontFace, 'oblique 5') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><span class="cx"> PASS setFontFaceStyle(fontFace, 'oblique 20') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><span class="cx"> PASS setFontFaceStyle(fontFace, 'italic') is "italic"
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> PASS setFontFaceStyle(fontFace, 'garbage') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><span class="cx"> PASS setFontFaceStyle(fontFace, 'initial') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><span class="cx"> PASS setFontFaceStyle(fontFace, 'oblique calc(3 + 4)') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><del>-PASS setFontFaceStyle(fontFace, 'oblique calc(4turn + 1deg)') is "oblique 1441deg"
</del><ins>+PASS setFontFaceStyle(fontFace, 'oblique calc(0.04turn + 1deg)') is "oblique 15.25deg"
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontselectionfontloadingapiparsehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-selection-font-loading-api-parse.html (214506 => 214507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-selection-font-loading-api-parse.html        2017-03-28 23:50:55 UTC (rev 214506)
+++ trunk/LayoutTests/fast/text/font-selection-font-loading-api-parse.html        2017-03-28 23:53:28 UTC (rev 214507)
</span><span class="lines">@@ -56,9 +56,9 @@
</span><span class="cx"> shouldBeEqualToString("setFontFaceStretch(fontFace, 'calc(3% + 4%)')", "7%");
</span><span class="cx">
</span><span class="cx"> shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique 1deg')", "oblique 1deg");
</span><del>-shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique 200grad')", "oblique 180deg");
-shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique 6.28318rad')", "oblique 359.75deg");
-shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique 4turn')", "oblique 1440deg");
</del><ins>+shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique 20grad')", "oblique 18deg");
+shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique 0.28318rad')", "oblique 16deg");
+shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique 0.04turn')", "oblique 14.25deg");
</ins><span class="cx"> shouldThrow("setFontFaceStyle(fontFace, 'oblique 5')");
</span><span class="cx"> shouldThrow("setFontFaceStyle(fontFace, 'oblique 20')");
</span><span class="cx"> shouldBeEqualToString("setFontFaceStyle(fontFace, 'italic')", "italic");
</span><span class="lines">@@ -67,8 +67,8 @@
</span><span class="cx"> shouldThrow("setFontFaceStyle(fontFace, 'garbage')");
</span><span class="cx"> shouldThrow("setFontFaceStyle(fontFace, 'initial')");
</span><span class="cx"> shouldThrow("setFontFaceStyle(fontFace, 'oblique calc(3 + 4)')");
</span><del>-shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique calc(4turn + 1deg)')", "oblique 1441deg");
</del><ins>+shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique calc(0.04turn + 1deg)')", "oblique 15.25deg");
</ins><span class="cx"> </script>
</span><span class="cx"> <script src="../../resources/js-test-post.js"></script>
</span><span class="cx"> </body>
</span><del>-</html>
</del><span class="cx">\ No newline at end of file
</span><ins>+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfasttextfontstyleparseexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-style-parse-expected.txt (214506 => 214507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-style-parse-expected.txt        2017-03-28 23:50:55 UTC (rev 214506)
+++ trunk/LayoutTests/fast/text/font-style-parse-expected.txt        2017-03-28 23:53:28 UTC (rev 214507)
</span><span class="lines">@@ -1,8 +1,8 @@
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test1')).fontStyle is "normal"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test2')).fontStyle is "oblique 1deg"
</span><del>-PASS window.getComputedStyle(document.getElementById('test3')).fontStyle is "oblique 180deg"
-PASS window.getComputedStyle(document.getElementById('test4')).fontStyle is "oblique 359.75deg"
-PASS window.getComputedStyle(document.getElementById('test5')).fontStyle is "oblique 1440deg"
</del><ins>+PASS window.getComputedStyle(document.getElementById('test3')).fontStyle is "oblique 18deg"
+PASS window.getComputedStyle(document.getElementById('test4')).fontStyle is "oblique 16deg"
+PASS window.getComputedStyle(document.getElementById('test5')).fontStyle is "oblique 14.25deg"
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('test6')).fontStyle is "normal"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test7')).fontStyle is "normal"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test8')).fontStyle is "italic"
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test11')).fontStyle is "normal"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test12')).fontStyle is "normal"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test13')).fontStyle is "normal"
</span><del>-PASS window.getComputedStyle(document.getElementById('test14')).fontStyle is "oblique 1441deg"
</del><ins>+PASS window.getComputedStyle(document.getElementById('test14')).fontStyle is "oblique 15.25deg"
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('test15')).fontStyle is "italic"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test16')).fontStyle is "italic"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test17')).fontStyle is "normal"
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontstyleparsehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-style-parse.html (214506 => 214507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-style-parse.html        2017-03-28 23:50:55 UTC (rev 214506)
+++ trunk/LayoutTests/fast/text/font-style-parse.html        2017-03-28 23:53:28 UTC (rev 214507)
</span><span class="lines">@@ -7,9 +7,9 @@
</span><span class="cx"> <div style="font: 16px/18px 'Times';">
</span><span class="cx"> <div id="test1"></div>
</span><span class="cx"> <div id="test2" style="font-style: oblique 1deg;"></div>
</span><del>-<div id="test3" style="font-style: oblique 200grad;"></div>
-<div id="test4" style="font-style: oblique 6.28318rad;"></div>
-<div id="test5" style="font-style: oblique 4turn;"></div>
</del><ins>+<div id="test3" style="font-style: oblique 20grad;"></div>
+<div id="test4" style="font-style: oblique 0.28318rad;"></div>
+<div id="test5" style="font-style: oblique 0.04turn;"></div>
</ins><span class="cx"> <div id="test6" style="font-style: oblique 5;"></div>
</span><span class="cx"> <div id="test7" style="font-style: oblique 20;"></div>
</span><span class="cx"> <div id="test8" style="font-style: italic;"></div>
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx"> <div id="test11" style="font-style: garbage;"></div>
</span><span class="cx"> <div id="test12" style="font-style: initial;"></div>
</span><span class="cx"> <div id="test13" style="font-style: oblique calc(3 + 4);"></div>
</span><del>-<div id="test14" style="font-style: oblique calc(4turn + 1deg);"></div>
</del><ins>+<div id="test14" style="font-style: oblique calc(0.04turn + 1deg);"></div>
</ins><span class="cx"> <div id="test15" style="font: 100 italic 48px/49px 'Helvetica Neue';"></div>
</span><span class="cx"> <div id="test16" style="font: italic 100 48px/49px 'Helvetica Neue';"></div>
</span><span class="cx"> <div id="test17" style="font: 100 48px/49px 'Helvetica Neue';"></div>
</span><span class="lines">@@ -30,9 +30,9 @@
</span><span class="cx"> <script>
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).fontStyle", "normal");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).fontStyle", "oblique 1deg");
</span><del>-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).fontStyle", "oblique 180deg");
-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).fontStyle", "oblique 359.75deg");
-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).fontStyle", "oblique 1440deg");
</del><ins>+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).fontStyle", "oblique 18deg");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).fontStyle", "oblique 16deg");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).fontStyle", "oblique 14.25deg");
</ins><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).fontStyle", "normal");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test7')).fontStyle", "normal");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test8')).fontStyle", "italic");
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test11')).fontStyle", "normal");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test12')).fontStyle", "normal");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test13')).fontStyle", "normal");
</span><del>-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test14')).fontStyle", "oblique 1441deg");
</del><ins>+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test14')).fontStyle", "oblique 15.25deg");
</ins><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test15')).fontStyle", "italic");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test16')).fontStyle", "italic");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test17')).fontStyle", "normal");
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextvariationsfontloadingapiparserangesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/variations/font-loading-api-parse-ranges-expected.txt (214506 => 214507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/variations/font-loading-api-parse-ranges-expected.txt        2017-03-28 23:50:55 UTC (rev 214506)
+++ trunk/LayoutTests/fast/text/variations/font-loading-api-parse-ranges-expected.txt        2017-03-28 23:53:28 UTC (rev 214507)
</span><span class="lines">@@ -7,11 +7,11 @@
</span><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { weight: '100 200a' })).weight threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { weight: '50 150' })).weight is "50 150"
</span><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { weight: '2 3' })).weight is "2 3"
</span><del>-PASS (new FontFace('asdf', 'url(notreal)', { weight: '-3 -2' })).weight is "-3 -2"
</del><ins>+PASS (new FontFace('asdf', 'url(notreal)', { weight: '-3 -2' })).weight threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</ins><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { weight: '5 4' })).weight threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { weight: '100 200 3' })).weight threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { weight: '100 200 a' })).weight threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><del>-PASS (new FontFace('asdf', 'url(notreal)', { weight: '-3' })).weight is "-3"
</del><ins>+PASS (new FontFace('asdf', 'url(notreal)', { weight: '-3' })).weight threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</ins><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { stretch: 'semi-expanded expanded' })).stretch threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { stretch: '100% 200%' })).stretch is "100% 200%"
</span><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { stretch: 'a100% 200%' })).stretch threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><span class="lines">@@ -22,11 +22,11 @@
</span><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { stretch: '100% 200%a' })).stretch threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { stretch: '50% 60%' })).stretch is "50% 60%"
</span><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { stretch: '2% 3%' })).stretch is "2% 3%"
</span><del>-PASS (new FontFace('asdf', 'url(notreal)', { stretch: '-3% -2%' })).stretch is "-3% -2%"
</del><ins>+PASS (new FontFace('asdf', 'url(notreal)', { stretch: '-3% -2%' })).stretch threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</ins><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { stretch: '5% 4%' })).stretch threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { stretch: '100% 200% 3%' })).stretch threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { stretch: '100% 200% a' })).stretch threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><del>-PASS (new FontFace('asdf', 'url(notreal)', { stretch: '-3%' })).stretch is "-3%"
</del><ins>+PASS (new FontFace('asdf', 'url(notreal)', { stretch: '-3%' })).stretch threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</ins><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20deg' })).style is "oblique 10deg 20deg"
</span><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique a10deg 20deg' })).style threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique 10dega 20deg' })).style threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextvariationsfontloadingapiparserangeshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/variations/font-loading-api-parse-ranges.html (214506 => 214507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/variations/font-loading-api-parse-ranges.html        2017-03-28 23:50:55 UTC (rev 214506)
+++ trunk/LayoutTests/fast/text/variations/font-loading-api-parse-ranges.html        2017-03-28 23:53:28 UTC (rev 214507)
</span><span class="lines">@@ -14,11 +14,11 @@
</span><span class="cx"> shouldThrow("(new FontFace('asdf', 'url(notreal)', { weight: '100 200a' })).weight");
</span><span class="cx"> shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { weight: '50 150' })).weight", "50 150");
</span><span class="cx"> shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { weight: '2 3' })).weight", "2 3");
</span><del>-shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { weight: '-3 -2' })).weight", "-3 -2");
</del><ins>+shouldThrow("(new FontFace('asdf', 'url(notreal)', { weight: '-3 -2' })).weight");
</ins><span class="cx"> shouldThrow("(new FontFace('asdf', 'url(notreal)', { weight: '5 4' })).weight");
</span><span class="cx"> shouldThrow("(new FontFace('asdf', 'url(notreal)', { weight: '100 200 3' })).weight");
</span><span class="cx"> shouldThrow("(new FontFace('asdf', 'url(notreal)', { weight: '100 200 a' })).weight");
</span><del>-shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { weight: '-3' })).weight", "-3");
</del><ins>+shouldThrow("(new FontFace('asdf', 'url(notreal)', { weight: '-3' })).weight");
</ins><span class="cx">
</span><span class="cx"> shouldThrow("(new FontFace('asdf', 'url(notreal)', { stretch: 'semi-expanded expanded' })).stretch");
</span><span class="cx"> shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200%' })).stretch", "100% 200%");
</span><span class="lines">@@ -30,11 +30,11 @@
</span><span class="cx"> shouldThrow("(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200%a' })).stretch");
</span><span class="cx"> shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { stretch: '50% 60%' })).stretch", "50% 60%");
</span><span class="cx"> shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { stretch: '2% 3%' })).stretch", "2% 3%");
</span><del>-shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { stretch: '-3% -2%' })).stretch", "-3% -2%");
</del><ins>+shouldThrow("(new FontFace('asdf', 'url(notreal)', { stretch: '-3% -2%' })).stretch");
</ins><span class="cx"> shouldThrow("(new FontFace('asdf', 'url(notreal)', { stretch: '5% 4%' })).stretch");
</span><span class="cx"> shouldThrow("(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200% 3%' })).stretch");
</span><span class="cx"> shouldThrow("(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200% a' })).stretch");
</span><del>-shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { stretch: '-3%' })).stretch", "-3%");
</del><ins>+shouldThrow("(new FontFace('asdf', 'url(notreal)', { stretch: '-3%' })).stretch");
</ins><span class="cx">
</span><span class="cx"> shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20deg' })).style", "oblique 10deg 20deg");
</span><span class="cx"> shouldThrow("(new FontFace('asdf', 'url(notreal)', { style: 'oblique a10deg 20deg' })).style");
</span><span class="lines">@@ -53,4 +53,4 @@
</span><span class="cx"> </script>
</span><span class="cx"> <script src="../../../resources/js-test-post.js"></script>
</span><span class="cx"> </body>
</span><del>-</html>
</del><span class="cx">\ No newline at end of file
</span><ins>+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfasttextvariationsoutofboundsselectionpropertiesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/variations/out-of-bounds-selection-properties-expected.txt (0 => 214507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/variations/out-of-bounds-selection-properties-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/text/variations/out-of-bounds-selection-properties-expected.txt        2017-03-28 23:53:28 UTC (rev 214507)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+PASS window.getComputedStyle(document.getElementById('test1')).getPropertyValue('font-weight') is "normal"
+PASS window.getComputedStyle(document.getElementById('test1')).getPropertyValue('font-style') is "normal"
+PASS window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-weight') is "normal"
+PASS window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-stretch') is "normal"
+PASS window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-style') is "normal"
+PASS window.getComputedStyle(document.getElementById('test3')).getPropertyValue('font-weight') is "normal"
+PASS window.getComputedStyle(document.getElementById('test4')).getPropertyValue('font-weight') is "normal"
+PASS window.getComputedStyle(document.getElementById('test5')).getPropertyValue('font-style') is "normal"
+PASS window.getComputedStyle(document.getElementById('test6')).getPropertyValue('font-style') is "normal"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Hello
+Hello
+Hello
+Hello
+Hello
+Hello
</ins></span></pre></div>
<a id="trunkLayoutTestsfasttextvariationsoutofboundsselectionpropertieshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/variations/out-of-bounds-selection-properties.html (0 => 214507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/variations/out-of-bounds-selection-properties.html         (rev 0)
+++ trunk/LayoutTests/fast/text/variations/out-of-bounds-selection-properties.html        2017-03-28 23:53:28 UTC (rev 214507)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<div id="test1" style="font-weight: 1001; font-style: oblique 91deg;">Hello</div>
+<div id="test2" style="font-weight: -1; font-stretch: -1%; font-style: oblique -91deg;">Hello</div>
+<div id="test3" style="font: 1001 16px 'Times';">Hello</div>
+<div id="test4" style="font: -1 16px 'Times';">Hello</div>
+<div id="test5" style="font: oblique 91deg 16px 'Times';">Hello</div>
+<div id="test6" style="font: oblique -91deg 16px 'Times';">Hello</div>
+<script>
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).getPropertyValue('font-weight')", "normal");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).getPropertyValue('font-style')", "normal");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-weight')", "normal");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-stretch')", "normal");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-style')", "normal");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).getPropertyValue('font-weight')", "normal");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).getPropertyValue('font-weight')", "normal");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).getPropertyValue('font-style')", "normal");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).getPropertyValue('font-style')", "normal");
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins><span class="cx">\ No newline at end of file
</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 (214506 => 214507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt        2017-03-28 23:50:55 UTC (rev 214506)
+++ trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt        2017-03-28 23:53:28 UTC (rev 214507)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> PASS weightTestSheet.cssRules[24].style.fontWeight is ""
</span><span class="cx"> PASS weightTestSheet.cssRules[25].style.fontWeight is ""
</span><span class="cx"> FAIL weightTestSheet.cssRules[26].style.fontWeight should be 1 2. Was .
</span><del>-FAIL weightTestSheet.cssRules[27].style.fontWeight should be -2 -1. Was .
</del><ins>+PASS weightTestSheet.cssRules[27].style.fontWeight is ""
</ins><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><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> PASS stretchTestSheet.cssRules[31].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[32].style.fontStretch is ""
</span><span class="cx"> FAIL stretchTestSheet.cssRules[33].style.fontStretch should be 1% 2%. Was .
</span><del>-FAIL stretchTestSheet.cssRules[34].style.fontStretch should be -2% -1%. Was .
</del><ins>+PASS stretchTestSheet.cssRules[34].style.fontStretch is ""
</ins><span class="cx"> PASS stretchTestSheet.cssRules[35].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[36].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[37].style.fontStretch is ""
</span><span class="lines">@@ -72,9 +72,9 @@
</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><span class="cx"> PASS styleTestSheet.cssRules[0].style.fontStyle is "oblique 1deg"
</span><del>-PASS styleTestSheet.cssRules[1].style.fontStyle is "oblique 200grad"
-PASS styleTestSheet.cssRules[2].style.fontStyle is "oblique 6.28318rad"
-PASS styleTestSheet.cssRules[3].style.fontStyle is "oblique 4turn"
</del><ins>+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"
</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(1441deg)"
</del><ins>+PASS styleTestSheet.cssRules[12].style.fontStyle is "oblique calc(15.4deg)"
</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 class="lines">@@ -95,8 +95,8 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[21].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[22].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[23].style.fontStyle is ""
</span><del>-FAIL styleTestSheet.cssRules[24].style.fontStyle should be oblique 100deg 200deg. Was .
-FAIL styleTestSheet.cssRules[25].style.fontStyle should be oblique 100deg 200deg. Was .
</del><ins>+FAIL styleTestSheet.cssRules[24].style.fontStyle should be oblique 10deg 20deg. Was .
+FAIL styleTestSheet.cssRules[25].style.fontStyle should be oblique 10deg 20deg. Was .
</ins><span class="cx"> PASS styleTestSheet.cssRules[26].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[27].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[28].style.fontStyle is ""
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[34].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[35].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[36].style.fontStyle is ""
</span><del>-FAIL styleTestSheet.cssRules[37].style.fontStyle should be oblique 2deg 1turn. Was .
</del><ins>+FAIL styleTestSheet.cssRules[37].style.fontStyle should be oblique 2deg 4grad. Was .
</ins><span class="cx"> PASS styleTestSheet.cssRules[38].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[39].style.fontStyle is ""
</span><span class="cx"> FAIL styleTestSheet.cssRules[40].style.fontStyle should be oblique calc(7deg) 8deg. Was .
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (214506 => 214507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-28 23:50:55 UTC (rev 214506)
+++ trunk/Source/WebCore/ChangeLog        2017-03-28 23:53:28 UTC (rev 214507)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2017-03-28 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Ranges for variation font properties are not enforced
+ https://bugs.webkit.org/show_bug.cgi?id=169979
+
+ Reviewed by David Hyatt.
+
+ The spec specifies that:
+ - Font weights less than or equal to 0, or greater than or equal to 1000 are parse errors
+ - Font stretch values less than or equal to 0% are parse errors
+ - Font style values less than or equal to -90deg or greater than or equal to 90deg are parse errors
+
+ Test: fast/text/variations/out-of-bounds-selection-properties.html
+
+ * css/parser/CSSPropertyParser.cpp:
+ (WebCore::consumeFontWeightRange):
+ (WebCore::fontStretchIsWithinRange):
+ (WebCore::consumeFontStretch):
+ (WebCore::consumeFontStretchRange):
+ (WebCore::fontStyleIsWithinRange):
+ (WebCore::consumeFontStyle):
+ (WebCore::consumeFontStyleRange):
+
</ins><span class="cx"> 2017-03-28 Andy Estes <aestes@apple.com>
</span><span class="cx">
</span><span class="cx"> [iOS] Crash in -[WebPreviewLoader failed] when running http/tests/multipart/policy-ignore-crash.php
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (214506 => 214507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2017-03-28 23:50:55 UTC (rev 214506)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2017-03-28 23:53:28 UTC (rev 214507)
</span><span class="lines">@@ -883,16 +883,14 @@
</span><span class="cx"> {
</span><span class="cx"> if (auto result = consumeFontWeightKeywordValue(range))
</span><span class="cx"> return result;
</span><del>- auto firstNumber = consumeNumber(range, ValueRangeAll);
</del><ins>+ auto firstNumber = consumeFontWeightNumber(range);
</ins><span class="cx"> if (!firstNumber)
</span><span class="cx"> return nullptr;
</span><span class="cx"> if (range.atEnd())
</span><span class="cx"> return firstNumber;
</span><del>- auto secondNumber = consumeNumber(range, ValueRangeAll);
- if (!secondNumber)
</del><ins>+ auto secondNumber = consumeFontWeightNumber(range);
+ if (!secondNumber || firstNumber->floatValue() > secondNumber->floatValue())
</ins><span class="cx"> return nullptr;
</span><del>- if (firstNumber->floatValue() > secondNumber->floatValue())
- return nullptr;
</del><span class="cx"> auto result = CSSValueList::createSpaceSeparated();
</span><span class="cx"> result->append(firstNumber.releaseNonNull());
</span><span class="cx"> result->append(secondNumber.releaseNonNull());
</span><span class="lines">@@ -905,11 +903,18 @@
</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>+static bool fontStretchIsWithinRange(float stretch)
+{
+ return stretch > 0;
+}
+
</ins><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><del>- return consumePercent(range, ValueRangeAll);
</del><ins>+ if (auto percent = consumePercent(range, ValueRangeNonNegative))
+ return fontStretchIsWithinRange(percent->value<float>()) ? percent : nullptr;
+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(VARIATION_FONTS)
</span><span class="lines">@@ -917,16 +922,14 @@
</span><span class="cx"> {
</span><span class="cx"> if (auto result = consumeFontStretchKeywordValue(range))
</span><span class="cx"> return result;
</span><del>- auto firstPercent = consumePercent(range, ValueRangeAll);
- if (!firstPercent)
</del><ins>+ auto firstPercent = consumePercent(range, ValueRangeNonNegative);
+ if (!firstPercent || !fontStretchIsWithinRange(firstPercent->value<float>()))
</ins><span class="cx"> return nullptr;
</span><span class="cx"> if (range.atEnd())
</span><span class="cx"> return firstPercent;
</span><del>- auto secondPercent = consumePercent(range, ValueRangeAll);
- if (!secondPercent)
</del><ins>+ auto secondPercent = consumePercent(range, ValueRangeNonNegative);
+ if (!secondPercent || !fontStretchIsWithinRange(secondPercent->value<float>()) || firstPercent->floatValue() > secondPercent->floatValue())
</ins><span class="cx"> return nullptr;
</span><del>- if (firstPercent->floatValue() > secondPercent->floatValue())
- return nullptr;
</del><span class="cx"> auto result = CSSValueList::createSpaceSeparated();
</span><span class="cx"> result->append(firstPercent.releaseNonNull());
</span><span class="cx"> result->append(secondPercent.releaseNonNull());
</span><span class="lines">@@ -939,6 +942,11 @@
</span><span class="cx"> return consumeIdent<CSSValueNormal, CSSValueItalic, CSSValueOblique>(range);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static bool fontStyleIsWithinRange(float oblique)
+{
+ return oblique > -90 && oblique < 90;
+}
+
</ins><span class="cx"> static RefPtr<CSSFontStyleValue> consumeFontStyle(CSSParserTokenRange& range, CSSParserMode cssParserMode)
</span><span class="cx"> {
</span><span class="cx"> auto result = consumeFontStyleKeywordValue(range);
</span><span class="lines">@@ -952,8 +960,11 @@
</span><span class="cx"> ASSERT(result->valueID() == CSSValueOblique);
</span><span class="cx"> if (range.atEnd())
</span><span class="cx"> return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique));
</span><del>- if (auto angle = consumeAngle(range, cssParserMode))
- return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique), WTFMove(angle));
</del><ins>+ 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"> return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -968,6 +979,8 @@
</span><span class="cx"> return CSSFontStyleRangeValue::create(keyword.releaseNonNull());
</span><span class="cx">
</span><span class="cx"> if (auto firstAngle = consumeAngle(range, cssParserMode)) {
</span><ins>+ if (!fontStyleIsWithinRange(firstAngle->value<float>(CSSPrimitiveValue::CSS_DEG)))
+ return nullptr;
</ins><span class="cx"> if (range.atEnd()) {
</span><span class="cx"> auto result = CSSValueList::createSpaceSeparated();
</span><span class="cx"> result->append(firstAngle.releaseNonNull());
</span><span class="lines">@@ -974,10 +987,8 @@
</span><span class="cx"> return CSSFontStyleRangeValue::create(keyword.releaseNonNull(), WTFMove(result));
</span><span class="cx"> }
</span><span class="cx"> auto secondAngle = consumeAngle(range, cssParserMode);
</span><del>- if (!secondAngle)
</del><ins>+ if (!secondAngle || !fontStyleIsWithinRange(secondAngle->value<float>(CSSPrimitiveValue::CSS_DEG)) || firstAngle->floatValue(CSSPrimitiveValue::CSS_DEG) > secondAngle->floatValue(CSSPrimitiveValue::CSS_DEG))
</ins><span class="cx"> return nullptr;
</span><del>- if (firstAngle->floatValue(CSSPrimitiveValue::CSS_DEG) > secondAngle->floatValue(CSSPrimitiveValue::CSS_DEG))
- return nullptr;
</del><span class="cx"> auto result = CSSValueList::createSpaceSeparated();
</span><span class="cx"> result->append(firstAngle.releaseNonNull());
</span><span class="cx"> result->append(secondAngle.releaseNonNull());
</span></span></pre>
</div>
</div>
</body>
</html>