<!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>[214419] 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/214419">214419</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2017-03-27 10:50:33 -0700 (Mon, 27 Mar 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>font variation properties don't need to accept numbers
https://bugs.webkit.org/show_bug.cgi?id=169357
Reviewed by Antti Koivisto.
Source/WebCore:
The CSS Fonts level 4 spec stabilized the grammar accepted by font-weight,
font-style, and font-stretch. The changes are that font-style and
font-stretch no longer accept raw numbers, and the @font-face descriptor
ranges are now separated by spaces instead of slashes.
Tests: fast/text/font-selection-font-face-parse.html
fast/text/font-selection-font-loading-api-parse.html
fast/text/font-stretch-parse.html
fast/text/font-style-parse.html
fast/text/variations/font-selection-properties.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::fontWeightFromStyleValue):
(WebCore::fontWeightFromStyle):
(WebCore::ComputedStyleExtractor::fontStretchFromStyleValue):
(WebCore::fontStretchFromStyle):
(WebCore::ComputedStyleExtractor::fontStyleFromStyleValue):
(WebCore::fontStyleFromStyle):
* css/CSSComputedStyleDeclaration.h:
* css/FontFace.cpp:
(WebCore::FontFace::style):
(WebCore::FontFace::weight):
(WebCore::FontFace::stretch):
(WebCore::rangeIsSingleValue): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertFontStretchFromValue):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeFontWeightRange):
(WebCore::consumeFontStretch):
(WebCore::consumeFontStretchRange):
(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-stretch-parse-expected.txt:
* fast/text/font-stretch-parse.html:
* fast/text/font-style-parse-expected.txt:
* fast/text/font-style-parse.html:
* fast/text/variations/font-selection-properties.html:
* 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="#trunkLayoutTestsfasttextfontstretchparseexpectedtxt">trunk/LayoutTests/fast/text/font-stretch-parse-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasttextfontstretchparsehtml">trunk/LayoutTests/fast/text/font-stretch-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="#trunkLayoutTestsfasttextvariationsfontselectionpropertieshtml">trunk/LayoutTests/fast/text/variations/font-selection-properties.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="#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>
<li><a href="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSPropertyParsercpp">trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/LayoutTests/ChangeLog        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -1,5 +1,23 @@
</span><span class="cx"> 2017-03-27 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><ins>+ font variation properties don't need to accept numbers
+ https://bugs.webkit.org/show_bug.cgi?id=169357
+
+ Reviewed by Antti Koivisto.
+
+ * 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-stretch-parse-expected.txt:
+ * fast/text/font-stretch-parse.html:
+ * fast/text/font-style-parse-expected.txt:
+ * fast/text/font-style-parse.html:
+ * fast/text/variations/font-selection-properties.html:
+ * platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt:
+
+2017-03-27 Myles C. Maxfield <mmaxfield@apple.com>
+
</ins><span class="cx"> Implement format specifier for variation fonts
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=169327
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontselectionfontfaceparseexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-selection-font-face-parse-expected.txt (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-selection-font-face-parse-expected.txt        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/LayoutTests/fast/text/font-selection-font-face-parse-expected.txt        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -16,8 +16,8 @@
</span><span class="cx"> PASS weightTestSheet.cssRules[15].style.fontWeight is "7"
</span><span class="cx"> PASS weightTestSheet.cssRules[16].style.fontWeight is "300"
</span><span class="cx"> PASS weightTestSheet.cssRules[17].style.fontWeight is "200"
</span><del>-PASS weightTestSheet.cssRules[18].style.fontWeight is "100 / 200"
-PASS weightTestSheet.cssRules[19].style.fontWeight is "100 / 200"
</del><ins>+PASS weightTestSheet.cssRules[18].style.fontWeight is "100 200"
+PASS weightTestSheet.cssRules[19].style.fontWeight is "100 200"
</ins><span class="cx"> PASS weightTestSheet.cssRules[20].style.fontWeight is ""
</span><span class="cx"> PASS weightTestSheet.cssRules[21].style.fontWeight is ""
</span><span class="cx"> PASS weightTestSheet.cssRules[22].style.fontWeight is ""
</span><span class="lines">@@ -24,13 +24,13 @@
</span><span class="cx"> PASS weightTestSheet.cssRules[23].style.fontWeight is ""
</span><span class="cx"> PASS weightTestSheet.cssRules[24].style.fontWeight is ""
</span><span class="cx"> PASS weightTestSheet.cssRules[25].style.fontWeight is ""
</span><del>-PASS weightTestSheet.cssRules[26].style.fontWeight is "1 / 2"
-PASS weightTestSheet.cssRules[27].style.fontWeight is "-2 / -1"
</del><ins>+PASS weightTestSheet.cssRules[26].style.fontWeight is "1 2"
+PASS weightTestSheet.cssRules[27].style.fontWeight is "-2 -1"
</ins><span class="cx"> PASS weightTestSheet.cssRules[28].style.fontWeight is ""
</span><del>-PASS weightTestSheet.cssRules[29].style.fontWeight is "7 / 8"
-PASS weightTestSheet.cssRules[30].style.fontWeight is "2 / 7"
</del><ins>+PASS weightTestSheet.cssRules[29].style.fontWeight is "7 8"
+PASS weightTestSheet.cssRules[30].style.fontWeight is "2 7"
</ins><span class="cx"> PASS stretchTestSheet.cssRules[0].style.fontStretch is "1%"
</span><del>-PASS stretchTestSheet.cssRules[1].style.fontStretch is "2"
</del><ins>+PASS stretchTestSheet.cssRules[1].style.fontStretch is ""
</ins><span class="cx"> PASS stretchTestSheet.cssRules[2].style.fontStretch is "ultra-condensed"
</span><span class="cx"> PASS stretchTestSheet.cssRules[3].style.fontStretch is "extra-condensed"
</span><span class="cx"> PASS stretchTestSheet.cssRules[4].style.fontStretch is "condensed"
</span><span class="lines">@@ -42,9 +42,9 @@
</span><span class="cx"> PASS stretchTestSheet.cssRules[10].style.fontStretch is "ultra-expanded"
</span><span class="cx"> PASS stretchTestSheet.cssRules[11].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[12].style.fontStretch is ""
</span><del>-PASS stretchTestSheet.cssRules[13].style.fontStretch is "7"
-PASS stretchTestSheet.cssRules[14].style.fontStretch is "100 / 200"
-PASS stretchTestSheet.cssRules[15].style.fontStretch is "100 / 200"
</del><ins>+PASS stretchTestSheet.cssRules[13].style.fontStretch is ""
+PASS stretchTestSheet.cssRules[14].style.fontStretch is ""
+PASS stretchTestSheet.cssRules[15].style.fontStretch is ""
</ins><span class="cx"> PASS stretchTestSheet.cssRules[16].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[17].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[18].style.fontStretch is ""
</span><span class="lines">@@ -51,11 +51,11 @@
</span><span class="cx"> PASS stretchTestSheet.cssRules[19].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[20].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[21].style.fontStretch is ""
</span><del>-PASS stretchTestSheet.cssRules[22].style.fontStretch is "1 / 2"
-PASS stretchTestSheet.cssRules[23].style.fontStretch is "-2 / -1"
</del><ins>+PASS stretchTestSheet.cssRules[22].style.fontStretch is ""
+PASS stretchTestSheet.cssRules[23].style.fontStretch is ""
</ins><span class="cx"> PASS stretchTestSheet.cssRules[24].style.fontStretch is ""
</span><del>-PASS stretchTestSheet.cssRules[25].style.fontStretch is "100% / 200%"
-PASS stretchTestSheet.cssRules[26].style.fontStretch is "100% / 200%"
</del><ins>+PASS stretchTestSheet.cssRules[25].style.fontStretch is "100% 200%"
+PASS stretchTestSheet.cssRules[26].style.fontStretch is "100% 200%"
</ins><span class="cx"> PASS stretchTestSheet.cssRules[27].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[28].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[29].style.fontStretch is ""
</span><span class="lines">@@ -62,28 +62,30 @@
</span><span class="cx"> PASS stretchTestSheet.cssRules[30].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[31].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[32].style.fontStretch is ""
</span><del>-PASS stretchTestSheet.cssRules[33].style.fontStretch is "1% / 2%"
-PASS stretchTestSheet.cssRules[34].style.fontStretch is "-2% / -1%"
</del><ins>+PASS stretchTestSheet.cssRules[33].style.fontStretch is "1% 2%"
+PASS stretchTestSheet.cssRules[34].style.fontStretch is "-2% -1%"
</ins><span class="cx"> PASS stretchTestSheet.cssRules[35].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[36].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[37].style.fontStretch is ""
</span><del>-PASS stretchTestSheet.cssRules[38].style.fontStretch is "7 / 8"
-PASS stretchTestSheet.cssRules[39].style.fontStretch is "2 / 7"
</del><ins>+PASS stretchTestSheet.cssRules[38].style.fontStretch is ""
+PASS stretchTestSheet.cssRules[39].style.fontStretch is ""
+PASS stretchTestSheet.cssRules[40].style.fontStretch is "calc(7%) 8%"
+PASS stretchTestSheet.cssRules[41].style.fontStretch is "2% calc(7%)"
</ins><span class="cx"> PASS styleTestSheet.cssRules[0].style.fontStyle is "oblique 1deg"
</span><span class="cx"> PASS styleTestSheet.cssRules[1].style.fontStyle is "oblique 200grad"
</span><span class="cx"> PASS styleTestSheet.cssRules[2].style.fontStyle is "oblique 6.28318rad"
</span><span class="cx"> PASS styleTestSheet.cssRules[3].style.fontStyle is "oblique 4turn"
</span><del>-PASS styleTestSheet.cssRules[4].style.fontStyle is "oblique 5"
-PASS styleTestSheet.cssRules[5].style.fontStyle is "oblique 20"
</del><ins>+PASS styleTestSheet.cssRules[4].style.fontStyle is ""
+PASS styleTestSheet.cssRules[5].style.fontStyle is ""
</ins><span class="cx"> PASS styleTestSheet.cssRules[6].style.fontStyle is "italic"
</span><span class="cx"> PASS styleTestSheet.cssRules[7].style.fontStyle is "oblique"
</span><span class="cx"> PASS styleTestSheet.cssRules[8].style.fontStyle is "normal"
</span><span class="cx"> PASS styleTestSheet.cssRules[9].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[10].style.fontStyle is ""
</span><del>-PASS styleTestSheet.cssRules[11].style.fontStyle is "oblique 7"
</del><ins>+PASS styleTestSheet.cssRules[11].style.fontStyle is ""
</ins><span class="cx"> PASS styleTestSheet.cssRules[12].style.fontStyle is "oblique calc(1441deg)"
</span><del>-PASS styleTestSheet.cssRules[13].style.fontStyle is "oblique 100deg 200deg"
-PASS styleTestSheet.cssRules[14].style.fontStyle is "oblique 100deg 200deg"
</del><ins>+PASS styleTestSheet.cssRules[13].style.fontStyle is ""
+PASS styleTestSheet.cssRules[14].style.fontStyle is ""
</ins><span class="cx"> PASS styleTestSheet.cssRules[15].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[16].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[17].style.fontStyle is ""
</span><span class="lines">@@ -90,8 +92,8 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[18].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[19].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[20].style.fontStyle is ""
</span><del>-PASS styleTestSheet.cssRules[21].style.fontStyle is "oblique 1deg 2deg"
-PASS styleTestSheet.cssRules[22].style.fontStyle is "oblique -2deg -1deg"
</del><ins>+PASS styleTestSheet.cssRules[21].style.fontStyle is ""
+PASS styleTestSheet.cssRules[22].style.fontStyle is ""
</ins><span class="cx"> PASS styleTestSheet.cssRules[23].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[24].style.fontStyle is "oblique 100deg 200deg"
</span><span class="cx"> PASS styleTestSheet.cssRules[25].style.fontStyle is "oblique 100deg 200deg"
</span><span class="lines">@@ -107,8 +109,10 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[35].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[36].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[37].style.fontStyle is "oblique 2deg 1turn"
</span><del>-PASS styleTestSheet.cssRules[38].style.fontStyle is "oblique 7deg 8deg"
-PASS styleTestSheet.cssRules[39].style.fontStyle is "oblique 2deg 7deg"
</del><ins>+PASS styleTestSheet.cssRules[38].style.fontStyle is ""
+PASS styleTestSheet.cssRules[39].style.fontStyle is ""
+PASS styleTestSheet.cssRules[40].style.fontStyle is "oblique calc(7deg) 8deg"
+PASS styleTestSheet.cssRules[41].style.fontStyle is "oblique 2deg calc(7deg)"
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontselectionfontfaceparsehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-selection-font-face-parse.html (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-selection-font-face-parse.html        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/LayoutTests/fast/text/font-selection-font-face-parse.html        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -57,43 +57,43 @@
</span><span class="cx"> font-weight: calc(150 + 50);
</span><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-weight: 100/200;
</del><ins>+ font-weight: 100 200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-weight: 100 / 200;
</del><ins>+ font-weight: 100 200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-weight: a 100 / 200;
</del><ins>+ font-weight: a 100 200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-weight: 100 / 200 a;
</del><ins>+ font-weight: 100 200 a;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-weight: 100 a / 200;
</del><ins>+ font-weight: 100 a 200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-weight: 100 a/ 200;
</del><ins>+ font-weight: 100a 200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-weight: 100 /a 200;
</del><ins>+ font-weight: 100 a200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-weight: 100 / a200;
</del><ins>+ font-weight: 100 a200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-weight: 1 / 2;
</del><ins>+ font-weight: 1 2;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-weight: -2 / -1;
</del><ins>+ font-weight: -2 -1;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-weight: 2 / 1;
</del><ins>+ font-weight: 2 1;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-weight: calc(3 + 4) / 8;
</del><ins>+ font-weight: calc(3 + 4) 8;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-weight: 2 / calc(3 + 4);
</del><ins>+ font-weight: 2 calc(3 + 4);
</ins><span class="cx"> }
</span><span class="cx"> </style>
</span><span class="cx">
</span><span class="lines">@@ -141,83 +141,89 @@
</span><span class="cx"> font-stretch: calc(3 + 4);
</span><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 100/200;
</del><ins>+ font-stretch: 100 200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 100 / 200;
</del><ins>+ font-stretch: 100 200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: a 100 / 200;
</del><ins>+ font-stretch: a 100 200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 100 / 200 a;
</del><ins>+ font-stretch: 100 200 a;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 100 a / 200;
</del><ins>+ font-stretch: 100 a 200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 100 a/ 200;
</del><ins>+ font-stretch: 100a 200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 100 /a 200;
</del><ins>+ font-stretch: 100 a200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 100 / a200;
</del><ins>+ font-stretch: 100 a200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 1 / 2;
</del><ins>+ font-stretch: 1 2;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: -2 / -1;
</del><ins>+ font-stretch: -2 -1;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 2 / 1;
</del><ins>+ font-stretch: 2 1;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 100%/200%;
</del><ins>+ font-stretch: 100% 200%;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 100% / 200%;
</del><ins>+ font-stretch: 100% 200%;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: a 100% / 200%;
</del><ins>+ font-stretch: a 100% 200%;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 100% / 200% a;
</del><ins>+ font-stretch: 100% 200% a;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 100% a / 200%;
</del><ins>+ font-stretch: 100% a 200%;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 100% a/ 200%;
</del><ins>+ font-stretch: 100%a 200%;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 100% /a 200%;
</del><ins>+ font-stretch: 100% a200%;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 100% / a200%;
</del><ins>+ font-stretch: 100% a200%;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 1% / 2%;
</del><ins>+ font-stretch: 1% 2%;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: -2% / -1%;
</del><ins>+ font-stretch: -2% -1%;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 2% / 1%;
</del><ins>+ font-stretch: 2% 1%;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 1 / 2%;
</del><ins>+ font-stretch: 1 2%;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 1% / 2;
</del><ins>+ font-stretch: 1% 2;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: calc(3 + 4) / 8;
</del><ins>+ font-stretch: calc(3 + 4) 8;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-stretch: 2 / calc(3 + 4);
</del><ins>+ font-stretch: 2 calc(3 + 4);
</ins><span class="cx"> }
</span><ins>+@font-face {
+ font-stretch: calc(3% + 4%) 8%;
+}
+@font-face {
+ font-stretch: 2% calc(3% + 4%);
+}
</ins><span class="cx"> </style>
</span><span class="cx">
</span><span class="cx"> <style id="styleTest">
</span><span class="lines">@@ -341,6 +347,12 @@
</span><span class="cx"> @font-face {
</span><span class="cx"> font-style: oblique 2 calc(3 + 4);
</span><span class="cx"> }
</span><ins>+@font-face {
+ font-style: oblique calc(3deg + 4deg) 8deg;
+}
+@font-face {
+ font-style: oblique 2deg calc(3deg + 4deg);
+}
</ins><span class="cx"> </style>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="lines">@@ -364,8 +376,8 @@
</span><span class="cx"> shouldBeEqualToString("weightTestSheet.cssRules[15].style.fontWeight", "7");
</span><span class="cx"> shouldBeEqualToString("weightTestSheet.cssRules[16].style.fontWeight", "300");
</span><span class="cx"> shouldBeEqualToString("weightTestSheet.cssRules[17].style.fontWeight", "200");
</span><del>-shouldBeEqualToString("weightTestSheet.cssRules[18].style.fontWeight", "100 / 200");
-shouldBeEqualToString("weightTestSheet.cssRules[19].style.fontWeight", "100 / 200");
</del><ins>+shouldBeEqualToString("weightTestSheet.cssRules[18].style.fontWeight", "100 200");
+shouldBeEqualToString("weightTestSheet.cssRules[19].style.fontWeight", "100 200");
</ins><span class="cx"> shouldBeEqualToString("weightTestSheet.cssRules[20].style.fontWeight", "");
</span><span class="cx"> shouldBeEqualToString("weightTestSheet.cssRules[21].style.fontWeight", "");
</span><span class="cx"> shouldBeEqualToString("weightTestSheet.cssRules[22].style.fontWeight", "");
</span><span class="lines">@@ -372,15 +384,15 @@
</span><span class="cx"> shouldBeEqualToString("weightTestSheet.cssRules[23].style.fontWeight", "");
</span><span class="cx"> shouldBeEqualToString("weightTestSheet.cssRules[24].style.fontWeight", "");
</span><span class="cx"> shouldBeEqualToString("weightTestSheet.cssRules[25].style.fontWeight", "");
</span><del>-shouldBeEqualToString("weightTestSheet.cssRules[26].style.fontWeight", "1 / 2");
-shouldBeEqualToString("weightTestSheet.cssRules[27].style.fontWeight", "-2 / -1");
</del><ins>+shouldBeEqualToString("weightTestSheet.cssRules[26].style.fontWeight", "1 2");
+shouldBeEqualToString("weightTestSheet.cssRules[27].style.fontWeight", "-2 -1");
</ins><span class="cx"> shouldBeEqualToString("weightTestSheet.cssRules[28].style.fontWeight", "");
</span><del>-shouldBeEqualToString("weightTestSheet.cssRules[29].style.fontWeight", "7 / 8");
-shouldBeEqualToString("weightTestSheet.cssRules[30].style.fontWeight", "2 / 7");
</del><ins>+shouldBeEqualToString("weightTestSheet.cssRules[29].style.fontWeight", "7 8");
+shouldBeEqualToString("weightTestSheet.cssRules[30].style.fontWeight", "2 7");
</ins><span class="cx">
</span><span class="cx"> var stretchTestSheet = document.getElementById("stretchTest").sheet;
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[0].style.fontStretch", "1%");
</span><del>-shouldBeEqualToString("stretchTestSheet.cssRules[1].style.fontStretch", "2");
</del><ins>+shouldBeEqualToString("stretchTestSheet.cssRules[1].style.fontStretch", "");
</ins><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[2].style.fontStretch", "ultra-condensed");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[3].style.fontStretch", "extra-condensed");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[4].style.fontStretch", "condensed");
</span><span class="lines">@@ -392,9 +404,9 @@
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[10].style.fontStretch", "ultra-expanded");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[11].style.fontStretch", "");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[12].style.fontStretch", "");
</span><del>-shouldBeEqualToString("stretchTestSheet.cssRules[13].style.fontStretch", "7");
-shouldBeEqualToString("stretchTestSheet.cssRules[14].style.fontStretch", "100 / 200");
-shouldBeEqualToString("stretchTestSheet.cssRules[15].style.fontStretch", "100 / 200");
</del><ins>+shouldBeEqualToString("stretchTestSheet.cssRules[13].style.fontStretch", "");
+shouldBeEqualToString("stretchTestSheet.cssRules[14].style.fontStretch", "");
+shouldBeEqualToString("stretchTestSheet.cssRules[15].style.fontStretch", "");
</ins><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[16].style.fontStretch", "");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[17].style.fontStretch", "");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[18].style.fontStretch", "");
</span><span class="lines">@@ -401,11 +413,11 @@
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[19].style.fontStretch", "");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[20].style.fontStretch", "");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[21].style.fontStretch", "");
</span><del>-shouldBeEqualToString("stretchTestSheet.cssRules[22].style.fontStretch", "1 / 2");
-shouldBeEqualToString("stretchTestSheet.cssRules[23].style.fontStretch", "-2 / -1");
</del><ins>+shouldBeEqualToString("stretchTestSheet.cssRules[22].style.fontStretch", "");
+shouldBeEqualToString("stretchTestSheet.cssRules[23].style.fontStretch", "");
</ins><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[24].style.fontStretch", "");
</span><del>-shouldBeEqualToString("stretchTestSheet.cssRules[25].style.fontStretch", "100% / 200%");
-shouldBeEqualToString("stretchTestSheet.cssRules[26].style.fontStretch", "100% / 200%");
</del><ins>+shouldBeEqualToString("stretchTestSheet.cssRules[25].style.fontStretch", "100% 200%");
+shouldBeEqualToString("stretchTestSheet.cssRules[26].style.fontStretch", "100% 200%");
</ins><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[27].style.fontStretch", "");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[28].style.fontStretch", "");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[29].style.fontStretch", "");
</span><span class="lines">@@ -412,13 +424,15 @@
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[30].style.fontStretch", "");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[31].style.fontStretch", "");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[32].style.fontStretch", "");
</span><del>-shouldBeEqualToString("stretchTestSheet.cssRules[33].style.fontStretch", "1% / 2%");
-shouldBeEqualToString("stretchTestSheet.cssRules[34].style.fontStretch", "-2% / -1%");
</del><ins>+shouldBeEqualToString("stretchTestSheet.cssRules[33].style.fontStretch", "1% 2%");
+shouldBeEqualToString("stretchTestSheet.cssRules[34].style.fontStretch", "-2% -1%");
</ins><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[35].style.fontStretch", "");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[36].style.fontStretch", "");
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[37].style.fontStretch", "");
</span><del>-shouldBeEqualToString("stretchTestSheet.cssRules[38].style.fontStretch", "7 / 8");
-shouldBeEqualToString("stretchTestSheet.cssRules[39].style.fontStretch", "2 / 7");
</del><ins>+shouldBeEqualToString("stretchTestSheet.cssRules[38].style.fontStretch", "");
+shouldBeEqualToString("stretchTestSheet.cssRules[39].style.fontStretch", "");
+shouldBeEqualToString("stretchTestSheet.cssRules[40].style.fontStretch", "calc(7%) 8%");
+shouldBeEqualToString("stretchTestSheet.cssRules[41].style.fontStretch", "2% calc(7%)");
</ins><span class="cx">
</span><span class="cx"> var styleTestSheet = document.getElementById("styleTest").sheet;
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[0].style.fontStyle", "oblique 1deg");
</span><span class="lines">@@ -425,18 +439,18 @@
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[1].style.fontStyle", "oblique 200grad");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[2].style.fontStyle", "oblique 6.28318rad");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[3].style.fontStyle", "oblique 4turn");
</span><del>-shouldBeEqualToString("styleTestSheet.cssRules[4].style.fontStyle", "oblique 5");
-shouldBeEqualToString("styleTestSheet.cssRules[5].style.fontStyle", "oblique 20");
</del><ins>+shouldBeEqualToString("styleTestSheet.cssRules[4].style.fontStyle", "");
+shouldBeEqualToString("styleTestSheet.cssRules[5].style.fontStyle", "");
</ins><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[6].style.fontStyle", "italic");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[7].style.fontStyle", "oblique");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[8].style.fontStyle", "normal");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[9].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[10].style.fontStyle", "");
</span><del>-shouldBeEqualToString("styleTestSheet.cssRules[11].style.fontStyle", "oblique 7");
</del><ins>+shouldBeEqualToString("styleTestSheet.cssRules[11].style.fontStyle", "");
</ins><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[12].style.fontStyle", "oblique calc(1441deg)");
</span><span class="cx">
</span><del>-shouldBeEqualToString("styleTestSheet.cssRules[13].style.fontStyle", "oblique 100deg 200deg");
-shouldBeEqualToString("styleTestSheet.cssRules[14].style.fontStyle", "oblique 100deg 200deg");
</del><ins>+shouldBeEqualToString("styleTestSheet.cssRules[13].style.fontStyle", "");
+shouldBeEqualToString("styleTestSheet.cssRules[14].style.fontStyle", "");
</ins><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[15].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[16].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[17].style.fontStyle", "");
</span><span class="lines">@@ -443,8 +457,8 @@
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[18].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[19].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[20].style.fontStyle", "");
</span><del>-shouldBeEqualToString("styleTestSheet.cssRules[21].style.fontStyle", "oblique 1deg 2deg");
-shouldBeEqualToString("styleTestSheet.cssRules[22].style.fontStyle", "oblique -2deg -1deg");
</del><ins>+shouldBeEqualToString("styleTestSheet.cssRules[21].style.fontStyle", "");
+shouldBeEqualToString("styleTestSheet.cssRules[22].style.fontStyle", "");
</ins><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[23].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[24].style.fontStyle", "oblique 100deg 200deg");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[25].style.fontStyle", "oblique 100deg 200deg");
</span><span class="lines">@@ -460,8 +474,10 @@
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[35].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[36].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[37].style.fontStyle", "oblique 2deg 1turn");
</span><del>-shouldBeEqualToString("styleTestSheet.cssRules[38].style.fontStyle", "oblique 7deg 8deg");
-shouldBeEqualToString("styleTestSheet.cssRules[39].style.fontStyle", "oblique 2deg 7deg");
</del><ins>+shouldBeEqualToString("styleTestSheet.cssRules[38].style.fontStyle", "");
+shouldBeEqualToString("styleTestSheet.cssRules[39].style.fontStyle", "");
+shouldBeEqualToString("styleTestSheet.cssRules[40].style.fontStyle", "oblique calc(7deg) 8deg");
+shouldBeEqualToString("styleTestSheet.cssRules[41].style.fontStyle", "oblique 2deg calc(7deg)");
</ins><span class="cx"> </script>
</span><span class="cx"> <script src="../../resources/js-test-post.js"></script>
</span><span class="cx"> </body>
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontselectionfontloadingapiparseexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-selection-font-loading-api-parse-expected.txt (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-selection-font-loading-api-parse-expected.txt        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/LayoutTests/fast/text/font-selection-font-loading-api-parse-expected.txt        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx"> PASS setFontFaceWeight(fontFace, 'calc(100 + 200)') is "300"
</span><span class="cx"> PASS setFontFaceWeight(fontFace, 'calc(150 + 50)') is "200"
</span><span class="cx"> PASS setFontFaceStretch(fontFace, '1%') is "1%"
</span><del>-PASS setFontFaceStretch(fontFace, '2') is "2%"
</del><ins>+PASS setFontFaceStretch(fontFace, '2') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</ins><span class="cx"> PASS setFontFaceStretch(fontFace, 'ultra-condensed') is "ultra-condensed"
</span><span class="cx"> PASS setFontFaceStretch(fontFace, 'extra-condensed') is "extra-condensed"
</span><span class="cx"> PASS setFontFaceStretch(fontFace, 'condensed') is "condensed"
</span><span class="lines">@@ -28,19 +28,20 @@
</span><span class="cx"> PASS setFontFaceStretch(fontFace, 'ultra-expanded') is "ultra-expanded"
</span><span class="cx"> PASS setFontFaceStretch(fontFace, 'garbage') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><span class="cx"> PASS setFontFaceStretch(fontFace, 'initial') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</span><del>-PASS setFontFaceStretch(fontFace, 'calc(3 + 4)') is "7%"
</del><ins>+PASS setFontFaceStretch(fontFace, 'calc(3 + 4)') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS setFontFaceStretch(fontFace, 'calc(3% + 4%)') is "7%"
</ins><span class="cx"> PASS setFontFaceStyle(fontFace, 'oblique 1deg') is "oblique 1deg"
</span><span class="cx"> PASS setFontFaceStyle(fontFace, 'oblique 200grad') is "oblique 180deg"
</span><del>-PASS setFontFaceStyle(fontFace, 'oblique 6.28318rad') is "oblique 359.750000deg"
</del><ins>+PASS setFontFaceStyle(fontFace, 'oblique 6.28318rad') is "oblique 359.75deg"
</ins><span class="cx"> PASS setFontFaceStyle(fontFace, 'oblique 4turn') is "oblique 1440deg"
</span><del>-PASS setFontFaceStyle(fontFace, 'oblique 5') is "oblique 5deg"
-PASS setFontFaceStyle(fontFace, 'oblique 20') is "italic"
</del><ins>+PASS setFontFaceStyle(fontFace, 'oblique 5') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS setFontFaceStyle(fontFace, 'oblique 20') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</ins><span class="cx"> PASS setFontFaceStyle(fontFace, 'italic') is "italic"
</span><span class="cx"> PASS setFontFaceStyle(fontFace, 'oblique') is "italic"
</span><span class="cx"> PASS setFontFaceStyle(fontFace, 'normal') is "normal"
</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><del>-PASS setFontFaceStyle(fontFace, 'oblique calc(3 + 4)') is "oblique 7deg"
</del><ins>+PASS setFontFaceStyle(fontFace, 'oblique calc(3 + 4)') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
</ins><span class="cx"> PASS setFontFaceStyle(fontFace, 'oblique calc(4turn + 1deg)') is "oblique 1441deg"
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontselectionfontloadingapiparsehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-selection-font-loading-api-parse.html (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-selection-font-loading-api-parse.html        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/LayoutTests/fast/text/font-selection-font-loading-api-parse.html        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> shouldBeEqualToString("setFontFaceWeight(fontFace, 'calc(150 + 50)')", "200");
</span><span class="cx">
</span><span class="cx"> shouldBeEqualToString("setFontFaceStretch(fontFace, '1%')", "1%");
</span><del>-shouldBeEqualToString("setFontFaceStretch(fontFace, '2')", "2%");
</del><ins>+shouldThrow("setFontFaceStretch(fontFace, '2')");
</ins><span class="cx"> shouldBeEqualToString("setFontFaceStretch(fontFace, 'ultra-condensed')", "ultra-condensed");
</span><span class="cx"> shouldBeEqualToString("setFontFaceStretch(fontFace, 'extra-condensed')", "extra-condensed");
</span><span class="cx"> shouldBeEqualToString("setFontFaceStretch(fontFace, 'condensed')", "condensed");
</span><span class="lines">@@ -52,20 +52,21 @@
</span><span class="cx"> shouldBeEqualToString("setFontFaceStretch(fontFace, 'ultra-expanded')", "ultra-expanded");
</span><span class="cx"> shouldThrow("setFontFaceStretch(fontFace, 'garbage')");
</span><span class="cx"> shouldThrow("setFontFaceStretch(fontFace, 'initial')");
</span><del>-shouldBeEqualToString("setFontFaceStretch(fontFace, 'calc(3 + 4)')", "7%");
</del><ins>+shouldThrow("setFontFaceStretch(fontFace, 'calc(3 + 4)')");
+shouldBeEqualToString("setFontFaceStretch(fontFace, 'calc(3% + 4%)')", "7%");
</ins><span class="cx">
</span><span class="cx"> shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique 1deg')", "oblique 1deg");
</span><span class="cx"> shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique 200grad')", "oblique 180deg");
</span><del>-shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique 6.28318rad')", "oblique 359.750000deg");
</del><ins>+shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique 6.28318rad')", "oblique 359.75deg");
</ins><span class="cx"> shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique 4turn')", "oblique 1440deg");
</span><del>-shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique 5')", "oblique 5deg");
-shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique 20')", "italic");
</del><ins>+shouldThrow("setFontFaceStyle(fontFace, 'oblique 5')");
+shouldThrow("setFontFaceStyle(fontFace, 'oblique 20')");
</ins><span class="cx"> shouldBeEqualToString("setFontFaceStyle(fontFace, 'italic')", "italic");
</span><span class="cx"> shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique')", "italic");
</span><span class="cx"> shouldBeEqualToString("setFontFaceStyle(fontFace, 'normal')", "normal");
</span><span class="cx"> shouldThrow("setFontFaceStyle(fontFace, 'garbage')");
</span><span class="cx"> shouldThrow("setFontFaceStyle(fontFace, 'initial')");
</span><del>-shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique calc(3 + 4)')", "oblique 7deg");
</del><ins>+shouldThrow("setFontFaceStyle(fontFace, 'oblique calc(3 + 4)')");
</ins><span class="cx"> shouldBeEqualToString("setFontFaceStyle(fontFace, 'oblique calc(4turn + 1deg)')", "oblique 1441deg");
</span><span class="cx"> </script>
</span><span class="cx"> <script src="../../resources/js-test-post.js"></script>
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontstretchparseexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-stretch-parse-expected.txt (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-stretch-parse-expected.txt        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/LayoutTests/fast/text/font-stretch-parse-expected.txt        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test1')).fontStretch is "normal"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test2')).fontStretch is "1%"
</span><del>-PASS window.getComputedStyle(document.getElementById('test3')).fontStretch is "2%"
</del><ins>+PASS window.getComputedStyle(document.getElementById('test3')).fontStretch is "normal"
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('test4')).fontStretch is "ultra-condensed"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test5')).fontStretch is "extra-condensed"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test6')).fontStretch is "condensed"
</span><span class="lines">@@ -12,15 +12,16 @@
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test12')).fontStretch is "ultra-expanded"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test13')).fontStretch is "normal"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test14')).fontStretch is "normal"
</span><del>-PASS window.getComputedStyle(document.getElementById('test15')).fontStretch is "7%"
</del><ins>+PASS window.getComputedStyle(document.getElementById('test15')).fontStretch is "normal"
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('test16')).fontStretch is "extra-condensed"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test17')).fontStretch is "extra-condensed"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test18')).fontStretch is "normal"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test19')).fontStretch is "normal"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test20')).fontStretch is "extra-expanded"
</span><ins>+PASS window.getComputedStyle(document.getElementById('test21')).fontStretch is "7%"
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('test1')).font is "normal normal normal normal 16px/18px Times"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test2')).font is "16px/18px Times"
</span><del>-PASS window.getComputedStyle(document.getElementById('test3')).font is "16px/18px Times"
</del><ins>+PASS window.getComputedStyle(document.getElementById('test3')).font is "normal normal normal normal 16px/18px Times"
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('test4')).font is "normal normal normal ultra-condensed 16px/18px Times"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test5')).font is "normal normal normal extra-condensed 16px/18px Times"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test6')).font is "normal normal normal condensed 16px/18px Times"
</span><span class="lines">@@ -32,12 +33,13 @@
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test12')).font is "normal normal normal ultra-expanded 16px/18px Times"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test13')).font is "normal normal normal normal 16px/18px Times"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test14')).font is "normal normal normal normal 16px/18px Times"
</span><del>-PASS window.getComputedStyle(document.getElementById('test15')).font is "16px/18px Times"
</del><ins>+PASS window.getComputedStyle(document.getElementById('test15')).font is "normal normal normal normal 16px/18px Times"
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('test16')).font is "normal normal 100 extra-condensed 48px/49px 'Helvetica Neue'"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test17')).font is "normal normal 100 extra-condensed 48px/49px 'Helvetica Neue'"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test18')).font is "normal normal 100 normal 48px/49px 'Helvetica Neue'"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test19')).font is "normal normal 100 normal 48px/49px 'Helvetica Neue'"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test20')).font is "italic small-caps 100 extra-expanded 48px/49px 'Helvetica Neue'"
</span><ins>+PASS window.getComputedStyle(document.getElementById('test21')).font is "16px/18px Times"
</ins><span class="cx"> PASS document.getElementById('test1').style.font is ""
</span><span class="cx"> PASS document.getElementById('test16').style.font is "100 extra-condensed 48px/49px 'Helvetica Neue'"
</span><span class="cx"> PASS document.getElementById('test17').style.font is "100 extra-condensed 48px/49px 'Helvetica Neue'"
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontstretchparsehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-stretch-parse.html (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-stretch-parse.html        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/LayoutTests/fast/text/font-stretch-parse.html        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -25,11 +25,12 @@
</span><span class="cx"> <div id="test18" style="font: 100 48px/49px 'Helvetica Neue';"></div>
</span><span class="cx"> <div style="font-stretch: extra-expanded;"><div id="test19" style="font: 100 48px/49px 'Helvetica Neue';"></div></div>
</span><span class="cx"> <div id="test20" style="font: italic small-caps 100 extra-expanded 48px/49px 'Helvetica Neue';"></div>
</span><ins>+<div id="test21" style="font-stretch: calc(3% + 4%);"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> <script>
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).fontStretch", "normal");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).fontStretch", "1%");
</span><del>-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).fontStretch", "2%");
</del><ins>+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).fontStretch", "normal");
</ins><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).fontStretch", "ultra-condensed");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).fontStretch", "extra-condensed");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).fontStretch", "condensed");
</span><span class="lines">@@ -41,16 +42,17 @@
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test12')).fontStretch", "ultra-expanded");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test13')).fontStretch", "normal");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test14')).fontStretch", "normal");
</span><del>-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test15')).fontStretch", "7%");
</del><ins>+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test15')).fontStretch", "normal");
</ins><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test16')).fontStretch", "extra-condensed");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test17')).fontStretch", "extra-condensed");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test18')).fontStretch", "normal");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test19')).fontStretch", "normal");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test20')).fontStretch", "extra-expanded");
</span><ins>+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test21')).fontStretch", "7%");
</ins><span class="cx">
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).font", "normal normal normal normal 16px/18px Times");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).font", "16px/18px Times");
</span><del>-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).font", "16px/18px Times");
</del><ins>+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).font", "normal normal normal normal 16px/18px Times");
</ins><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).font", "normal normal normal ultra-condensed 16px/18px Times");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).font", "normal normal normal extra-condensed 16px/18px Times");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).font", "normal normal normal condensed 16px/18px Times");
</span><span class="lines">@@ -62,12 +64,13 @@
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test12')).font", "normal normal normal ultra-expanded 16px/18px Times");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test13')).font", "normal normal normal normal 16px/18px Times");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test14')).font", "normal normal normal normal 16px/18px Times");
</span><del>-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test15')).font", "16px/18px Times");
</del><ins>+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test15')).font", "normal normal normal normal 16px/18px Times");
</ins><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test16')).font", "normal normal 100 extra-condensed 48px/49px 'Helvetica Neue'");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test17')).font", "normal normal 100 extra-condensed 48px/49px 'Helvetica Neue'");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test18')).font", "normal normal 100 normal 48px/49px 'Helvetica Neue'");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test19')).font", "normal normal 100 normal 48px/49px 'Helvetica Neue'");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test20')).font", "italic small-caps 100 extra-expanded 48px/49px 'Helvetica Neue'");
</span><ins>+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test21')).font", "16px/18px Times");
</ins><span class="cx">
</span><span class="cx"> shouldBeEqualToString("document.getElementById('test1').style.font", "");
</span><span class="cx"> shouldBeEqualToString("document.getElementById('test16').style.font", "100 extra-condensed 48px/49px 'Helvetica Neue'");
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontstyleparseexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-style-parse-expected.txt (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-style-parse-expected.txt        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/LayoutTests/fast/text/font-style-parse-expected.txt        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -3,14 +3,14 @@
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test3')).fontStyle is "oblique 180deg"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test4')).fontStyle is "oblique 359.75deg"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test5')).fontStyle is "oblique 1440deg"
</span><del>-PASS window.getComputedStyle(document.getElementById('test6')).fontStyle is "oblique 5deg"
-PASS window.getComputedStyle(document.getElementById('test7')).fontStyle is "italic"
</del><ins>+PASS window.getComputedStyle(document.getElementById('test6')).fontStyle is "normal"
+PASS window.getComputedStyle(document.getElementById('test7')).fontStyle is "normal"
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('test8')).fontStyle is "italic"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test9')).fontStyle is "italic"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test10')).fontStyle is "normal"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test11')).fontStyle is "normal"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test12')).fontStyle is "normal"
</span><del>-PASS window.getComputedStyle(document.getElementById('test13')).fontStyle is "oblique 7deg"
</del><ins>+PASS window.getComputedStyle(document.getElementById('test13')).fontStyle is "normal"
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('test14')).fontStyle is "oblique 1441deg"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test15')).fontStyle is "italic"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test16')).fontStyle is "italic"
</span><span class="lines">@@ -24,14 +24,14 @@
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test3')).font is "16px/18px Times"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test4')).font is "16px/18px Times"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test5')).font is "16px/18px Times"
</span><del>-PASS window.getComputedStyle(document.getElementById('test6')).font is "16px/18px Times"
-PASS window.getComputedStyle(document.getElementById('test7')).font is "italic normal normal normal 16px/18px Times"
</del><ins>+PASS window.getComputedStyle(document.getElementById('test6')).font is "normal normal normal normal 16px/18px Times"
+PASS window.getComputedStyle(document.getElementById('test7')).font is "normal normal normal normal 16px/18px Times"
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('test8')).font is "italic normal normal normal 16px/18px Times"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test9')).font is "italic normal normal normal 16px/18px Times"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test10')).font is "normal normal normal normal 16px/18px Times"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test11')).font is "normal normal normal normal 16px/18px Times"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test12')).font is "normal normal normal normal 16px/18px Times"
</span><del>-PASS window.getComputedStyle(document.getElementById('test13')).font is "16px/18px Times"
</del><ins>+PASS window.getComputedStyle(document.getElementById('test13')).font is "normal normal normal normal 16px/18px Times"
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('test14')).font is "16px/18px Times"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test15')).font is "italic normal 100 normal 48px/49px 'Helvetica Neue'"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test16')).font is "italic normal 100 normal 48px/49px 'Helvetica Neue'"
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontstyleparsehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-style-parse.html (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-style-parse.html        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/LayoutTests/fast/text/font-style-parse.html        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -33,14 +33,14 @@
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).fontStyle", "oblique 180deg");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).fontStyle", "oblique 359.75deg");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).fontStyle", "oblique 1440deg");
</span><del>-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).fontStyle", "oblique 5deg");
-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test7')).fontStyle", "italic");
</del><ins>+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).fontStyle", "normal");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test7')).fontStyle", "normal");
</ins><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test8')).fontStyle", "italic");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test9')).fontStyle", "italic");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test10')).fontStyle", "normal");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test11')).fontStyle", "normal");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test12')).fontStyle", "normal");
</span><del>-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test13')).fontStyle", "oblique 7deg");
</del><ins>+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test13')).fontStyle", "normal");
</ins><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test14')).fontStyle", "oblique 1441deg");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test15')).fontStyle", "italic");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test16')).fontStyle", "italic");
</span><span class="lines">@@ -55,14 +55,14 @@
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).font", "16px/18px Times");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).font", "16px/18px Times");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).font", "16px/18px Times");
</span><del>-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).font", "16px/18px Times");
-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test7')).font", "italic normal normal normal 16px/18px Times");
</del><ins>+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).font", "normal normal normal normal 16px/18px Times");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test7')).font", "normal normal normal normal 16px/18px Times");
</ins><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test8')).font", "italic normal normal normal 16px/18px Times");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test9')).font", "italic normal normal normal 16px/18px Times");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test10')).font", "normal normal normal normal 16px/18px Times");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test11')).font", "normal normal normal normal 16px/18px Times");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test12')).font", "normal normal normal normal 16px/18px Times");
</span><del>-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test13')).font", "16px/18px Times");
</del><ins>+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test13')).font", "normal normal normal normal 16px/18px Times");
</ins><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test14')).font", "16px/18px Times");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test15')).font", "italic normal 100 normal 48px/49px 'Helvetica Neue'");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test16')).font", "italic normal 100 normal 48px/49px 'Helvetica Neue'");
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextvariationsfontselectionpropertieshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/variations/font-selection-properties.html (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/variations/font-selection-properties.html        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/LayoutTests/fast/text/variations/font-selection-properties.html        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="cx"> This test makes sure that the font selection properties affect font variations.
</span><del>-<div style="font-family: Boxis; font-stretch: 900;">Hello</div>
-<div style="font-family: Boxis; font-stretch: 900; font-variation-settings: 'wdth' 100;">Hello</div>
</del><ins>+<div style="font-family: Boxis; font-stretch: 900%;">Hello</div>
+<div style="font-family: Boxis; font-stretch: 900%; font-variation-settings: 'wdth' 100;">Hello</div>
</ins><span class="cx"> </body>
</span><span class="cx"> </html>
</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 (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -16,8 +16,8 @@
</span><span class="cx"> PASS weightTestSheet.cssRules[15].style.fontWeight is "7"
</span><span class="cx"> PASS weightTestSheet.cssRules[16].style.fontWeight is "300"
</span><span class="cx"> PASS weightTestSheet.cssRules[17].style.fontWeight is "200"
</span><del>-FAIL weightTestSheet.cssRules[18].style.fontWeight should be 100 / 200. Was .
-FAIL weightTestSheet.cssRules[19].style.fontWeight should be 100 / 200. Was .
</del><ins>+FAIL weightTestSheet.cssRules[18].style.fontWeight should be 100 200. Was .
+FAIL weightTestSheet.cssRules[19].style.fontWeight should be 100 200. Was .
</ins><span class="cx"> PASS weightTestSheet.cssRules[20].style.fontWeight is ""
</span><span class="cx"> PASS weightTestSheet.cssRules[21].style.fontWeight is ""
</span><span class="cx"> PASS weightTestSheet.cssRules[22].style.fontWeight is ""
</span><span class="lines">@@ -24,13 +24,13 @@
</span><span class="cx"> PASS weightTestSheet.cssRules[23].style.fontWeight is ""
</span><span class="cx"> PASS weightTestSheet.cssRules[24].style.fontWeight is ""
</span><span class="cx"> PASS weightTestSheet.cssRules[25].style.fontWeight is ""
</span><del>-FAIL weightTestSheet.cssRules[26].style.fontWeight should be 1 / 2. Was .
-FAIL weightTestSheet.cssRules[27].style.fontWeight should be -2 / -1. Was .
</del><ins>+FAIL weightTestSheet.cssRules[26].style.fontWeight should be 1 2. Was .
+FAIL weightTestSheet.cssRules[27].style.fontWeight should be -2 -1. Was .
</ins><span class="cx"> PASS weightTestSheet.cssRules[28].style.fontWeight is ""
</span><del>-FAIL weightTestSheet.cssRules[29].style.fontWeight should be 7 / 8. Was .
-FAIL weightTestSheet.cssRules[30].style.fontWeight should be 2 / 7. Was .
</del><ins>+FAIL weightTestSheet.cssRules[29].style.fontWeight should be 7 8. Was .
+FAIL weightTestSheet.cssRules[30].style.fontWeight should be 2 7. Was .
</ins><span class="cx"> PASS stretchTestSheet.cssRules[0].style.fontStretch is "1%"
</span><del>-PASS stretchTestSheet.cssRules[1].style.fontStretch is "2"
</del><ins>+PASS stretchTestSheet.cssRules[1].style.fontStretch is ""
</ins><span class="cx"> PASS stretchTestSheet.cssRules[2].style.fontStretch is "ultra-condensed"
</span><span class="cx"> PASS stretchTestSheet.cssRules[3].style.fontStretch is "extra-condensed"
</span><span class="cx"> PASS stretchTestSheet.cssRules[4].style.fontStretch is "condensed"
</span><span class="lines">@@ -42,9 +42,9 @@
</span><span class="cx"> PASS stretchTestSheet.cssRules[10].style.fontStretch is "ultra-expanded"
</span><span class="cx"> PASS stretchTestSheet.cssRules[11].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[12].style.fontStretch is ""
</span><del>-PASS stretchTestSheet.cssRules[13].style.fontStretch is "7"
-FAIL stretchTestSheet.cssRules[14].style.fontStretch should be 100 / 200. Was .
-FAIL stretchTestSheet.cssRules[15].style.fontStretch should be 100 / 200. Was .
</del><ins>+PASS stretchTestSheet.cssRules[13].style.fontStretch is ""
+PASS stretchTestSheet.cssRules[14].style.fontStretch is ""
+PASS stretchTestSheet.cssRules[15].style.fontStretch is ""
</ins><span class="cx"> PASS stretchTestSheet.cssRules[16].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[17].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[18].style.fontStretch is ""
</span><span class="lines">@@ -51,11 +51,11 @@
</span><span class="cx"> PASS stretchTestSheet.cssRules[19].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[20].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[21].style.fontStretch is ""
</span><del>-FAIL stretchTestSheet.cssRules[22].style.fontStretch should be 1 / 2. Was .
-FAIL stretchTestSheet.cssRules[23].style.fontStretch should be -2 / -1. Was .
</del><ins>+PASS stretchTestSheet.cssRules[22].style.fontStretch is ""
+PASS stretchTestSheet.cssRules[23].style.fontStretch is ""
</ins><span class="cx"> PASS stretchTestSheet.cssRules[24].style.fontStretch is ""
</span><del>-FAIL stretchTestSheet.cssRules[25].style.fontStretch should be 100% / 200%. Was .
-FAIL stretchTestSheet.cssRules[26].style.fontStretch should be 100% / 200%. Was .
</del><ins>+FAIL stretchTestSheet.cssRules[25].style.fontStretch should be 100% 200%. Was .
+FAIL stretchTestSheet.cssRules[26].style.fontStretch should be 100% 200%. Was .
</ins><span class="cx"> PASS stretchTestSheet.cssRules[27].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[28].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[29].style.fontStretch is ""
</span><span class="lines">@@ -62,28 +62,30 @@
</span><span class="cx"> PASS stretchTestSheet.cssRules[30].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[31].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[32].style.fontStretch is ""
</span><del>-FAIL stretchTestSheet.cssRules[33].style.fontStretch should be 1% / 2%. Was .
-FAIL stretchTestSheet.cssRules[34].style.fontStretch should be -2% / -1%. Was .
</del><ins>+FAIL stretchTestSheet.cssRules[33].style.fontStretch should be 1% 2%. Was .
+FAIL stretchTestSheet.cssRules[34].style.fontStretch should be -2% -1%. Was .
</ins><span class="cx"> PASS stretchTestSheet.cssRules[35].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[36].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[37].style.fontStretch is ""
</span><del>-FAIL stretchTestSheet.cssRules[38].style.fontStretch should be 7 / 8. Was .
-FAIL stretchTestSheet.cssRules[39].style.fontStretch should be 2 / 7. Was .
</del><ins>+PASS stretchTestSheet.cssRules[38].style.fontStretch is ""
+PASS stretchTestSheet.cssRules[39].style.fontStretch is ""
+FAIL stretchTestSheet.cssRules[40].style.fontStretch should be calc(7%) 8%. Was .
+FAIL stretchTestSheet.cssRules[41].style.fontStretch should be 2% calc(7%). Was .
</ins><span class="cx"> PASS styleTestSheet.cssRules[0].style.fontStyle is "oblique 1deg"
</span><span class="cx"> PASS styleTestSheet.cssRules[1].style.fontStyle is "oblique 200grad"
</span><span class="cx"> PASS styleTestSheet.cssRules[2].style.fontStyle is "oblique 6.28318rad"
</span><span class="cx"> PASS styleTestSheet.cssRules[3].style.fontStyle is "oblique 4turn"
</span><del>-FAIL styleTestSheet.cssRules[4].style.fontStyle should be oblique 5. Was oblique 5deg.
-FAIL styleTestSheet.cssRules[5].style.fontStyle should be oblique 20. Was oblique 20deg.
</del><ins>+PASS styleTestSheet.cssRules[4].style.fontStyle is ""
+PASS styleTestSheet.cssRules[5].style.fontStyle is ""
</ins><span class="cx"> PASS styleTestSheet.cssRules[6].style.fontStyle is "italic"
</span><span class="cx"> PASS styleTestSheet.cssRules[7].style.fontStyle is "oblique"
</span><span class="cx"> PASS styleTestSheet.cssRules[8].style.fontStyle is "normal"
</span><span class="cx"> PASS styleTestSheet.cssRules[9].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[10].style.fontStyle is ""
</span><del>-FAIL styleTestSheet.cssRules[11].style.fontStyle should be oblique 7. Was oblique 7deg.
</del><ins>+PASS styleTestSheet.cssRules[11].style.fontStyle is ""
</ins><span class="cx"> PASS styleTestSheet.cssRules[12].style.fontStyle is "oblique calc(1441deg)"
</span><del>-FAIL styleTestSheet.cssRules[13].style.fontStyle should be oblique 100deg 200deg. Was .
-FAIL styleTestSheet.cssRules[14].style.fontStyle should be oblique 100deg 200deg. Was .
</del><ins>+PASS styleTestSheet.cssRules[13].style.fontStyle is ""
+PASS styleTestSheet.cssRules[14].style.fontStyle is ""
</ins><span class="cx"> PASS styleTestSheet.cssRules[15].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[16].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[17].style.fontStyle is ""
</span><span class="lines">@@ -90,8 +92,8 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[18].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[19].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[20].style.fontStyle is ""
</span><del>-FAIL styleTestSheet.cssRules[21].style.fontStyle should be oblique 1deg 2deg. Was .
-FAIL styleTestSheet.cssRules[22].style.fontStyle should be oblique -2deg -1deg. Was .
</del><ins>+PASS styleTestSheet.cssRules[21].style.fontStyle is ""
+PASS styleTestSheet.cssRules[22].style.fontStyle is ""
</ins><span class="cx"> PASS styleTestSheet.cssRules[23].style.fontStyle is ""
</span><span class="cx"> FAIL styleTestSheet.cssRules[24].style.fontStyle should be oblique 100deg 200deg. Was .
</span><span class="cx"> FAIL styleTestSheet.cssRules[25].style.fontStyle should be oblique 100deg 200deg. Was .
</span><span class="lines">@@ -107,8 +109,10 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[35].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[36].style.fontStyle is ""
</span><span class="cx"> FAIL styleTestSheet.cssRules[37].style.fontStyle should be oblique 2deg 1turn. Was .
</span><del>-FAIL styleTestSheet.cssRules[38].style.fontStyle should be oblique 7deg 8deg. Was .
-FAIL styleTestSheet.cssRules[39].style.fontStyle should be oblique 2deg 7deg. Was .
</del><ins>+PASS styleTestSheet.cssRules[38].style.fontStyle is ""
+PASS styleTestSheet.cssRules[39].style.fontStyle is ""
+FAIL styleTestSheet.cssRules[40].style.fontStyle should be oblique calc(7deg) 8deg. Was .
+FAIL styleTestSheet.cssRules[41].style.fontStyle should be oblique 2deg calc(7deg). Was .
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/Source/WebCore/ChangeLog        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2017-03-27 Myles C. Maxfield <mmaxfield@apple.com>
+
+ font variation properties don't need to accept numbers
+ https://bugs.webkit.org/show_bug.cgi?id=169357
+
+ Reviewed by Antti Koivisto.
+
+ The CSS Fonts level 4 spec stabilized the grammar accepted by font-weight,
+ font-style, and font-stretch. The changes are that font-style and
+ font-stretch no longer accept raw numbers, and the @font-face descriptor
+ ranges are now separated by spaces instead of slashes.
+
+ Tests: fast/text/font-selection-font-face-parse.html
+ fast/text/font-selection-font-loading-api-parse.html
+ fast/text/font-stretch-parse.html
+ fast/text/font-style-parse.html
+ fast/text/variations/font-selection-properties.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::ComputedStyleExtractor::fontWeightFromStyleValue):
+ (WebCore::fontWeightFromStyle):
+ (WebCore::ComputedStyleExtractor::fontStretchFromStyleValue):
+ (WebCore::fontStretchFromStyle):
+ (WebCore::ComputedStyleExtractor::fontStyleFromStyleValue):
+ (WebCore::fontStyleFromStyle):
+ * css/CSSComputedStyleDeclaration.h:
+ * css/FontFace.cpp:
+ (WebCore::FontFace::style):
+ (WebCore::FontFace::weight):
+ (WebCore::FontFace::stretch):
+ (WebCore::rangeIsSingleValue): Deleted.
+ * css/StyleBuilderConverter.h:
+ (WebCore::StyleBuilderConverter::convertFontStretchFromValue):
+ * css/parser/CSSPropertyParser.cpp:
+ (WebCore::consumeFontWeightRange):
+ (WebCore::consumeFontStretch):
+ (WebCore::consumeFontStretchRange):
+ (WebCore::consumeFontStyle):
+ (WebCore::consumeFontStyleRange):
+
</ins><span class="cx"> 2017-03-27 Youenn Fablet <youenn@apple.com>
</span><span class="cx">
</span><span class="cx"> Further optimize checkWebRTCAvailability
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -1917,32 +1917,42 @@
</span><span class="cx"> return zoomAdjustedPixelValue(style.fontDescription().computedSize(), style);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static Ref<CSSPrimitiveValue> fontWeightFromStyle(const RenderStyle& style)
</del><ins>+Ref<CSSPrimitiveValue> ComputedStyleExtractor::fontWeightFromStyleValue(FontSelectionValue weight)
</ins><span class="cx"> {
</span><del>- auto weight = style.fontDescription().weight();
</del><span class="cx"> if (auto value = fontWeightKeyword(weight))
</span><span class="cx"> return CSSValuePool::singleton().createIdentifierValue(value.value());
</span><span class="cx"> return CSSValuePool::singleton().createValue(static_cast<float>(weight), CSSPrimitiveValue::CSS_NUMBER);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static Ref<CSSPrimitiveValue> fontStretchFromStyle(const RenderStyle& style)
</del><ins>+static Ref<CSSPrimitiveValue> fontWeightFromStyle(const RenderStyle& style)
</ins><span class="cx"> {
</span><del>- auto stretch = style.fontDescription().stretch();
</del><ins>+ return ComputedStyleExtractor::fontWeightFromStyleValue(style.fontDescription().weight());
+}
+
+Ref<CSSPrimitiveValue> ComputedStyleExtractor::fontStretchFromStyleValue(FontSelectionValue stretch)
+{
</ins><span class="cx"> if (auto keyword = fontStretchKeyword(stretch))
</span><span class="cx"> return CSSValuePool::singleton().createIdentifierValue(keyword.value());
</span><span class="cx"> return CSSValuePool::singleton().createValue(static_cast<float>(stretch), CSSPrimitiveValue::CSS_PERCENTAGE);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static Ref<CSSFontStyleValue> fontStyleFromStyle(const RenderStyle& style)
</del><ins>+static Ref<CSSPrimitiveValue> fontStretchFromStyle(const RenderStyle& style)
</ins><span class="cx"> {
</span><del>- FontSelectionValue italic = style.fontDescription().italic();
- if (italic == normalItalicValue())
- return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueNormal));
- if (italic == italicValue())
- return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueItalic));
</del><ins>+ return ComputedStyleExtractor::fontStretchFromStyleValue(style.fontDescription().stretch());
+}
+
+Ref<CSSFontStyleValue> ComputedStyleExtractor::fontStyleFromStyleValue(FontSelectionValue italic)
+{
+ if (auto keyword = fontStyleKeyword(italic))
+ return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(keyword.value()));
</ins><span class="cx"> return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique), CSSValuePool::singleton().createValue(static_cast<float>(italic), CSSPrimitiveValue::CSS_DEG));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static Ref<CSSFontStyleValue> fontStyleFromStyle(const RenderStyle& style)
+{
+ return ComputedStyleExtractor::fontStyleFromStyleValue(style.fontDescription().italic());
+}
+
</ins><span class="cx"> static Ref<CSSValue> fontVariantFromStyle(const RenderStyle& style)
</span><span class="cx"> {
</span><span class="cx"> if (style.fontDescription().variantSettings().isAllNormal())
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -28,11 +28,13 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+class CSSFontStyleValue;
</ins><span class="cx"> class CSSPrimitiveValue;
</span><span class="cx"> class CSSValueList;
</span><span class="cx"> class Color;
</span><span class="cx"> class Element;
</span><span class="cx"> class FilterOperations;
</span><ins>+class FontSelectionValue;
</ins><span class="cx"> class MutableStyleProperties;
</span><span class="cx"> class Node;
</span><span class="cx"> class RenderObject;
</span><span class="lines">@@ -64,6 +66,10 @@
</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> fontWeightFromStyleValue(FontSelectionValue);
+ static Ref<CSSPrimitiveValue> fontStretchFromStyleValue(FontSelectionValue);
+ static Ref<CSSFontStyleValue> fontStyleFromStyleValue(FontSelectionValue);
+
</ins><span class="cx"> private:
</span><span class="cx"> // The styled element is either the element passed into computedPropertyValue, or the
</span><span class="cx"> // PseudoElement for :before and :after if they exist.
</span></span></pre></div>
<a id="trunkSourceWebCorecssFontFacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontFace.cpp (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontFace.cpp        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/Source/WebCore/css/FontFace.cpp        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -26,8 +26,10 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "FontFace.h"
</span><span class="cx">
</span><ins>+#include "CSSComputedStyleDeclaration.h"
</ins><span class="cx"> #include "CSSFontFaceSource.h"
</span><span class="cx"> #include "CSSFontFeatureValue.h"
</span><ins>+#include "CSSFontStyleValue.h"
</ins><span class="cx"> #include "CSSParser.h"
</span><span class="cx"> #include "CSSUnicodeRangeValue.h"
</span><span class="cx"> #include "CSSValueList.h"
</span><span class="lines">@@ -39,6 +41,7 @@
</span><span class="cx"> #include <runtime/ArrayBuffer.h>
</span><span class="cx"> #include <runtime/ArrayBufferView.h>
</span><span class="cx"> #include <runtime/JSCInlines.h>
</span><ins>+#include <wtf/text/StringBuilder.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -280,32 +283,30 @@
</span><span class="cx"> return m_backing->families()->cssText();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline bool rangeIsSingleValue(FontSelectionRange range, FontSelectionValue value)
-{
- return range.minimum == value && range.maximum == value;
-};
-
</del><span class="cx"> String FontFace::style() const
</span><span class="cx"> {
</span><span class="cx"> m_backing->updateStyleIfNeeded();
</span><span class="cx"> auto style = m_backing->italic();
</span><span class="cx">
</span><del>- if (rangeIsSingleValue(style, italicValue()))
- return ASCIILiteral("italic");
- if (rangeIsSingleValue(style, normalItalicValue()))
- return ASCIILiteral("normal");
</del><ins>+ auto minimum = ComputedStyleExtractor::fontStyleFromStyleValue(style.minimum);
+ auto maximum = ComputedStyleExtractor::fontStyleFromStyleValue(style.maximum);
</ins><span class="cx">
</span><del>- if (style.minimum == style.maximum) {
- auto value = static_cast<float>(style.minimum);
- if (value >= 0) {
- auto floored = std::floor(value);
- if (floored == value)
- return String::format("oblique %ddeg", static_cast<int>(floored));
- }
- return String::format("oblique %fdeg", static_cast<float>(style.minimum));
</del><ins>+ if (minimum.get().equals(maximum.get()))
+ return minimum->cssText();
+
+ ASSERT(minimum->fontStyleValue->valueID() == CSSValueOblique);
+ ASSERT(maximum->fontStyleValue->valueID() == CSSValueOblique);
+
+ StringBuilder builder;
+ builder.append(minimum->fontStyleValue->cssText());
+ builder.append(' ');
+ if (minimum->obliqueValue.get() == maximum->obliqueValue.get())
+ builder.append(minimum->obliqueValue->cssText());
+ else {
+ builder.append(minimum->obliqueValue->cssText());
+ builder.append(maximum->obliqueValue->cssText());
</ins><span class="cx"> }
</span><del>-
- return String::format("oblique %fdeg %fdeg", static_cast<float>(style.minimum), static_cast<float>(style.maximum));
</del><ins>+ return builder.toString();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String FontFace::weight() const
</span><span class="lines">@@ -313,22 +314,17 @@
</span><span class="cx"> m_backing->updateStyleIfNeeded();
</span><span class="cx"> auto weight = m_backing->weight();
</span><span class="cx">
</span><del>- if (rangeIsSingleValue(weight, normalWeightValue()))
- return ASCIILiteral("normal");
- if (rangeIsSingleValue(weight, boldWeightValue()))
- return ASCIILiteral("bold");
</del><ins>+ auto minimum = ComputedStyleExtractor::fontWeightFromStyleValue(weight.minimum);
+ auto maximum = ComputedStyleExtractor::fontWeightFromStyleValue(weight.maximum);
</ins><span class="cx">
</span><del>- if (weight.minimum == weight.maximum) {
- auto value = static_cast<float>(weight.minimum);
- if (value >= 0) {
- auto floored = std::floor(value);
- if (floored == value)
- return String::format("%d", static_cast<int>(floored));
- }
- return String::format("%f", static_cast<float>(weight.minimum));
- }
</del><ins>+ if (minimum.get().equals(maximum.get()))
+ return minimum->cssText();
</ins><span class="cx">
</span><del>- return String::format("%f %f", static_cast<float>(weight.minimum), static_cast<float>(weight.maximum));
</del><ins>+ StringBuilder builder;
+ builder.append(minimum->cssText());
+ builder.append(' ');
+ builder.append(maximum->cssText());
+ return builder.toString();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String FontFace::stretch() const
</span><span class="lines">@@ -336,36 +332,17 @@
</span><span class="cx"> m_backing->updateStyleIfNeeded();
</span><span class="cx"> auto stretch = m_backing->stretch();
</span><span class="cx">
</span><del>- if (rangeIsSingleValue(stretch, ultraCondensedStretchValue()))
- return ASCIILiteral("ultra-condensed");
- if (rangeIsSingleValue(stretch, extraCondensedStretchValue()))
- return ASCIILiteral("extra-condensed");
- if (rangeIsSingleValue(stretch, condensedStretchValue()))
- return ASCIILiteral("condensed");
- if (rangeIsSingleValue(stretch, semiCondensedStretchValue()))
- return ASCIILiteral("semi-condensed");
- if (rangeIsSingleValue(stretch, normalStretchValue()))
- return ASCIILiteral("normal");
- if (rangeIsSingleValue(stretch, semiExpandedStretchValue()))
- return ASCIILiteral("semi-expanded");
- if (rangeIsSingleValue(stretch, expandedStretchValue()))
- return ASCIILiteral("expanded");
- if (rangeIsSingleValue(stretch, extraExpandedStretchValue()))
- return ASCIILiteral("extra-expanded");
- if (rangeIsSingleValue(stretch, ultraExpandedStretchValue()))
- return ASCIILiteral("ultra-expanded");
</del><ins>+ auto minimum = ComputedStyleExtractor::fontStretchFromStyleValue(stretch.minimum);
+ auto maximum = ComputedStyleExtractor::fontStretchFromStyleValue(stretch.maximum);
</ins><span class="cx">
</span><del>- if (stretch.minimum == stretch.maximum) {
- auto value = static_cast<float>(stretch.minimum);
- if (value >= 0) {
- auto floored = std::floor(value);
- if (floored == value)
- return String::format("%d%%", static_cast<int>(floored));
- }
- return String::format("%f%%", static_cast<float>(stretch.minimum));
- }
</del><ins>+ if (minimum.get().equals(maximum.get()))
+ return minimum->cssText();
</ins><span class="cx">
</span><del>- return String::format("%f%% %f%%", static_cast<float>(stretch.minimum), static_cast<float>(stretch.maximum));
</del><ins>+ StringBuilder builder;
+ builder.append(minimum->cssText());
+ builder.append(' ');
+ builder.append(maximum->cssText());
+ return builder.toString();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String FontFace::unicodeRange() const
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -1193,7 +1193,7 @@
</span><span class="cx"> ASSERT(is<CSSPrimitiveValue>(value));
</span><span class="cx"> const auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx">
</span><del>- if (primitiveValue.isPercentage() || primitiveValue.isNumber())
</del><ins>+ if (primitiveValue.isPercentage())
</ins><span class="cx"> return FontSelectionValue::clampFloat(primitiveValue.floatValue());
</span><span class="cx">
</span><span class="cx"> ASSERT(primitiveValue.isValueID());
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (214418 => 214419)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2017-03-27 17:48:22 UTC (rev 214418)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2017-03-27 17:50:33 UTC (rev 214419)
</span><span class="lines">@@ -888,14 +888,12 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> if (range.atEnd())
</span><span class="cx"> return firstNumber;
</span><del>- if (!consumeSlashIncludingWhitespace(range))
- return nullptr;
</del><span class="cx"> auto secondNumber = consumeNumber(range, ValueRangeAll);
</span><span class="cx"> if (!secondNumber)
</span><span class="cx"> return nullptr;
</span><span class="cx"> if (firstNumber->floatValue() > secondNumber->floatValue())
</span><span class="cx"> return nullptr;
</span><del>- auto result = CSSValueList::createSlashSeparated();
</del><ins>+ auto result = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> result->append(firstNumber.releaseNonNull());
</span><span class="cx"> result->append(secondNumber.releaseNonNull());
</span><span class="cx"> return RefPtr<CSSValue>(WTFMove(result));
</span><span class="lines">@@ -911,9 +909,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (auto result = consumeFontStretchKeywordValue(range))
</span><span class="cx"> return result;
</span><del>- if (auto percent = consumePercent(range, ValueRangeAll))
- return percent;
- return consumeNumber(range, ValueRangeAll);
</del><ins>+ return consumePercent(range, ValueRangeAll);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(VARIATION_FONTS)
</span><span class="lines">@@ -921,39 +917,20 @@
</span><span class="cx"> {
</span><span class="cx"> if (auto result = consumeFontStretchKeywordValue(range))
</span><span class="cx"> return result;
</span><del>- if (auto firstPercent = consumePercent(range, ValueRangeAll)) {
- if (range.atEnd())
- return firstPercent;
- if (!consumeSlashIncludingWhitespace(range))
- return nullptr;
- auto secondPercent = consumePercent(range, ValueRangeAll);
- if (!secondPercent)
- return nullptr;
- if (firstPercent->floatValue() > secondPercent->floatValue())
- return nullptr;
- auto result = CSSValueList::createSlashSeparated();
- result->append(firstPercent.releaseNonNull());
- result->append(secondPercent.releaseNonNull());
- return RefPtr<CSSValue>(WTFMove(result));
- }
-
- if (auto firstNumber = consumeNumber(range, ValueRangeAll)) {
- if (range.atEnd())
- return firstNumber;
- if (!consumeSlashIncludingWhitespace(range))
- return nullptr;
- auto secondNumber = consumeNumber(range, ValueRangeAll);
- if (!secondNumber)
- return nullptr;
- if (firstNumber->floatValue() > secondNumber->floatValue())
- return nullptr;
- auto result = CSSValueList::createSlashSeparated();
- result->append(firstNumber.releaseNonNull());
- result->append(secondNumber.releaseNonNull());
- return RefPtr<CSSValue>(WTFMove(result));
- }
-
- return nullptr;
</del><ins>+ auto firstPercent = consumePercent(range, ValueRangeAll);
+ if (!firstPercent)
+ return nullptr;
+ if (range.atEnd())
+ return firstPercent;
+ auto secondPercent = consumePercent(range, ValueRangeAll);
+ if (!secondPercent)
+ return nullptr;
+ if (firstPercent->floatValue() > secondPercent->floatValue())
+ return nullptr;
+ auto result = CSSValueList::createSpaceSeparated();
+ result->append(firstPercent.releaseNonNull());
+ result->append(secondPercent.releaseNonNull());
+ return RefPtr<CSSValue>(WTFMove(result));
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -977,8 +954,6 @@
</span><span class="cx"> return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique));
</span><span class="cx"> if (auto angle = consumeAngle(range, cssParserMode))
</span><span class="cx"> return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique), WTFMove(angle));
</span><del>- if (auto number = consumeNumber(range, ValueRangeAll))
- return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique), CSSValuePool::singleton().createValue(number->value<double>(), CSSPrimitiveValue::CSS_DEG));
</del><span class="cx"> return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1009,23 +984,6 @@
</span><span class="cx"> return CSSFontStyleRangeValue::create(keyword.releaseNonNull(), WTFMove(result));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (auto firstNumber = consumeNumber(range, ValueRangeAll)) {
- if (range.atEnd()) {
- auto result = CSSValueList::createSpaceSeparated();
- result->append(firstNumber.releaseNonNull());
- return CSSFontStyleRangeValue::create(keyword.releaseNonNull(), WTFMove(result));
- }
- auto secondNumber = consumeNumber(range, ValueRangeAll);
- if (!secondNumber)
- return nullptr;
- if (firstNumber->floatValue() > secondNumber->floatValue())
- return nullptr;
- auto result = CSSValueList::createSpaceSeparated();
- result->append(CSSValuePool::singleton().createValue(firstNumber->value<double>(), CSSPrimitiveValue::CSS_DEG));
- result->append(CSSValuePool::singleton().createValue(secondNumber->value<double>(), CSSPrimitiveValue::CSS_DEG));
- return CSSFontStyleRangeValue::create(keyword.releaseNonNull(), WTFMove(result));
- }
-
</del><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre>
</div>
</div>
</body>
</html>