<!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 <mmaxfield@apple.com>
+
+ 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 <ryanhaddad@apple.com>
</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 "100 200"
+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 "100 200"
+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 "50 150"
+PASS (new FontFace('asdf', 'url(notreal)', { weight: '2 3' })).weight is "2 3"
+PASS (new FontFace('asdf', 'url(notreal)', { weight: '-3 -2' })).weight is "-3 -2"
+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 "-3"
+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 "100% 200%"
+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 "100% 200%"
+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 "50% 60%"
+PASS (new FontFace('asdf', 'url(notreal)', { stretch: '2% 3%' })).stretch is "2% 3%"
+PASS (new FontFace('asdf', 'url(notreal)', { stretch: '-3% -2%' })).stretch is "-3% -2%"
+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 "-3%"
+PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20deg' })).style is "oblique 10deg 20deg"
+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 "oblique 10deg 20deg"
+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 "oblique 50deg 60deg"
+PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique 2deg 3deg' })).style is "oblique 2deg 3deg"
+PASS (new FontFace('asdf', 'url(notreal)', { style: 'oblique -3deg -2deg' })).style is "oblique -3deg -2deg"
+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 "oblique -3deg"
+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>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { weight: '100 200' })).weight", "100 200");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { weight: 'a100 200' })).weight");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { weight: '100a 200' })).weight");
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { weight: '100 200' })).weight", "100 200");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { weight: '100 a 200' })).weight");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { weight: '100 a200' })).weight");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { weight: '100 200a' })).weight");
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { weight: '50 150' })).weight", "50 150");
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { weight: '2 3' })).weight", "2 3");
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { weight: '-3 -2' })).weight", "-3 -2");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { weight: '5 4' })).weight");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { weight: '100 200 3' })).weight");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { weight: '100 200 a' })).weight");
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { weight: '-3' })).weight", "-3");
+
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { stretch: 'semi-expanded expanded' })).stretch");
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200%' })).stretch", "100% 200%");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { stretch: 'a100% 200%' })).stretch");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { stretch: '100%a 200%' })).stretch");
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200%' })).stretch", "100% 200%");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { stretch: '100% a 200%' })).stretch");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { stretch: '100% a200%' })).stretch");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200%a' })).stretch");
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { stretch: '50% 60%' })).stretch", "50% 60%");
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { stretch: '2% 3%' })).stretch", "2% 3%");
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { stretch: '-3% -2%' })).stretch", "-3% -2%");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { stretch: '5% 4%' })).stretch");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200% 3%' })).stretch");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { stretch: '100% 200% a' })).stretch");
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { stretch: '-3%' })).stretch", "-3%");
+
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20deg' })).style", "oblique 10deg 20deg");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { style: 'oblique a10deg 20deg' })).style");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10dega 20deg' })).style");
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20deg' })).style", "oblique 10deg 20deg");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg a 20deg' })).style");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg a20deg' })).style");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20dega' })).style");
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { style: 'oblique 50deg 60deg' })).style", "oblique 50deg 60deg");
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { style: 'oblique 2deg 3deg' })).style", "oblique 2deg 3deg");
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { style: 'oblique -3deg -2deg' })).style", "oblique -3deg -2deg");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { style: 'oblique 5deg 4deg' })).style");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20deg 3deg' })).style");
+shouldThrow("(new FontFace('asdf', 'url(notreal)', { style: 'oblique 10deg 20deg a' })).style");
+shouldBeEqualToString("(new FontFace('asdf', 'url(notreal)', { style: 'oblique -3deg' })).style", "oblique -3deg");
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="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 <mmaxfield@apple.com>
+
+ 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 <andersca@apple.com>
</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<CSSPrimitiveValue> ComputedStyleExtractor::fontNonKeywordWeightFromStyleValue(FontSelectionValue weight)
+{
+ return CSSValuePool::singleton().createValue(static_cast<float>(weight), CSSPrimitiveValue::CSS_NUMBER);
+}
+
</ins><span class="cx"> Ref<CSSPrimitiveValue> 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<float>(weight), CSSPrimitiveValue::CSS_NUMBER);
</del><ins>+ return fontNonKeywordWeightFromStyleValue(weight);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static Ref<CSSPrimitiveValue> fontWeightFromStyle(const RenderStyle& 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<CSSPrimitiveValue> ComputedStyleExtractor::fontNonKeywordStretchFromStyleValue(FontSelectionValue stretch)
+{
+ return CSSValuePool::singleton().createValue(static_cast<float>(stretch), CSSPrimitiveValue::CSS_PERCENTAGE);
+}
+
</ins><span class="cx"> Ref<CSSPrimitiveValue> 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<float>(stretch), CSSPrimitiveValue::CSS_PERCENTAGE);
</del><ins>+ return fontNonKeywordStretchFromStyleValue(stretch);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static Ref<CSSPrimitiveValue> fontStretchFromStyle(const RenderStyle& 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<CSSFontStyleValue> ComputedStyleExtractor::fontNonKeywordStyleFromStyleValue(FontSelectionValue italic)
+{
+ return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique), CSSValuePool::singleton().createValue(static_cast<float>(italic), CSSPrimitiveValue::CSS_DEG));
+}
+
</ins><span class="cx"> Ref<CSSFontStyleValue> 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<float>(italic), CSSPrimitiveValue::CSS_DEG));
</del><ins>+ return fontNonKeywordStyleFromStyleValue(italic);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static Ref<CSSFontStyleValue> fontStyleFromStyle(const RenderStyle& 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<CSSValue> valueForFilter(const RenderStyle&, const FilterOperations&, AdjustPixelValuesForComputedStyle = AdjustPixelValues);
</span><span class="cx">
</span><ins>+ static Ref<CSSPrimitiveValue> fontNonKeywordWeightFromStyleValue(FontSelectionValue);
</ins><span class="cx"> static Ref<CSSPrimitiveValue> fontWeightFromStyleValue(FontSelectionValue);
</span><ins>+ static Ref<CSSPrimitiveValue> fontNonKeywordStretchFromStyleValue(FontSelectionValue);
</ins><span class="cx"> static Ref<CSSPrimitiveValue> fontStretchFromStyleValue(FontSelectionValue);
</span><ins>+ static Ref<CSSFontStyleValue> fontNonKeywordStyleFromStyleValue(FontSelectionValue);
</ins><span class="cx"> static Ref<CSSFontStyleValue> 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->cssText();
</span><span class="cx">
</span><del>- ASSERT(minimum->fontStyleValue->valueID() == CSSValueOblique);
- ASSERT(maximum->fontStyleValue->valueID() == CSSValueOblique);
</del><ins>+ auto minimumNonKeyword = ComputedStyleExtractor::fontNonKeywordStyleFromStyleValue(style.minimum);
+ auto maximumNonKeyword = ComputedStyleExtractor::fontNonKeywordStyleFromStyleValue(style.maximum);
</ins><span class="cx">
</span><ins>+ ASSERT(minimumNonKeyword->fontStyleValue->valueID() == CSSValueOblique);
+ ASSERT(maximumNonKeyword->fontStyleValue->valueID() == CSSValueOblique);
+
</ins><span class="cx"> StringBuilder builder;
</span><del>- builder.append(minimum->fontStyleValue->cssText());
</del><ins>+ builder.append(minimumNonKeyword->fontStyleValue->cssText());
</ins><span class="cx"> builder.append(' ');
</span><span class="cx"> if (minimum->obliqueValue.get() == maximum->obliqueValue.get())
</span><del>- builder.append(minimum->obliqueValue->cssText());
</del><ins>+ builder.append(minimumNonKeyword->obliqueValue->cssText());
</ins><span class="cx"> else {
</span><del>- builder.append(minimum->obliqueValue->cssText());
- builder.append(maximum->obliqueValue->cssText());
</del><ins>+ builder.append(minimumNonKeyword->obliqueValue->cssText());
+ builder.append(' ');
+ builder.append(maximumNonKeyword->obliqueValue->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->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->cssText());
</del><ins>+ builder.append(minimumNonKeyword->cssText());
</ins><span class="cx"> builder.append(' ');
</span><del>- builder.append(maximum->cssText());
</del><ins>+ builder.append(maximumNonKeyword->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->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->cssText());
</del><ins>+ builder.append(minimumNonKeyword->cssText());
</ins><span class="cx"> builder.append(' ');
</span><del>- builder.append(maximum->cssText());
</del><ins>+ builder.append(maximumNonKeyword->cssText());
</ins><span class="cx"> return builder.toString();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>