<!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  &lt;mmaxfield@apple.com&gt;
+
+        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  &lt;aestes@apple.com&gt;
</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 &quot;&quot;
</span><span class="cx"> PASS weightTestSheet.cssRules[25].style.fontWeight is &quot;&quot;
</span><span class="cx"> PASS weightTestSheet.cssRules[26].style.fontWeight is &quot;1 2&quot;
</span><del>-PASS weightTestSheet.cssRules[27].style.fontWeight is &quot;-2 -1&quot;
</del><ins>+PASS weightTestSheet.cssRules[27].style.fontWeight is &quot;&quot;
</ins><span class="cx"> PASS weightTestSheet.cssRules[28].style.fontWeight is &quot;&quot;
</span><span class="cx"> PASS weightTestSheet.cssRules[29].style.fontWeight is &quot;7 8&quot;
</span><span class="cx"> PASS weightTestSheet.cssRules[30].style.fontWeight is &quot;2 7&quot;
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> PASS stretchTestSheet.cssRules[31].style.fontStretch is &quot;&quot;
</span><span class="cx"> PASS stretchTestSheet.cssRules[32].style.fontStretch is &quot;&quot;
</span><span class="cx"> PASS stretchTestSheet.cssRules[33].style.fontStretch is &quot;1% 2%&quot;
</span><del>-PASS stretchTestSheet.cssRules[34].style.fontStretch is &quot;-2% -1%&quot;
</del><ins>+PASS stretchTestSheet.cssRules[34].style.fontStretch is &quot;&quot;
</ins><span class="cx"> PASS stretchTestSheet.cssRules[35].style.fontStretch is &quot;&quot;
</span><span class="cx"> PASS stretchTestSheet.cssRules[36].style.fontStretch is &quot;&quot;
</span><span class="cx"> PASS stretchTestSheet.cssRules[37].style.fontStretch is &quot;&quot;
</span><span class="lines">@@ -72,9 +72,9 @@
</span><span class="cx"> PASS stretchTestSheet.cssRules[40].style.fontStretch is &quot;calc(7%) 8%&quot;
</span><span class="cx"> PASS stretchTestSheet.cssRules[41].style.fontStretch is &quot;2% calc(7%)&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[0].style.fontStyle is &quot;oblique 1deg&quot;
</span><del>-PASS styleTestSheet.cssRules[1].style.fontStyle is &quot;oblique 200grad&quot;
-PASS styleTestSheet.cssRules[2].style.fontStyle is &quot;oblique 6.28318rad&quot;
-PASS styleTestSheet.cssRules[3].style.fontStyle is &quot;oblique 4turn&quot;
</del><ins>+PASS styleTestSheet.cssRules[1].style.fontStyle is &quot;oblique 20grad&quot;
+PASS styleTestSheet.cssRules[2].style.fontStyle is &quot;oblique 0.28318rad&quot;
+PASS styleTestSheet.cssRules[3].style.fontStyle is &quot;oblique 0.04turn&quot;
</ins><span class="cx"> PASS styleTestSheet.cssRules[4].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[5].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[6].style.fontStyle is &quot;italic&quot;
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[9].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[10].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[11].style.fontStyle is &quot;&quot;
</span><del>-PASS styleTestSheet.cssRules[12].style.fontStyle is &quot;oblique calc(1441deg)&quot;
</del><ins>+PASS styleTestSheet.cssRules[12].style.fontStyle is &quot;oblique calc(15.4deg)&quot;
</ins><span class="cx"> PASS styleTestSheet.cssRules[13].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[14].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[15].style.fontStyle is &quot;&quot;
</span><span class="lines">@@ -95,8 +95,8 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[21].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[22].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[23].style.fontStyle is &quot;&quot;
</span><del>-PASS styleTestSheet.cssRules[24].style.fontStyle is &quot;oblique 100deg 200deg&quot;
-PASS styleTestSheet.cssRules[25].style.fontStyle is &quot;oblique 100deg 200deg&quot;
</del><ins>+PASS styleTestSheet.cssRules[24].style.fontStyle is &quot;oblique 10deg 20deg&quot;
+PASS styleTestSheet.cssRules[25].style.fontStyle is &quot;oblique 10deg 20deg&quot;
</ins><span class="cx"> PASS styleTestSheet.cssRules[26].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[27].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[28].style.fontStyle is &quot;&quot;
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[34].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[35].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[36].style.fontStyle is &quot;&quot;
</span><del>-PASS styleTestSheet.cssRules[37].style.fontStyle is &quot;oblique 2deg 1turn&quot;
</del><ins>+PASS styleTestSheet.cssRules[37].style.fontStyle is &quot;oblique 2deg 4grad&quot;
</ins><span class="cx"> PASS styleTestSheet.cssRules[38].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[39].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[40].style.fontStyle is &quot;oblique calc(7deg) 8deg&quot;
</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(&quot;weightTestSheet.cssRules[24].style.fontWeight&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;weightTestSheet.cssRules[25].style.fontWeight&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;weightTestSheet.cssRules[26].style.fontWeight&quot;, &quot;1 2&quot;);
</span><del>-shouldBeEqualToString(&quot;weightTestSheet.cssRules[27].style.fontWeight&quot;, &quot;-2 -1&quot;);
</del><ins>+shouldBeEqualToString(&quot;weightTestSheet.cssRules[27].style.fontWeight&quot;, &quot;&quot;);
</ins><span class="cx"> shouldBeEqualToString(&quot;weightTestSheet.cssRules[28].style.fontWeight&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;weightTestSheet.cssRules[29].style.fontWeight&quot;, &quot;7 8&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;weightTestSheet.cssRules[30].style.fontWeight&quot;, &quot;2 7&quot;);
</span><span class="lines">@@ -425,7 +425,7 @@
</span><span class="cx"> shouldBeEqualToString(&quot;stretchTestSheet.cssRules[31].style.fontStretch&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;stretchTestSheet.cssRules[32].style.fontStretch&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;stretchTestSheet.cssRules[33].style.fontStretch&quot;, &quot;1% 2%&quot;);
</span><del>-shouldBeEqualToString(&quot;stretchTestSheet.cssRules[34].style.fontStretch&quot;, &quot;-2% -1%&quot;);
</del><ins>+shouldBeEqualToString(&quot;stretchTestSheet.cssRules[34].style.fontStretch&quot;, &quot;&quot;);
</ins><span class="cx"> shouldBeEqualToString(&quot;stretchTestSheet.cssRules[35].style.fontStretch&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;stretchTestSheet.cssRules[36].style.fontStretch&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;stretchTestSheet.cssRules[37].style.fontStretch&quot;, &quot;&quot;);
</span><span class="lines">@@ -436,9 +436,9 @@
</span><span class="cx"> 
</span><span class="cx"> var styleTestSheet = document.getElementById(&quot;styleTest&quot;).sheet;
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[0].style.fontStyle&quot;, &quot;oblique 1deg&quot;);
</span><del>-shouldBeEqualToString(&quot;styleTestSheet.cssRules[1].style.fontStyle&quot;, &quot;oblique 200grad&quot;);
-shouldBeEqualToString(&quot;styleTestSheet.cssRules[2].style.fontStyle&quot;, &quot;oblique 6.28318rad&quot;);
-shouldBeEqualToString(&quot;styleTestSheet.cssRules[3].style.fontStyle&quot;, &quot;oblique 4turn&quot;);
</del><ins>+shouldBeEqualToString(&quot;styleTestSheet.cssRules[1].style.fontStyle&quot;, &quot;oblique 20grad&quot;);
+shouldBeEqualToString(&quot;styleTestSheet.cssRules[2].style.fontStyle&quot;, &quot;oblique 0.28318rad&quot;);
+shouldBeEqualToString(&quot;styleTestSheet.cssRules[3].style.fontStyle&quot;, &quot;oblique 0.04turn&quot;);
</ins><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[4].style.fontStyle&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[5].style.fontStyle&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[6].style.fontStyle&quot;, &quot;italic&quot;);
</span><span class="lines">@@ -447,7 +447,7 @@
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[9].style.fontStyle&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[10].style.fontStyle&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[11].style.fontStyle&quot;, &quot;&quot;);
</span><del>-shouldBeEqualToString(&quot;styleTestSheet.cssRules[12].style.fontStyle&quot;, &quot;oblique calc(1441deg)&quot;);
</del><ins>+shouldBeEqualToString(&quot;styleTestSheet.cssRules[12].style.fontStyle&quot;, &quot;oblique calc(15.4deg)&quot;);
</ins><span class="cx"> 
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[13].style.fontStyle&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[14].style.fontStyle&quot;, &quot;&quot;);
</span><span class="lines">@@ -460,8 +460,8 @@
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[21].style.fontStyle&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[22].style.fontStyle&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[23].style.fontStyle&quot;, &quot;&quot;);
</span><del>-shouldBeEqualToString(&quot;styleTestSheet.cssRules[24].style.fontStyle&quot;, &quot;oblique 100deg 200deg&quot;);
-shouldBeEqualToString(&quot;styleTestSheet.cssRules[25].style.fontStyle&quot;, &quot;oblique 100deg 200deg&quot;);
</del><ins>+shouldBeEqualToString(&quot;styleTestSheet.cssRules[24].style.fontStyle&quot;, &quot;oblique 10deg 20deg&quot;);
+shouldBeEqualToString(&quot;styleTestSheet.cssRules[25].style.fontStyle&quot;, &quot;oblique 10deg 20deg&quot;);
</ins><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[26].style.fontStyle&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[27].style.fontStyle&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[28].style.fontStyle&quot;, &quot;&quot;);
</span><span class="lines">@@ -473,7 +473,7 @@
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[34].style.fontStyle&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[35].style.fontStyle&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[36].style.fontStyle&quot;, &quot;&quot;);
</span><del>-shouldBeEqualToString(&quot;styleTestSheet.cssRules[37].style.fontStyle&quot;, &quot;oblique 2deg 1turn&quot;);
</del><ins>+shouldBeEqualToString(&quot;styleTestSheet.cssRules[37].style.fontStyle&quot;, &quot;oblique 2deg 4grad&quot;);
</ins><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[38].style.fontStyle&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[39].style.fontStyle&quot;, &quot;&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;styleTestSheet.cssRules[40].style.fontStyle&quot;, &quot;oblique calc(7deg) 8deg&quot;);
</span><span class="lines">@@ -481,4 +481,4 @@
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</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 &quot;7%&quot;
</span><span class="cx"> PASS setFontFaceStyle(fontFace, 'oblique 1deg') is &quot;oblique 1deg&quot;
</span><del>-PASS setFontFaceStyle(fontFace, 'oblique 200grad') is &quot;oblique 180deg&quot;
-PASS setFontFaceStyle(fontFace, 'oblique 6.28318rad') is &quot;oblique 359.75deg&quot;
-PASS setFontFaceStyle(fontFace, 'oblique 4turn') is &quot;oblique 1440deg&quot;
</del><ins>+PASS setFontFaceStyle(fontFace, 'oblique 20grad') is &quot;oblique 18deg&quot;
+PASS setFontFaceStyle(fontFace, 'oblique 0.28318rad') is &quot;oblique 16deg&quot;
+PASS setFontFaceStyle(fontFace, 'oblique 0.04turn') is &quot;oblique 14.25deg&quot;
</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 &quot;italic&quot;
</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 &quot;oblique 1441deg&quot;
</del><ins>+PASS setFontFaceStyle(fontFace, 'oblique calc(0.04turn + 1deg)') is &quot;oblique 15.25deg&quot;
</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(&quot;setFontFaceStretch(fontFace, 'calc(3% + 4%)')&quot;, &quot;7%&quot;);
</span><span class="cx"> 
</span><span class="cx"> shouldBeEqualToString(&quot;setFontFaceStyle(fontFace, 'oblique 1deg')&quot;, &quot;oblique 1deg&quot;);
</span><del>-shouldBeEqualToString(&quot;setFontFaceStyle(fontFace, 'oblique 200grad')&quot;, &quot;oblique 180deg&quot;);
-shouldBeEqualToString(&quot;setFontFaceStyle(fontFace, 'oblique 6.28318rad')&quot;, &quot;oblique 359.75deg&quot;);
-shouldBeEqualToString(&quot;setFontFaceStyle(fontFace, 'oblique 4turn')&quot;, &quot;oblique 1440deg&quot;);
</del><ins>+shouldBeEqualToString(&quot;setFontFaceStyle(fontFace, 'oblique 20grad')&quot;, &quot;oblique 18deg&quot;);
+shouldBeEqualToString(&quot;setFontFaceStyle(fontFace, 'oblique 0.28318rad')&quot;, &quot;oblique 16deg&quot;);
+shouldBeEqualToString(&quot;setFontFaceStyle(fontFace, 'oblique 0.04turn')&quot;, &quot;oblique 14.25deg&quot;);
</ins><span class="cx"> shouldThrow(&quot;setFontFaceStyle(fontFace, 'oblique 5')&quot;);
</span><span class="cx"> shouldThrow(&quot;setFontFaceStyle(fontFace, 'oblique 20')&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;setFontFaceStyle(fontFace, 'italic')&quot;, &quot;italic&quot;);
</span><span class="lines">@@ -67,8 +67,8 @@
</span><span class="cx"> shouldThrow(&quot;setFontFaceStyle(fontFace, 'garbage')&quot;);
</span><span class="cx"> shouldThrow(&quot;setFontFaceStyle(fontFace, 'initial')&quot;);
</span><span class="cx"> shouldThrow(&quot;setFontFaceStyle(fontFace, 'oblique calc(3 + 4)')&quot;);
</span><del>-shouldBeEqualToString(&quot;setFontFaceStyle(fontFace, 'oblique calc(4turn + 1deg)')&quot;, &quot;oblique 1441deg&quot;);
</del><ins>+shouldBeEqualToString(&quot;setFontFaceStyle(fontFace, 'oblique calc(0.04turn + 1deg)')&quot;, &quot;oblique 15.25deg&quot;);
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</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 &quot;normal&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test2')).fontStyle is &quot;oblique 1deg&quot;
</span><del>-PASS window.getComputedStyle(document.getElementById('test3')).fontStyle is &quot;oblique 180deg&quot;
-PASS window.getComputedStyle(document.getElementById('test4')).fontStyle is &quot;oblique 359.75deg&quot;
-PASS window.getComputedStyle(document.getElementById('test5')).fontStyle is &quot;oblique 1440deg&quot;
</del><ins>+PASS window.getComputedStyle(document.getElementById('test3')).fontStyle is &quot;oblique 18deg&quot;
+PASS window.getComputedStyle(document.getElementById('test4')).fontStyle is &quot;oblique 16deg&quot;
+PASS window.getComputedStyle(document.getElementById('test5')).fontStyle is &quot;oblique 14.25deg&quot;
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('test6')).fontStyle is &quot;normal&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test7')).fontStyle is &quot;normal&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test8')).fontStyle is &quot;italic&quot;
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test11')).fontStyle is &quot;normal&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test12')).fontStyle is &quot;normal&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test13')).fontStyle is &quot;normal&quot;
</span><del>-PASS window.getComputedStyle(document.getElementById('test14')).fontStyle is &quot;oblique 1441deg&quot;
</del><ins>+PASS window.getComputedStyle(document.getElementById('test14')).fontStyle is &quot;oblique 15.25deg&quot;
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('test15')).fontStyle is &quot;italic&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test16')).fontStyle is &quot;italic&quot;
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test17')).fontStyle is &quot;normal&quot;
</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"> &lt;div style=&quot;font: 16px/18px 'Times';&quot;&gt;
</span><span class="cx"> &lt;div id=&quot;test1&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;test2&quot; style=&quot;font-style: oblique 1deg;&quot;&gt;&lt;/div&gt;
</span><del>-&lt;div id=&quot;test3&quot; style=&quot;font-style: oblique 200grad;&quot;&gt;&lt;/div&gt;
-&lt;div id=&quot;test4&quot; style=&quot;font-style: oblique 6.28318rad;&quot;&gt;&lt;/div&gt;
-&lt;div id=&quot;test5&quot; style=&quot;font-style: oblique 4turn;&quot;&gt;&lt;/div&gt;
</del><ins>+&lt;div id=&quot;test3&quot; style=&quot;font-style: oblique 20grad;&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;test4&quot; style=&quot;font-style: oblique 0.28318rad;&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;test5&quot; style=&quot;font-style: oblique 0.04turn;&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> &lt;div id=&quot;test6&quot; style=&quot;font-style: oblique 5;&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;test7&quot; style=&quot;font-style: oblique 20;&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;test8&quot; style=&quot;font-style: italic;&quot;&gt;&lt;/div&gt;
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx"> &lt;div id=&quot;test11&quot; style=&quot;font-style: garbage;&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;test12&quot; style=&quot;font-style: initial;&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;test13&quot; style=&quot;font-style: oblique calc(3 + 4);&quot;&gt;&lt;/div&gt;
</span><del>-&lt;div id=&quot;test14&quot; style=&quot;font-style: oblique calc(4turn + 1deg);&quot;&gt;&lt;/div&gt;
</del><ins>+&lt;div id=&quot;test14&quot; style=&quot;font-style: oblique calc(0.04turn + 1deg);&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> &lt;div id=&quot;test15&quot; style=&quot;font: 100 italic 48px/49px 'Helvetica Neue';&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;test16&quot; style=&quot;font: italic 100 48px/49px 'Helvetica Neue';&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;test17&quot; style=&quot;font: 100 48px/49px 'Helvetica Neue';&quot;&gt;&lt;/div&gt;
</span><span class="lines">@@ -30,9 +30,9 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test1')).fontStyle&quot;, &quot;normal&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test2')).fontStyle&quot;, &quot;oblique 1deg&quot;);
</span><del>-shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test3')).fontStyle&quot;, &quot;oblique 180deg&quot;);
-shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test4')).fontStyle&quot;, &quot;oblique 359.75deg&quot;);
-shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test5')).fontStyle&quot;, &quot;oblique 1440deg&quot;);
</del><ins>+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test3')).fontStyle&quot;, &quot;oblique 18deg&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test4')).fontStyle&quot;, &quot;oblique 16deg&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test5')).fontStyle&quot;, &quot;oblique 14.25deg&quot;);
</ins><span class="cx"> shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test6')).fontStyle&quot;, &quot;normal&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test7')).fontStyle&quot;, &quot;normal&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test8')).fontStyle&quot;, &quot;italic&quot;);
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test11')).fontStyle&quot;, &quot;normal&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test12')).fontStyle&quot;, &quot;normal&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test13')).fontStyle&quot;, &quot;normal&quot;);
</span><del>-shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test14')).fontStyle&quot;, &quot;oblique 1441deg&quot;);
</del><ins>+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test14')).fontStyle&quot;, &quot;oblique 15.25deg&quot;);
</ins><span class="cx"> shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test15')).fontStyle&quot;, &quot;italic&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test16')).fontStyle&quot;, &quot;italic&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test17')).fontStyle&quot;, &quot;normal&quot;);
</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 &quot;50 150&quot;
</span><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { weight: '2 3' })).weight is &quot;2 3&quot;
</span><del>-PASS (new FontFace('asdf', 'url(notreal)', { weight: '-3 -2' })).weight is &quot;-3 -2&quot;
</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 &quot;-3&quot;
</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 &quot;100% 200%&quot;
</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 &quot;50% 60%&quot;
</span><span class="cx"> PASS (new FontFace('asdf', 'url(notreal)', { stretch: '2% 3%' })).stretch is &quot;2% 3%&quot;
</span><del>-PASS (new FontFace('asdf', 'url(notreal)', { stretch: '-3% -2%' })).stretch is &quot;-3% -2%&quot;
</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 &quot;-3%&quot;
</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 &quot;oblique 10deg 20deg&quot;
</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(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '100 200a' })).weight&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '50 150' })).weight&quot;, &quot;50 150&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '2 3' })).weight&quot;, &quot;2 3&quot;);
</span><del>-shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '-3 -2' })).weight&quot;, &quot;-3 -2&quot;);
</del><ins>+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '-3 -2' })).weight&quot;);
</ins><span class="cx"> shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '5 4' })).weight&quot;);
</span><span class="cx"> shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '100 200 3' })).weight&quot;);
</span><span class="cx"> shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '100 200 a' })).weight&quot;);
</span><del>-shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '-3' })).weight&quot;, &quot;-3&quot;);
</del><ins>+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '-3' })).weight&quot;);
</ins><span class="cx"> 
</span><span class="cx"> shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: 'semi-expanded expanded' })).stretch&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200%' })).stretch&quot;, &quot;100% 200%&quot;);
</span><span class="lines">@@ -30,11 +30,11 @@
</span><span class="cx"> shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200%a' })).stretch&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '50% 60%' })).stretch&quot;, &quot;50% 60%&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '2% 3%' })).stretch&quot;, &quot;2% 3%&quot;);
</span><del>-shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '-3% -2%' })).stretch&quot;, &quot;-3% -2%&quot;);
</del><ins>+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '-3% -2%' })).stretch&quot;);
</ins><span class="cx"> shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '5% 4%' })).stretch&quot;);
</span><span class="cx"> shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200% 3%' })).stretch&quot;);
</span><span class="cx"> shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200% a' })).stretch&quot;);
</span><del>-shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '-3%' })).stretch&quot;, &quot;-3%&quot;);
</del><ins>+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '-3%' })).stretch&quot;);
</ins><span class="cx"> 
</span><span class="cx"> shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20deg' })).style&quot;, &quot;oblique 10deg 20deg&quot;);
</span><span class="cx"> shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { style: 'oblique a10deg 20deg' })).style&quot;);
</span><span class="lines">@@ -53,4 +53,4 @@
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</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 &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('test1')).getPropertyValue('font-style') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-weight') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-stretch') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-style') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('test3')).getPropertyValue('font-weight') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('test4')).getPropertyValue('font-weight') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('test5')).getPropertyValue('font-style') is &quot;normal&quot;
+PASS window.getComputedStyle(document.getElementById('test6')).getPropertyValue('font-style') is &quot;normal&quot;
+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>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;test1&quot; style=&quot;font-weight: 1001; font-style: oblique 91deg;&quot;&gt;Hello&lt;/div&gt;
+&lt;div id=&quot;test2&quot; style=&quot;font-weight: -1; font-stretch: -1%; font-style: oblique -91deg;&quot;&gt;Hello&lt;/div&gt;
+&lt;div id=&quot;test3&quot; style=&quot;font: 1001 16px 'Times';&quot;&gt;Hello&lt;/div&gt;
+&lt;div id=&quot;test4&quot; style=&quot;font: -1 16px 'Times';&quot;&gt;Hello&lt;/div&gt;
+&lt;div id=&quot;test5&quot; style=&quot;font: oblique 91deg 16px 'Times';&quot;&gt;Hello&lt;/div&gt;
+&lt;div id=&quot;test6&quot; style=&quot;font: oblique -91deg 16px 'Times';&quot;&gt;Hello&lt;/div&gt;
+&lt;script&gt;
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test1')).getPropertyValue('font-weight')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test1')).getPropertyValue('font-style')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-weight')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-stretch')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-style')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test3')).getPropertyValue('font-weight')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test4')).getPropertyValue('font-weight')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test5')).getPropertyValue('font-style')&quot;, &quot;normal&quot;);
+shouldBeEqualToString(&quot;window.getComputedStyle(document.getElementById('test6')).getPropertyValue('font-style')&quot;, &quot;normal&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</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 &quot;&quot;
</span><span class="cx"> PASS weightTestSheet.cssRules[25].style.fontWeight is &quot;&quot;
</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 &quot;&quot;
</ins><span class="cx"> PASS weightTestSheet.cssRules[28].style.fontWeight is &quot;&quot;
</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 &quot;&quot;
</span><span class="cx"> PASS stretchTestSheet.cssRules[32].style.fontStretch is &quot;&quot;
</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 &quot;&quot;
</ins><span class="cx"> PASS stretchTestSheet.cssRules[35].style.fontStretch is &quot;&quot;
</span><span class="cx"> PASS stretchTestSheet.cssRules[36].style.fontStretch is &quot;&quot;
</span><span class="cx"> PASS stretchTestSheet.cssRules[37].style.fontStretch is &quot;&quot;
</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 &quot;oblique 1deg&quot;
</span><del>-PASS styleTestSheet.cssRules[1].style.fontStyle is &quot;oblique 200grad&quot;
-PASS styleTestSheet.cssRules[2].style.fontStyle is &quot;oblique 6.28318rad&quot;
-PASS styleTestSheet.cssRules[3].style.fontStyle is &quot;oblique 4turn&quot;
</del><ins>+PASS styleTestSheet.cssRules[1].style.fontStyle is &quot;oblique 20grad&quot;
+PASS styleTestSheet.cssRules[2].style.fontStyle is &quot;oblique 0.28318rad&quot;
+PASS styleTestSheet.cssRules[3].style.fontStyle is &quot;oblique 0.04turn&quot;
</ins><span class="cx"> PASS styleTestSheet.cssRules[4].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[5].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[6].style.fontStyle is &quot;italic&quot;
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[9].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[10].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[11].style.fontStyle is &quot;&quot;
</span><del>-PASS styleTestSheet.cssRules[12].style.fontStyle is &quot;oblique calc(1441deg)&quot;
</del><ins>+PASS styleTestSheet.cssRules[12].style.fontStyle is &quot;oblique calc(15.4deg)&quot;
</ins><span class="cx"> PASS styleTestSheet.cssRules[13].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[14].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[15].style.fontStyle is &quot;&quot;
</span><span class="lines">@@ -95,8 +95,8 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[21].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[22].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[23].style.fontStyle is &quot;&quot;
</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 &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[27].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[28].style.fontStyle is &quot;&quot;
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[34].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[35].style.fontStyle is &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[36].style.fontStyle is &quot;&quot;
</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 &quot;&quot;
</span><span class="cx"> PASS styleTestSheet.cssRules[39].style.fontStyle is &quot;&quot;
</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  &lt;mmaxfield@apple.com&gt;
+
+        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  &lt;aestes@apple.com&gt;
</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-&gt;floatValue() &gt; secondNumber-&gt;floatValue())
</ins><span class="cx">         return nullptr;
</span><del>-    if (firstNumber-&gt;floatValue() &gt; secondNumber-&gt;floatValue())
-        return nullptr;
</del><span class="cx">     auto result = CSSValueList::createSpaceSeparated();
</span><span class="cx">     result-&gt;append(firstNumber.releaseNonNull());
</span><span class="cx">     result-&gt;append(secondNumber.releaseNonNull());
</span><span class="lines">@@ -905,11 +903,18 @@
</span><span class="cx">     return consumeIdent&lt;CSSValueUltraCondensed, CSSValueExtraCondensed, CSSValueCondensed, CSSValueSemiCondensed, CSSValueNormal, CSSValueSemiExpanded, CSSValueExpanded, CSSValueExtraExpanded, CSSValueUltraExpanded&gt;(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static bool fontStretchIsWithinRange(float stretch)
+{
+    return stretch &gt; 0;
+}
+
</ins><span class="cx"> static RefPtr&lt;CSSPrimitiveValue&gt; consumeFontStretch(CSSParserTokenRange&amp; 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-&gt;value&lt;float&gt;()) ? 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-&gt;value&lt;float&gt;()))
</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-&gt;value&lt;float&gt;()) || firstPercent-&gt;floatValue() &gt; secondPercent-&gt;floatValue())
</ins><span class="cx">         return nullptr;
</span><del>-    if (firstPercent-&gt;floatValue() &gt; secondPercent-&gt;floatValue())
-        return nullptr;
</del><span class="cx">     auto result = CSSValueList::createSpaceSeparated();
</span><span class="cx">     result-&gt;append(firstPercent.releaseNonNull());
</span><span class="cx">     result-&gt;append(secondPercent.releaseNonNull());
</span><span class="lines">@@ -939,6 +942,11 @@
</span><span class="cx">     return consumeIdent&lt;CSSValueNormal, CSSValueItalic, CSSValueOblique&gt;(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static bool fontStyleIsWithinRange(float oblique)
+{
+    return oblique &gt; -90 &amp;&amp; oblique &lt; 90;
+}
+
</ins><span class="cx"> static RefPtr&lt;CSSFontStyleValue&gt; consumeFontStyle(CSSParserTokenRange&amp; 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-&gt;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-&gt;value&lt;float&gt;(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-&gt;value&lt;float&gt;(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-&gt;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-&gt;value&lt;float&gt;(CSSPrimitiveValue::CSS_DEG)) || firstAngle-&gt;floatValue(CSSPrimitiveValue::CSS_DEG) &gt; secondAngle-&gt;floatValue(CSSPrimitiveValue::CSS_DEG))
</ins><span class="cx">             return nullptr;
</span><del>-        if (firstAngle-&gt;floatValue(CSSPrimitiveValue::CSS_DEG) &gt; secondAngle-&gt;floatValue(CSSPrimitiveValue::CSS_DEG))
-            return nullptr;
</del><span class="cx">         auto result = CSSValueList::createSpaceSeparated();
</span><span class="cx">         result-&gt;append(firstAngle.releaseNonNull());
</span><span class="cx">         result-&gt;append(secondAngle.releaseNonNull());
</span></span></pre>
</div>
</div>

</body>
</html>