<!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>[214433] 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/214433">214433</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2017-03-27 15:09:14 -0700 (Mon, 27 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Test variation font ranges in the CSS Font Loading API
https://bugs.webkit.org/show_bug.cgi?id=170022

Reviewed by Dean Jackson.

Source/WebCore:

Test: fast/text/variations/font-loading-api-parse-ranges.html

Don't use keywords when reporting font variation range values.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::fontNonKeywordWeightFromStyleValue):
(WebCore::ComputedStyleExtractor::fontWeightFromStyleValue):
(WebCore::ComputedStyleExtractor::fontNonKeywordStretchFromStyleValue):
(WebCore::ComputedStyleExtractor::fontStretchFromStyleValue):
(WebCore::ComputedStyleExtractor::fontNonKeywordStyleFromStyleValue):
(WebCore::ComputedStyleExtractor::fontStyleFromStyleValue):
* css/CSSComputedStyleDeclaration.h:
* css/FontFace.cpp:
(WebCore::FontFace::style):
(WebCore::FontFace::weight):
(WebCore::FontFace::stretch):

LayoutTests:

* fast/text/variations/font-loading-api-parse-ranges-expected.txt: Added.
* fast/text/variations/font-loading-api-parse-ranges.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationh">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h</a></li>
<li><a href="#trunkSourceWebCorecssFontFacecpp">trunk/Source/WebCore/css/FontFace.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<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>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (214432 => 214433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-03-27 21:49:09 UTC (rev 214432)
+++ trunk/LayoutTests/ChangeLog        2017-03-27 22:09:14 UTC (rev 214433)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2017-03-27  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Test variation font ranges in the CSS Font Loading API
+        https://bugs.webkit.org/show_bug.cgi?id=170022
+
+        Reviewed by Dean Jackson.
+
+        * fast/text/variations/font-loading-api-parse-ranges-expected.txt: Added.
+        * fast/text/variations/font-loading-api-parse-ranges.html: Added.
+
</ins><span class="cx"> 2017-03-27  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r214411.
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextvariationsfontloadingapiparserangesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/variations/font-loading-api-parse-ranges-expected.txt (0 => 214433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/variations/font-loading-api-parse-ranges-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/text/variations/font-loading-api-parse-ranges-expected.txt        2017-03-27 22:09:14 UTC (rev 214433)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+PASS (new FontFace('asdf', 'url(notreal)', { weight: '100 200' })).weight is &quot;100 200&quot;
+PASS (new FontFace('asdf', 'url(notreal)', { weight: 'a100 200' })).weight threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS (new FontFace('asdf', 'url(notreal)', { weight: '100a 200' })).weight threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS (new FontFace('asdf', 'url(notreal)', { weight: '100   200' })).weight is &quot;100 200&quot;
+PASS (new FontFace('asdf', 'url(notreal)', { weight: '100 a 200' })).weight threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS (new FontFace('asdf', 'url(notreal)', { weight: '100 a200' })).weight threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS (new FontFace('asdf', 'url(notreal)', { weight: '100 200a' })).weight threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS (new FontFace('asdf', 'url(notreal)', { weight: '50 150' })).weight is &quot;50 150&quot;
+PASS (new FontFace('asdf', 'url(notreal)', { weight: '2 3' })).weight is &quot;2 3&quot;
+PASS (new FontFace('asdf', 'url(notreal)', { weight: '-3 -2' })).weight is &quot;-3 -2&quot;
+PASS (new FontFace('asdf', 'url(notreal)', { weight: '5 4' })).weight threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+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..
+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..
+PASS (new FontFace('asdf', 'url(notreal)', { weight: '-3' })).weight is &quot;-3&quot;
+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..
+PASS (new FontFace('asdf', 'url(notreal)', { stretch: '100% 200%' })).stretch is &quot;100% 200%&quot;
+PASS (new FontFace('asdf', 'url(notreal)', { stretch: 'a100% 200%' })).stretch threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS (new FontFace('asdf', 'url(notreal)', { stretch: '100%a 200%' })).stretch threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS (new FontFace('asdf', 'url(notreal)', { stretch: '100%   200%' })).stretch is &quot;100% 200%&quot;
+PASS (new FontFace('asdf', 'url(notreal)', { stretch: '100% a 200%' })).stretch threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS (new FontFace('asdf', 'url(notreal)', { stretch: '100% a200%' })).stretch threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+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..
+PASS (new FontFace('asdf', 'url(notreal)', { stretch: '50% 60%' })).stretch is &quot;50% 60%&quot;
+PASS (new FontFace('asdf', 'url(notreal)', { stretch: '2% 3%' })).stretch is &quot;2% 3%&quot;
+PASS (new FontFace('asdf', 'url(notreal)', { stretch: '-3% -2%' })).stretch is &quot;-3% -2%&quot;
+PASS (new FontFace('asdf', 'url(notreal)', { stretch: '5% 4%' })).stretch threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+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..
+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..
+PASS (new FontFace('asdf', 'url(notreal)', { stretch: '-3%' })).stretch is &quot;-3%&quot;
+PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20deg' })).style is &quot;oblique 10deg 20deg&quot;
+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..
+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..
+PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg  20deg' })).style is &quot;oblique 10deg 20deg&quot;
+PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg a 20deg' })).style threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg a20deg' })).style threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20dega' })).style threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique 50deg 60deg' })).style is &quot;oblique 50deg 60deg&quot;
+PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique 2deg 3deg' })).style is &quot;oblique 2deg 3deg&quot;
+PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique -3deg -2deg' })).style is &quot;oblique -3deg -2deg&quot;
+PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique 5deg 4deg' })).style threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20deg 3deg' })).style threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20deg a' })).style threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique -3deg' })).style is &quot;oblique -3deg&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasttextvariationsfontloadingapiparserangeshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/variations/font-loading-api-parse-ranges.html (0 => 214433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/variations/font-loading-api-parse-ranges.html                                (rev 0)
+++ trunk/LayoutTests/fast/text/variations/font-loading-api-parse-ranges.html        2017-03-27 22:09:14 UTC (rev 214433)
</span><span class="lines">@@ -0,0 +1,56 @@
</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;script&gt;
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '100 200' })).weight&quot;, &quot;100 200&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { weight: 'a100 200' })).weight&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '100a 200' })).weight&quot;);
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '100   200' })).weight&quot;, &quot;100 200&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '100 a 200' })).weight&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '100 a200' })).weight&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '100 200a' })).weight&quot;);
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '50 150' })).weight&quot;, &quot;50 150&quot;);
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '2 3' })).weight&quot;, &quot;2 3&quot;);
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '-3 -2' })).weight&quot;, &quot;-3 -2&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '5 4' })).weight&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '100 200 3' })).weight&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '100 200 a' })).weight&quot;);
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { weight: '-3' })).weight&quot;, &quot;-3&quot;);
+
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: 'semi-expanded expanded' })).stretch&quot;);
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200%' })).stretch&quot;, &quot;100% 200%&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: 'a100% 200%' })).stretch&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '100%a 200%' })).stretch&quot;);
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '100%   200%' })).stretch&quot;, &quot;100% 200%&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '100% a 200%' })).stretch&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '100% a200%' })).stretch&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200%a' })).stretch&quot;);
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '50% 60%' })).stretch&quot;, &quot;50% 60%&quot;);
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '2% 3%' })).stretch&quot;, &quot;2% 3%&quot;);
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '-3% -2%' })).stretch&quot;, &quot;-3% -2%&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '5% 4%' })).stretch&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200% 3%' })).stretch&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200% a' })).stretch&quot;);
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { stretch: '-3%' })).stretch&quot;, &quot;-3%&quot;);
+
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20deg' })).style&quot;, &quot;oblique 10deg 20deg&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { style: 'oblique a10deg 20deg' })).style&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10dega 20deg' })).style&quot;);
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg  20deg' })).style&quot;, &quot;oblique 10deg 20deg&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg a 20deg' })).style&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg a20deg' })).style&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20dega' })).style&quot;);
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { style: 'oblique 50deg 60deg' })).style&quot;, &quot;oblique 50deg 60deg&quot;);
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { style: 'oblique 2deg 3deg' })).style&quot;, &quot;oblique 2deg 3deg&quot;);
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { style: 'oblique -3deg -2deg' })).style&quot;, &quot;oblique -3deg -2deg&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { style: 'oblique 5deg 4deg' })).style&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20deg 3deg' })).style&quot;);
+shouldThrow(&quot;(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20deg a' })).style&quot;);
+shouldBeEqualToString(&quot;(new FontFace('asdf', 'url(notreal)', { style: 'oblique -3deg' })).style&quot;, &quot;oblique -3deg&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="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (214432 => 214433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-27 21:49:09 UTC (rev 214432)
+++ trunk/Source/WebCore/ChangeLog        2017-03-27 22:09:14 UTC (rev 214433)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2017-03-27  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Test variation font ranges in the CSS Font Loading API
+        https://bugs.webkit.org/show_bug.cgi?id=170022
+
+        Reviewed by Dean Jackson.
+
+        Test: fast/text/variations/font-loading-api-parse-ranges.html
+
+        Don't use keywords when reporting font variation range values.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::fontNonKeywordWeightFromStyleValue):
+        (WebCore::ComputedStyleExtractor::fontWeightFromStyleValue):
+        (WebCore::ComputedStyleExtractor::fontNonKeywordStretchFromStyleValue):
+        (WebCore::ComputedStyleExtractor::fontStretchFromStyleValue):
+        (WebCore::ComputedStyleExtractor::fontNonKeywordStyleFromStyleValue):
+        (WebCore::ComputedStyleExtractor::fontStyleFromStyleValue):
+        * css/CSSComputedStyleDeclaration.h:
+        * css/FontFace.cpp:
+        (WebCore::FontFace::style):
+        (WebCore::FontFace::weight):
+        (WebCore::FontFace::stretch):
+
</ins><span class="cx"> 2017-03-27  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Propagate shipping contact update errors
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (214432 => 214433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2017-03-27 21:49:09 UTC (rev 214432)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2017-03-27 22:09:14 UTC (rev 214433)
</span><span class="lines">@@ -1917,11 +1917,16 @@
</span><span class="cx">     return zoomAdjustedPixelValue(style.fontDescription().computedSize(), style);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Ref&lt;CSSPrimitiveValue&gt; ComputedStyleExtractor::fontNonKeywordWeightFromStyleValue(FontSelectionValue weight)
+{
+    return CSSValuePool::singleton().createValue(static_cast&lt;float&gt;(weight), CSSPrimitiveValue::CSS_NUMBER);
+}
+
</ins><span class="cx"> Ref&lt;CSSPrimitiveValue&gt; ComputedStyleExtractor::fontWeightFromStyleValue(FontSelectionValue weight)
</span><span class="cx"> {
</span><span class="cx">     if (auto value = fontWeightKeyword(weight))
</span><span class="cx">         return CSSValuePool::singleton().createIdentifierValue(value.value());
</span><del>-    return CSSValuePool::singleton().createValue(static_cast&lt;float&gt;(weight), CSSPrimitiveValue::CSS_NUMBER);
</del><ins>+    return fontNonKeywordWeightFromStyleValue(weight);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static Ref&lt;CSSPrimitiveValue&gt; fontWeightFromStyle(const RenderStyle&amp; style)
</span><span class="lines">@@ -1929,11 +1934,16 @@
</span><span class="cx">     return ComputedStyleExtractor::fontWeightFromStyleValue(style.fontDescription().weight());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Ref&lt;CSSPrimitiveValue&gt; ComputedStyleExtractor::fontNonKeywordStretchFromStyleValue(FontSelectionValue stretch)
+{
+    return CSSValuePool::singleton().createValue(static_cast&lt;float&gt;(stretch), CSSPrimitiveValue::CSS_PERCENTAGE);
+}
+
</ins><span class="cx"> Ref&lt;CSSPrimitiveValue&gt; ComputedStyleExtractor::fontStretchFromStyleValue(FontSelectionValue stretch)
</span><span class="cx"> {
</span><span class="cx">     if (auto keyword = fontStretchKeyword(stretch))
</span><span class="cx">         return CSSValuePool::singleton().createIdentifierValue(keyword.value());
</span><del>-    return CSSValuePool::singleton().createValue(static_cast&lt;float&gt;(stretch), CSSPrimitiveValue::CSS_PERCENTAGE);
</del><ins>+    return fontNonKeywordStretchFromStyleValue(stretch);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static Ref&lt;CSSPrimitiveValue&gt; fontStretchFromStyle(const RenderStyle&amp; style)
</span><span class="lines">@@ -1941,11 +1951,16 @@
</span><span class="cx">     return ComputedStyleExtractor::fontStretchFromStyleValue(style.fontDescription().stretch());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Ref&lt;CSSFontStyleValue&gt; ComputedStyleExtractor::fontNonKeywordStyleFromStyleValue(FontSelectionValue italic)
+{
+    return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique), CSSValuePool::singleton().createValue(static_cast&lt;float&gt;(italic), CSSPrimitiveValue::CSS_DEG));
+}
+
</ins><span class="cx"> Ref&lt;CSSFontStyleValue&gt; ComputedStyleExtractor::fontStyleFromStyleValue(FontSelectionValue italic)
</span><span class="cx"> {
</span><span class="cx">     if (auto keyword = fontStyleKeyword(italic))
</span><span class="cx">         return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(keyword.value()));
</span><del>-    return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique), CSSValuePool::singleton().createValue(static_cast&lt;float&gt;(italic), CSSPrimitiveValue::CSS_DEG));
</del><ins>+    return fontNonKeywordStyleFromStyleValue(italic);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static Ref&lt;CSSFontStyleValue&gt; fontStyleFromStyle(const RenderStyle&amp; style)
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h (214432 => 214433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h        2017-03-27 21:49:09 UTC (rev 214432)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h        2017-03-27 22:09:14 UTC (rev 214433)
</span><span class="lines">@@ -66,8 +66,11 @@
</span><span class="cx"> 
</span><span class="cx">     static Ref&lt;CSSValue&gt; valueForFilter(const RenderStyle&amp;, const FilterOperations&amp;, AdjustPixelValuesForComputedStyle = AdjustPixelValues);
</span><span class="cx"> 
</span><ins>+    static Ref&lt;CSSPrimitiveValue&gt; fontNonKeywordWeightFromStyleValue(FontSelectionValue);
</ins><span class="cx">     static Ref&lt;CSSPrimitiveValue&gt; fontWeightFromStyleValue(FontSelectionValue);
</span><ins>+    static Ref&lt;CSSPrimitiveValue&gt; fontNonKeywordStretchFromStyleValue(FontSelectionValue);
</ins><span class="cx">     static Ref&lt;CSSPrimitiveValue&gt; fontStretchFromStyleValue(FontSelectionValue);
</span><ins>+    static Ref&lt;CSSFontStyleValue&gt; fontNonKeywordStyleFromStyleValue(FontSelectionValue);
</ins><span class="cx">     static Ref&lt;CSSFontStyleValue&gt; fontStyleFromStyleValue(FontSelectionValue);
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCorecssFontFacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontFace.cpp (214432 => 214433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontFace.cpp        2017-03-27 21:49:09 UTC (rev 214432)
+++ trunk/Source/WebCore/css/FontFace.cpp        2017-03-27 22:09:14 UTC (rev 214433)
</span><span class="lines">@@ -294,17 +294,21 @@
</span><span class="cx">     if (minimum.get().equals(maximum.get()))
</span><span class="cx">         return minimum-&gt;cssText();
</span><span class="cx"> 
</span><del>-    ASSERT(minimum-&gt;fontStyleValue-&gt;valueID() == CSSValueOblique);
-    ASSERT(maximum-&gt;fontStyleValue-&gt;valueID() == CSSValueOblique);
</del><ins>+    auto minimumNonKeyword = ComputedStyleExtractor::fontNonKeywordStyleFromStyleValue(style.minimum);
+    auto maximumNonKeyword = ComputedStyleExtractor::fontNonKeywordStyleFromStyleValue(style.maximum);
</ins><span class="cx"> 
</span><ins>+    ASSERT(minimumNonKeyword-&gt;fontStyleValue-&gt;valueID() == CSSValueOblique);
+    ASSERT(maximumNonKeyword-&gt;fontStyleValue-&gt;valueID() == CSSValueOblique);
+
</ins><span class="cx">     StringBuilder builder;
</span><del>-    builder.append(minimum-&gt;fontStyleValue-&gt;cssText());
</del><ins>+    builder.append(minimumNonKeyword-&gt;fontStyleValue-&gt;cssText());
</ins><span class="cx">     builder.append(' ');
</span><span class="cx">     if (minimum-&gt;obliqueValue.get() == maximum-&gt;obliqueValue.get())
</span><del>-        builder.append(minimum-&gt;obliqueValue-&gt;cssText());
</del><ins>+        builder.append(minimumNonKeyword-&gt;obliqueValue-&gt;cssText());
</ins><span class="cx">     else {
</span><del>-        builder.append(minimum-&gt;obliqueValue-&gt;cssText());
-        builder.append(maximum-&gt;obliqueValue-&gt;cssText());
</del><ins>+        builder.append(minimumNonKeyword-&gt;obliqueValue-&gt;cssText());
+        builder.append(' ');
+        builder.append(maximumNonKeyword-&gt;obliqueValue-&gt;cssText());
</ins><span class="cx">     }
</span><span class="cx">     return builder.toString();
</span><span class="cx"> }
</span><span class="lines">@@ -320,10 +324,13 @@
</span><span class="cx">     if (minimum.get().equals(maximum.get()))
</span><span class="cx">         return minimum-&gt;cssText();
</span><span class="cx"> 
</span><ins>+    auto minimumNonKeyword = ComputedStyleExtractor::fontNonKeywordWeightFromStyleValue(weight.minimum);
+    auto maximumNonKeyword = ComputedStyleExtractor::fontNonKeywordWeightFromStyleValue(weight.maximum);
+
</ins><span class="cx">     StringBuilder builder;
</span><del>-    builder.append(minimum-&gt;cssText());
</del><ins>+    builder.append(minimumNonKeyword-&gt;cssText());
</ins><span class="cx">     builder.append(' ');
</span><del>-    builder.append(maximum-&gt;cssText());
</del><ins>+    builder.append(maximumNonKeyword-&gt;cssText());
</ins><span class="cx">     return builder.toString();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -338,10 +345,13 @@
</span><span class="cx">     if (minimum.get().equals(maximum.get()))
</span><span class="cx">         return minimum-&gt;cssText();
</span><span class="cx"> 
</span><ins>+    auto minimumNonKeyword = ComputedStyleExtractor::fontNonKeywordStretchFromStyleValue(stretch.minimum);
+    auto maximumNonKeyword = ComputedStyleExtractor::fontNonKeywordStretchFromStyleValue(stretch.maximum);
+
</ins><span class="cx">     StringBuilder builder;
</span><del>-    builder.append(minimum-&gt;cssText());
</del><ins>+    builder.append(minimumNonKeyword-&gt;cssText());
</ins><span class="cx">     builder.append(' ');
</span><del>-    builder.append(maximum-&gt;cssText());
</del><ins>+    builder.append(maximumNonKeyword-&gt;cssText());
</ins><span class="cx">     return builder.toString();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>