<!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>[214359] 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/214359">214359</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2017-03-24 11:23:48 -0700 (Fri, 24 Mar 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>font-style needs a new CSSValue to make CSSRule.cssText work correctly
https://bugs.webkit.org/show_bug.cgi?id=169258
Reviewed by David Hyatt.
Source/WebCore:
With variation fonts, font-style's value can't be captured in a CSSPrimitiveValue (nor any other subclass
off CSSValue) any more. Instead, we need to create two new CSSValues which represent the grammar that font-
style and it's associated @font-face descriptor accept.
The grammar of the font-style property is "normal | italic | oblique [ <<angle>> ]?"
The grammar of the font-style descriptor is "normal | italic | oblique [ <<angle>> | <<angle>> <<angle>> ]?"
We currently still support numbers in place of the <<angle>> value (contrary to the spec). We will remove
this support in https://bugs.webkit.org/show_bug.cgi?id=169357.
Tests: fast/text/font-selection-font-face-parse.html:
fast/text/font-style-parse.html:
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSAllInOne.cpp:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::fontStyleFromStyle):
(WebCore::fontShorthandValueForSelectionProperties):
* css/CSSFontFace.cpp:
(WebCore::calculateWeightRange):
(WebCore::calculateStretchRange):
(WebCore::calculateItalicRange):
* css/CSSFontFaceSet.cpp:
(WebCore::computeFontSelectionRequest):
(WebCore::CSSFontFaceSet::matchingFaces):
(WebCore::calculateWeightValue): Deleted.
(WebCore::calculateStretchValue): Deleted.
(WebCore::calculateStyleValue): Deleted.
* css/CSSFontFaceSet.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
* css/CSSFontStyleRangeValue.cpp: Added.
(WebCore::CSSFontStyleRangeValue::customCSSText):
(WebCore::CSSFontStyleRangeValue::equals):
* css/CSSFontStyleRangeValue.h: Added.
* css/CSSFontStyleValue.cpp: Added.
(WebCore::CSSFontStyleValue::customCSSText):
(WebCore::CSSFontStyleValue::equals):
* css/CSSFontStyleValue.h: Added.
* css/CSSFontValue.cpp:
(WebCore::CSSFontValue::customCSSText):
* css/CSSFontValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isFontStyleValue):
(WebCore::CSSValue::isFontStyleRangeValue):
* css/FontFace.cpp:
(WebCore::FontFace::style):
(WebCore::FontFace::weight):
(WebCore::FontFace::stretch):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertFontWeightFromValue):
(WebCore::StyleBuilderConverter::convertFontStretchFromValue):
(WebCore::StyleBuilderConverter::convertFontStyleFromValue):
(WebCore::StyleBuilderConverter::convertFontWeight):
(WebCore::StyleBuilderConverter::convertFontStretch):
(WebCore::StyleBuilderConverter::convertFontStyle):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeFontStyle):
(WebCore::consumeFontStyleRange):
(WebCore::CSSPropertyParser::consumeSystemFont):
(WebCore::CSSPropertyParser::consumeFont):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::parseAttribute):
LayoutTests:
Update tests' expected results.
* fast/text/font-selection-font-face-parse-expected.txt:
* fast/text/font-selection-font-face-parse.html:
* fast/text/font-style-parse-expected.txt:
* fast/text/font-style-parse.html:
* platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt:
* svg/css/getComputedStyle-basic-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="#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="#trunkLayoutTestsplatformmacelcapitanfasttextfontselectionfontfaceparseexpectedtxt">trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcssgetComputedStylebasicexpectedtxt">trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssCSSAllInOnecpp">trunk/Source/WebCore/css/CSSAllInOne.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFacecpp">trunk/Source/WebCore/css/CSSFontFace.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceSetcpp">trunk/Source/WebCore/css/CSSFontFaceSet.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceSeth">trunk/Source/WebCore/css/CSSFontFaceSet.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontSelectorcpp">trunk/Source/WebCore/css/CSSFontSelector.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontValuecpp">trunk/Source/WebCore/css/CSSFontValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontValueh">trunk/Source/WebCore/css/CSSFontValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSValuecpp">trunk/Source/WebCore/css/CSSValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueh">trunk/Source/WebCore/css/CSSValue.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>
<li><a href="#trunkSourceWebCoreeditingEditingStylecpp">trunk/Source/WebCore/editing/EditingStyle.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontFaceElementcpp">trunk/Source/WebCore/svg/SVGFontFaceElement.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorecssCSSFontStyleRangeValuecpp">trunk/Source/WebCore/css/CSSFontStyleRangeValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontStyleRangeValueh">trunk/Source/WebCore/css/CSSFontStyleRangeValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontStyleValuecpp">trunk/Source/WebCore/css/CSSFontStyleValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontStyleValueh">trunk/Source/WebCore/css/CSSFontStyleValue.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/LayoutTests/ChangeLog        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2017-03-24 Myles C. Maxfield <mmaxfield@apple.com>
+
+ font-style needs a new CSSValue to make CSSRule.cssText work correctly
+ https://bugs.webkit.org/show_bug.cgi?id=169258
+
+ Reviewed by David Hyatt.
+
+ Update tests' expected results.
+
+ * fast/text/font-selection-font-face-parse-expected.txt:
+ * fast/text/font-selection-font-face-parse.html:
+ * fast/text/font-style-parse-expected.txt:
+ * fast/text/font-style-parse.html:
+ * platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt:
+ * svg/css/getComputedStyle-basic-expected.txt:
+
</ins><span class="cx"> 2017-03-24 Youenn Fablet <youenn@apple.com>
</span><span class="cx">
</span><span class="cx"> Add libwebrtc backend support for RTCRtpSender::replaceTrack
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontselectionfontfaceparseexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-selection-font-face-parse-expected.txt (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-selection-font-face-parse-expected.txt        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/LayoutTests/fast/text/font-selection-font-face-parse-expected.txt        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -69,21 +69,21 @@
</span><span class="cx"> PASS stretchTestSheet.cssRules[37].style.fontStretch is ""
</span><span class="cx"> PASS stretchTestSheet.cssRules[38].style.fontStretch is "7 / 8"
</span><span class="cx"> PASS stretchTestSheet.cssRules[39].style.fontStretch is "2 / 7"
</span><del>-PASS styleTestSheet.cssRules[0].style.fontStyle is "1deg"
-PASS styleTestSheet.cssRules[1].style.fontStyle is "200grad"
-PASS styleTestSheet.cssRules[2].style.fontStyle is "6.28318rad"
-PASS styleTestSheet.cssRules[3].style.fontStyle is "4turn"
-PASS styleTestSheet.cssRules[4].style.fontStyle is "5"
-PASS styleTestSheet.cssRules[5].style.fontStyle is "20"
</del><ins>+PASS styleTestSheet.cssRules[0].style.fontStyle is "oblique 1deg"
+PASS styleTestSheet.cssRules[1].style.fontStyle is "oblique 200grad"
+PASS styleTestSheet.cssRules[2].style.fontStyle is "oblique 6.28318rad"
+PASS styleTestSheet.cssRules[3].style.fontStyle is "oblique 4turn"
+PASS styleTestSheet.cssRules[4].style.fontStyle is "oblique 5"
+PASS styleTestSheet.cssRules[5].style.fontStyle is "oblique 20"
</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 "7"
-PASS styleTestSheet.cssRules[12].style.fontStyle is "calc(1441deg)"
-PASS styleTestSheet.cssRules[13].style.fontStyle is "100 / 200"
-PASS styleTestSheet.cssRules[14].style.fontStyle is "100 / 200"
</del><ins>+PASS styleTestSheet.cssRules[11].style.fontStyle is "oblique 7"
+PASS styleTestSheet.cssRules[12].style.fontStyle is "oblique calc(1441deg)"
+PASS styleTestSheet.cssRules[13].style.fontStyle is "oblique 100deg 200deg"
+PASS styleTestSheet.cssRules[14].style.fontStyle is "oblique 100deg 200deg"
</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,11 +90,11 @@
</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 "1 / 2"
-PASS styleTestSheet.cssRules[22].style.fontStyle is "-2 / -1"
</del><ins>+PASS styleTestSheet.cssRules[21].style.fontStyle is "oblique 1deg 2deg"
+PASS styleTestSheet.cssRules[22].style.fontStyle is "oblique -2deg -1deg"
</ins><span class="cx"> PASS styleTestSheet.cssRules[23].style.fontStyle is ""
</span><del>-PASS styleTestSheet.cssRules[24].style.fontStyle is "100deg / 200deg"
-PASS styleTestSheet.cssRules[25].style.fontStyle is "100deg / 200deg"
</del><ins>+PASS styleTestSheet.cssRules[24].style.fontStyle is "oblique 100deg 200deg"
+PASS styleTestSheet.cssRules[25].style.fontStyle is "oblique 100deg 200deg"
</ins><span class="cx"> PASS styleTestSheet.cssRules[26].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[27].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[28].style.fontStyle is ""
</span><span class="lines">@@ -101,14 +101,14 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[29].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[30].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[31].style.fontStyle is ""
</span><del>-PASS styleTestSheet.cssRules[32].style.fontStyle is "1deg / 2deg"
-PASS styleTestSheet.cssRules[33].style.fontStyle is "-2deg / -1deg"
</del><ins>+PASS styleTestSheet.cssRules[32].style.fontStyle is "oblique 1deg 2deg"
+PASS styleTestSheet.cssRules[33].style.fontStyle is "oblique -2deg -1deg"
</ins><span class="cx"> PASS styleTestSheet.cssRules[34].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[35].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[36].style.fontStyle is ""
</span><del>-PASS styleTestSheet.cssRules[37].style.fontStyle is "2deg / 1turn"
-PASS styleTestSheet.cssRules[38].style.fontStyle is "7 / 8"
-PASS styleTestSheet.cssRules[39].style.fontStyle is "2 / 7"
</del><ins>+PASS styleTestSheet.cssRules[37].style.fontStyle is "oblique 2deg 1turn"
+PASS styleTestSheet.cssRules[38].style.fontStyle is "oblique 7deg 8deg"
+PASS styleTestSheet.cssRules[39].style.fontStyle is "oblique 2deg 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 (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-selection-font-face-parse.html        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/LayoutTests/fast/text/font-selection-font-face-parse.html        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -261,85 +261,85 @@
</span><span class="cx"> font-style: oblique calc(4turn + 1deg);
</span><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100/200;
</del><ins>+ font-style: oblique 100 200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100 / 200;
</del><ins>+ font-style: oblique 100 200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique a 100 / 200;
</del><ins>+ font-style: oblique a 100 200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100 / 200 a;
</del><ins>+ font-style: oblique 100 200 a;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100 a / 200;
</del><ins>+ font-style: oblique 100 a 200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100 a/ 200;
</del><ins>+ font-style: oblique 100 a200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100 /a 200;
</del><ins>+ font-style: oblique 100a 200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100 / a200;
</del><ins>+ font-style: oblique 100 a200;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 1 / 2;
</del><ins>+ font-style: oblique 1 2;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique -2 / -1;
</del><ins>+ font-style: oblique -2 -1;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 2 / 1;
</del><ins>+ font-style: oblique 2 1;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100deg/200deg;
</del><ins>+ font-style: oblique 100deg 200deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100deg / 200deg;
</del><ins>+ font-style: oblique 100deg 200deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique a 100deg / 200deg;
</del><ins>+ font-style: oblique a 100deg 200deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100deg / 200deg a;
</del><ins>+ font-style: oblique 100deg 200deg a;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100deg a / 200deg;
</del><ins>+ font-style: oblique 100deg a 200deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100deg a/ 200deg;
</del><ins>+ font-style: oblique 100deg a200deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100deg /a 200deg;
</del><ins>+ font-style: oblique 100dega 200deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 100deg / a200deg;
</del><ins>+ font-style: oblique 100deg a200deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 1deg / 2deg;
</del><ins>+ font-style: oblique 1deg 2deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique -2deg / -1deg;
</del><ins>+ font-style: oblique -2deg -1deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 2deg / 1deg;
</del><ins>+ font-style: oblique 2deg 1deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 1 / 2deg;
</del><ins>+ font-style: oblique 1 2deg;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 1deg / 2;
</del><ins>+ font-style: oblique 1deg 2;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 2deg / 1turn;
</del><ins>+ font-style: oblique 2deg 1turn;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique calc(3 + 4) / 8;
</del><ins>+ font-style: oblique calc(3 + 4) 8;
</ins><span class="cx"> }
</span><span class="cx"> @font-face {
</span><del>- font-style: oblique 2 / calc(3 + 4);
</del><ins>+ font-style: oblique 2 calc(3 + 4);
</ins><span class="cx"> }
</span><span class="cx"> </style>
</span><span class="cx"> </head>
</span><span class="lines">@@ -421,22 +421,22 @@
</span><span class="cx"> shouldBeEqualToString("stretchTestSheet.cssRules[39].style.fontStretch", "2 / 7");
</span><span class="cx">
</span><span class="cx"> var styleTestSheet = document.getElementById("styleTest").sheet;
</span><del>-shouldBeEqualToString("styleTestSheet.cssRules[0].style.fontStyle", "1deg");
-shouldBeEqualToString("styleTestSheet.cssRules[1].style.fontStyle", "200grad");
-shouldBeEqualToString("styleTestSheet.cssRules[2].style.fontStyle", "6.28318rad");
-shouldBeEqualToString("styleTestSheet.cssRules[3].style.fontStyle", "4turn");
-shouldBeEqualToString("styleTestSheet.cssRules[4].style.fontStyle", "5");
-shouldBeEqualToString("styleTestSheet.cssRules[5].style.fontStyle", "20");
</del><ins>+shouldBeEqualToString("styleTestSheet.cssRules[0].style.fontStyle", "oblique 1deg");
+shouldBeEqualToString("styleTestSheet.cssRules[1].style.fontStyle", "oblique 200grad");
+shouldBeEqualToString("styleTestSheet.cssRules[2].style.fontStyle", "oblique 6.28318rad");
+shouldBeEqualToString("styleTestSheet.cssRules[3].style.fontStyle", "oblique 4turn");
+shouldBeEqualToString("styleTestSheet.cssRules[4].style.fontStyle", "oblique 5");
+shouldBeEqualToString("styleTestSheet.cssRules[5].style.fontStyle", "oblique 20");
</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", "7");
-shouldBeEqualToString("styleTestSheet.cssRules[12].style.fontStyle", "calc(1441deg)");
</del><ins>+shouldBeEqualToString("styleTestSheet.cssRules[11].style.fontStyle", "oblique 7");
+shouldBeEqualToString("styleTestSheet.cssRules[12].style.fontStyle", "oblique calc(1441deg)");
</ins><span class="cx">
</span><del>-shouldBeEqualToString("styleTestSheet.cssRules[13].style.fontStyle", "100 / 200");
-shouldBeEqualToString("styleTestSheet.cssRules[14].style.fontStyle", "100 / 200");
</del><ins>+shouldBeEqualToString("styleTestSheet.cssRules[13].style.fontStyle", "oblique 100deg 200deg");
+shouldBeEqualToString("styleTestSheet.cssRules[14].style.fontStyle", "oblique 100deg 200deg");
</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,11 +443,11 @@
</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", "1 / 2");
-shouldBeEqualToString("styleTestSheet.cssRules[22].style.fontStyle", "-2 / -1");
</del><ins>+shouldBeEqualToString("styleTestSheet.cssRules[21].style.fontStyle", "oblique 1deg 2deg");
+shouldBeEqualToString("styleTestSheet.cssRules[22].style.fontStyle", "oblique -2deg -1deg");
</ins><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[23].style.fontStyle", "");
</span><del>-shouldBeEqualToString("styleTestSheet.cssRules[24].style.fontStyle", "100deg / 200deg");
-shouldBeEqualToString("styleTestSheet.cssRules[25].style.fontStyle", "100deg / 200deg");
</del><ins>+shouldBeEqualToString("styleTestSheet.cssRules[24].style.fontStyle", "oblique 100deg 200deg");
+shouldBeEqualToString("styleTestSheet.cssRules[25].style.fontStyle", "oblique 100deg 200deg");
</ins><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[26].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[27].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[28].style.fontStyle", "");
</span><span class="lines">@@ -454,14 +454,14 @@
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[29].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[30].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[31].style.fontStyle", "");
</span><del>-shouldBeEqualToString("styleTestSheet.cssRules[32].style.fontStyle", "1deg / 2deg");
-shouldBeEqualToString("styleTestSheet.cssRules[33].style.fontStyle", "-2deg / -1deg");
</del><ins>+shouldBeEqualToString("styleTestSheet.cssRules[32].style.fontStyle", "oblique 1deg 2deg");
+shouldBeEqualToString("styleTestSheet.cssRules[33].style.fontStyle", "oblique -2deg -1deg");
</ins><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[34].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[35].style.fontStyle", "");
</span><span class="cx"> shouldBeEqualToString("styleTestSheet.cssRules[36].style.fontStyle", "");
</span><del>-shouldBeEqualToString("styleTestSheet.cssRules[37].style.fontStyle", "2deg / 1turn");
-shouldBeEqualToString("styleTestSheet.cssRules[38].style.fontStyle", "7 / 8");
-shouldBeEqualToString("styleTestSheet.cssRules[39].style.fontStyle", "2 / 7");
</del><ins>+shouldBeEqualToString("styleTestSheet.cssRules[37].style.fontStyle", "oblique 2deg 1turn");
+shouldBeEqualToString("styleTestSheet.cssRules[38].style.fontStyle", "oblique 7deg 8deg");
+shouldBeEqualToString("styleTestSheet.cssRules[39].style.fontStyle", "oblique 2deg 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="trunkLayoutTestsfasttextfontstyleparseexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-style-parse-expected.txt (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-style-parse-expected.txt        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/LayoutTests/fast/text/font-style-parse-expected.txt        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -1,9 +1,9 @@
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test1')).fontStyle is "normal"
</span><del>-PASS window.getComputedStyle(document.getElementById('test2')).fontStyle is "1deg"
-PASS window.getComputedStyle(document.getElementById('test3')).fontStyle is "180deg"
-PASS window.getComputedStyle(document.getElementById('test4')).fontStyle is "359.75deg"
-PASS window.getComputedStyle(document.getElementById('test5')).fontStyle is "1440deg"
-PASS window.getComputedStyle(document.getElementById('test6')).fontStyle is "5deg"
</del><ins>+PASS window.getComputedStyle(document.getElementById('test2')).fontStyle is "oblique 1deg"
+PASS window.getComputedStyle(document.getElementById('test3')).fontStyle is "oblique 180deg"
+PASS window.getComputedStyle(document.getElementById('test4')).fontStyle is "oblique 359.75deg"
+PASS window.getComputedStyle(document.getElementById('test5')).fontStyle is "oblique 1440deg"
+PASS window.getComputedStyle(document.getElementById('test6')).fontStyle is "oblique 5deg"
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('test7')).fontStyle is "italic"
</span><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="lines">@@ -10,8 +10,8 @@
</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 "7deg"
-PASS window.getComputedStyle(document.getElementById('test14')).fontStyle is "1441deg"
</del><ins>+PASS window.getComputedStyle(document.getElementById('test13')).fontStyle is "oblique 7deg"
+PASS window.getComputedStyle(document.getElementById('test14')).fontStyle is "oblique 1441deg"
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById('test15')).fontStyle is "italic"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test16')).fontStyle is "italic"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test17')).fontStyle is "normal"
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test18')).fontStyle is "italic"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test19')).fontStyle is "italic"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById('test20')).fontStyle is "normal"
</span><del>-PASS window.getComputedStyle(document.getElementById('test21')).fontStyle is "14deg"
</del><ins>+PASS window.getComputedStyle(document.getElementById('test21')).fontStyle is "oblique 14deg"
</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><span class="cx"> PASS window.getComputedStyle(document.getElementById('test3')).font is "16px/18px Times"
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> PASS document.getElementById('test18').style.font is "italic 48px/49px 'Helvetica Neue'"
</span><span class="cx"> PASS document.getElementById('test19').style.font is "italic small-caps 100 extra-expanded 48px/49px 'Helvetica Neue'"
</span><span class="cx"> PASS document.getElementById('test20').style.font is ""
</span><del>-PASS document.getElementById('test21').style.font is "14deg small-caps 123 extra-expanded 48px/49px 'Helvetica Neue'"
</del><ins>+PASS document.getElementById('test21').style.font is "oblique 14deg small-caps 123 extra-expanded 48px/49px 'Helvetica Neue'"
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontstyleparsehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/font-style-parse.html (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-style-parse.html        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/LayoutTests/fast/text/font-style-parse.html        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -29,11 +29,11 @@
</span><span class="cx"> </div>
</span><span class="cx"> <script>
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).fontStyle", "normal");
</span><del>-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).fontStyle", "1deg");
-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).fontStyle", "180deg");
-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).fontStyle", "359.75deg");
-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).fontStyle", "1440deg");
-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).fontStyle", "5deg");
</del><ins>+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).fontStyle", "oblique 1deg");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).fontStyle", "oblique 180deg");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).fontStyle", "oblique 359.75deg");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).fontStyle", "oblique 1440deg");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).fontStyle", "oblique 5deg");
</ins><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test7')).fontStyle", "italic");
</span><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="lines">@@ -40,8 +40,8 @@
</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", "7deg");
-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test14')).fontStyle", "1441deg");
</del><ins>+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test13')).fontStyle", "oblique 7deg");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test14')).fontStyle", "oblique 1441deg");
</ins><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test15')).fontStyle", "italic");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test16')).fontStyle", "italic");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test17')).fontStyle", "normal");
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test18')).fontStyle", "italic");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test19')).fontStyle", "italic");
</span><span class="cx"> shouldBeEqualToString("window.getComputedStyle(document.getElementById('test20')).fontStyle", "normal");
</span><del>-shouldBeEqualToString("window.getComputedStyle(document.getElementById('test21')).fontStyle", "14deg");
</del><ins>+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test21')).fontStyle", "oblique 14deg");
</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><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx"> shouldBeEqualToString("document.getElementById('test18').style.font", "italic 48px/49px 'Helvetica Neue'");
</span><span class="cx"> shouldBeEqualToString("document.getElementById('test19').style.font", "italic small-caps 100 extra-expanded 48px/49px 'Helvetica Neue'");
</span><span class="cx"> shouldBeEqualToString("document.getElementById('test20').style.font", "");
</span><del>-shouldBeEqualToString("document.getElementById('test21').style.font", "14deg small-caps 123 extra-expanded 48px/49px 'Helvetica Neue'");
</del><ins>+shouldBeEqualToString("document.getElementById('test21').style.font", "oblique 14deg small-caps 123 extra-expanded 48px/49px 'Helvetica Neue'");
</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="trunkLayoutTestsplatformmacelcapitanfasttextfontselectionfontfaceparseexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -69,21 +69,21 @@
</span><span class="cx"> PASS stretchTestSheet.cssRules[37].style.fontStretch is ""
</span><span class="cx"> FAIL stretchTestSheet.cssRules[38].style.fontStretch should be 7 / 8. Was .
</span><span class="cx"> FAIL stretchTestSheet.cssRules[39].style.fontStretch should be 2 / 7. Was .
</span><del>-PASS styleTestSheet.cssRules[0].style.fontStyle is "1deg"
-PASS styleTestSheet.cssRules[1].style.fontStyle is "200grad"
-PASS styleTestSheet.cssRules[2].style.fontStyle is "6.28318rad"
-PASS styleTestSheet.cssRules[3].style.fontStyle is "4turn"
-PASS styleTestSheet.cssRules[4].style.fontStyle is "5"
-PASS styleTestSheet.cssRules[5].style.fontStyle is "20"
</del><ins>+PASS styleTestSheet.cssRules[0].style.fontStyle is "oblique 1deg"
+PASS styleTestSheet.cssRules[1].style.fontStyle is "oblique 200grad"
+PASS styleTestSheet.cssRules[2].style.fontStyle is "oblique 6.28318rad"
+PASS styleTestSheet.cssRules[3].style.fontStyle is "oblique 4turn"
+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.
</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 "7"
-PASS styleTestSheet.cssRules[12].style.fontStyle is "calc(1441deg)"
-FAIL styleTestSheet.cssRules[13].style.fontStyle should be 100 / 200. Was .
-FAIL styleTestSheet.cssRules[14].style.fontStyle should be 100 / 200. Was .
</del><ins>+FAIL styleTestSheet.cssRules[11].style.fontStyle should be oblique 7. Was oblique 7deg.
+PASS styleTestSheet.cssRules[12].style.fontStyle is "oblique calc(1441deg)"
+FAIL styleTestSheet.cssRules[13].style.fontStyle should be oblique 100deg 200deg. Was .
+FAIL styleTestSheet.cssRules[14].style.fontStyle should be oblique 100deg 200deg. Was .
</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,11 +90,11 @@
</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 1 / 2. Was .
-FAIL styleTestSheet.cssRules[22].style.fontStyle should be -2 / -1. Was .
</del><ins>+FAIL styleTestSheet.cssRules[21].style.fontStyle should be oblique 1deg 2deg. Was .
+FAIL styleTestSheet.cssRules[22].style.fontStyle should be oblique -2deg -1deg. Was .
</ins><span class="cx"> PASS styleTestSheet.cssRules[23].style.fontStyle is ""
</span><del>-FAIL styleTestSheet.cssRules[24].style.fontStyle should be 100deg / 200deg. Was .
-FAIL styleTestSheet.cssRules[25].style.fontStyle should be 100deg / 200deg. Was .
</del><ins>+FAIL styleTestSheet.cssRules[24].style.fontStyle should be oblique 100deg 200deg. Was .
+FAIL styleTestSheet.cssRules[25].style.fontStyle should be oblique 100deg 200deg. Was .
</ins><span class="cx"> PASS styleTestSheet.cssRules[26].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[27].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[28].style.fontStyle is ""
</span><span class="lines">@@ -101,14 +101,14 @@
</span><span class="cx"> PASS styleTestSheet.cssRules[29].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[30].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[31].style.fontStyle is ""
</span><del>-FAIL styleTestSheet.cssRules[32].style.fontStyle should be 1deg / 2deg. Was .
-FAIL styleTestSheet.cssRules[33].style.fontStyle should be -2deg / -1deg. Was .
</del><ins>+FAIL styleTestSheet.cssRules[32].style.fontStyle should be oblique 1deg 2deg. Was .
+FAIL styleTestSheet.cssRules[33].style.fontStyle should be oblique -2deg -1deg. Was .
</ins><span class="cx"> PASS styleTestSheet.cssRules[34].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[35].style.fontStyle is ""
</span><span class="cx"> PASS styleTestSheet.cssRules[36].style.fontStyle is ""
</span><del>-FAIL styleTestSheet.cssRules[37].style.fontStyle should be 2deg / 1turn. Was .
-FAIL styleTestSheet.cssRules[38].style.fontStyle should be 7 / 8. Was .
-FAIL styleTestSheet.cssRules[39].style.fontStyle should be 2 / 7. Was .
</del><ins>+FAIL styleTestSheet.cssRules[37].style.fontStyle should be oblique 2deg 1turn. Was .
+FAIL styleTestSheet.cssRules[38].style.fontStyle should be oblique 7deg 8deg. Was .
+FAIL styleTestSheet.cssRules[39].style.fontStyle should be oblique 2deg 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="trunkLayoutTestssvgcssgetComputedStylebasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> rect: style.getPropertyValue(font-size) : 16px
</span><span class="cx"> rect: style.getPropertyCSSValue(font-size) : [object CSSPrimitiveValue]
</span><span class="cx"> rect: style.getPropertyValue(font-style) : normal
</span><del>-rect: style.getPropertyCSSValue(font-style) : [object CSSPrimitiveValue]
</del><ins>+rect: style.getPropertyCSSValue(font-style) : [object CSSValue]
</ins><span class="cx"> rect: style.getPropertyValue(font-synthesis) : style weight small-caps
</span><span class="cx"> rect: style.getPropertyCSSValue(font-synthesis) : [object CSSValueList]
</span><span class="cx"> rect: style.getPropertyValue(font-variant) : normal
</span><span class="lines">@@ -643,7 +643,7 @@
</span><span class="cx"> g: style.getPropertyValue(font-size) : 16px
</span><span class="cx"> g: style.getPropertyCSSValue(font-size) : [object CSSPrimitiveValue]
</span><span class="cx"> g: style.getPropertyValue(font-style) : normal
</span><del>-g: style.getPropertyCSSValue(font-style) : [object CSSPrimitiveValue]
</del><ins>+g: style.getPropertyCSSValue(font-style) : [object CSSValue]
</ins><span class="cx"> g: style.getPropertyValue(font-synthesis) : style weight small-caps
</span><span class="cx"> g: style.getPropertyCSSValue(font-synthesis) : [object CSSValueList]
</span><span class="cx"> g: style.getPropertyValue(font-variant) : normal
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/CMakeLists.txt        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -1314,6 +1314,8 @@
</span><span class="cx"> css/CSSFontFaceSrcValue.cpp
</span><span class="cx"> css/CSSFontFeatureValue.cpp
</span><span class="cx"> css/CSSFontSelector.cpp
</span><ins>+ css/CSSFontStyleRangeValue.cpp
+ css/CSSFontStyleValue.cpp
</ins><span class="cx"> css/CSSFontValue.cpp
</span><span class="cx"> css/CSSFontVariationValue.cpp
</span><span class="cx"> css/CSSFunctionValue.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/ChangeLog        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -1,3 +1,79 @@
</span><ins>+2017-03-24 Myles C. Maxfield <mmaxfield@apple.com>
+
+ font-style needs a new CSSValue to make CSSRule.cssText work correctly
+ https://bugs.webkit.org/show_bug.cgi?id=169258
+
+ Reviewed by David Hyatt.
+
+ With variation fonts, font-style's value can't be captured in a CSSPrimitiveValue (nor any other subclass
+ off CSSValue) any more. Instead, we need to create two new CSSValues which represent the grammar that font-
+ style and it's associated @font-face descriptor accept.
+
+ The grammar of the font-style property is "normal | italic | oblique [ <<angle>> ]?"
+ The grammar of the font-style descriptor is "normal | italic | oblique [ <<angle>> | <<angle>> <<angle>> ]?"
+
+ We currently still support numbers in place of the <<angle>> value (contrary to the spec). We will remove
+ this support in https://bugs.webkit.org/show_bug.cgi?id=169357.
+
+ Tests: fast/text/font-selection-font-face-parse.html:
+ fast/text/font-style-parse.html:
+
+ * CMakeLists.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * css/CSSAllInOne.cpp:
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::fontStyleFromStyle):
+ (WebCore::fontShorthandValueForSelectionProperties):
+ * css/CSSFontFace.cpp:
+ (WebCore::calculateWeightRange):
+ (WebCore::calculateStretchRange):
+ (WebCore::calculateItalicRange):
+ * css/CSSFontFaceSet.cpp:
+ (WebCore::computeFontSelectionRequest):
+ (WebCore::CSSFontFaceSet::matchingFaces):
+ (WebCore::calculateWeightValue): Deleted.
+ (WebCore::calculateStretchValue): Deleted.
+ (WebCore::calculateStyleValue): Deleted.
+ * css/CSSFontFaceSet.h:
+ * css/CSSFontSelector.cpp:
+ (WebCore::CSSFontSelector::addFontFaceRule):
+ * css/CSSFontStyleRangeValue.cpp: Added.
+ (WebCore::CSSFontStyleRangeValue::customCSSText):
+ (WebCore::CSSFontStyleRangeValue::equals):
+ * css/CSSFontStyleRangeValue.h: Added.
+ * css/CSSFontStyleValue.cpp: Added.
+ (WebCore::CSSFontStyleValue::customCSSText):
+ (WebCore::CSSFontStyleValue::equals):
+ * css/CSSFontStyleValue.h: Added.
+ * css/CSSFontValue.cpp:
+ (WebCore::CSSFontValue::customCSSText):
+ * css/CSSFontValue.h:
+ * css/CSSValue.cpp:
+ (WebCore::CSSValue::equals):
+ (WebCore::CSSValue::cssText):
+ (WebCore::CSSValue::destroy):
+ * css/CSSValue.h:
+ (WebCore::CSSValue::isFontStyleValue):
+ (WebCore::CSSValue::isFontStyleRangeValue):
+ * css/FontFace.cpp:
+ (WebCore::FontFace::style):
+ (WebCore::FontFace::weight):
+ (WebCore::FontFace::stretch):
+ * css/StyleBuilderConverter.h:
+ (WebCore::StyleBuilderConverter::convertFontWeightFromValue):
+ (WebCore::StyleBuilderConverter::convertFontStretchFromValue):
+ (WebCore::StyleBuilderConverter::convertFontStyleFromValue):
+ (WebCore::StyleBuilderConverter::convertFontWeight):
+ (WebCore::StyleBuilderConverter::convertFontStretch):
+ (WebCore::StyleBuilderConverter::convertFontStyle):
+ * css/parser/CSSPropertyParser.cpp:
+ (WebCore::consumeFontStyle):
+ (WebCore::consumeFontStyleRange):
+ (WebCore::CSSPropertyParser::consumeSystemFont):
+ (WebCore::CSSPropertyParser::consumeFont):
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::SVGFontFaceElement::parseAttribute):
+
</ins><span class="cx"> 2017-03-24 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> REGRESSION: Content Blocker: Blocking "a[href*=randomString]" doesn't work
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -5930,6 +5930,10 @@
</span><span class="cx">                 C2AB0AF61E6B3C6C001348C5 /* FontSelectionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2AB0AF41E6B3C6C001348C5 /* FontSelectionAlgorithm.cpp */; };
</span><span class="cx">                 C2AB0AF71E6B3C6C001348C5 /* FontSelectionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = C2AB0AF51E6B3C6C001348C5 /* FontSelectionAlgorithm.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 C2E1F43F1D6254E10094625C /* BreakLines.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA4816097D93020094C9E4 /* BreakLines.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                C2E38EFD1E8396FD00CA3ADF /* CSSFontStyleValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2E38EFB1E8396FD00CA3ADF /* CSSFontStyleValue.cpp */; };
+                C2E38EFE1E8396FD00CA3ADF /* CSSFontStyleValue.h in Headers */ = {isa = PBXBuildFile; fileRef = C2E38EFC1E8396FD00CA3ADF /* CSSFontStyleValue.h */; };
+                C2E38F011E84573500CA3ADF /* CSSFontStyleRangeValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2E38EFF1E84573500CA3ADF /* CSSFontStyleRangeValue.cpp */; };
+                C2E38F021E84573500CA3ADF /* CSSFontStyleRangeValue.h in Headers */ = {isa = PBXBuildFile; fileRef = C2E38F001E84573500CA3ADF /* CSSFontStyleRangeValue.h */; };
</ins><span class="cx">                 C2F4E78A1E45BEA1006D7105 /* ComplexTextController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2F4E7881E45AEDF006D7105 /* ComplexTextController.cpp */; };
</span><span class="cx">                 C2F4E78C1E45C3EF006D7105 /* ComplexTextController.h in Headers */ = {isa = PBXBuildFile; fileRef = C2F4E7891E45AEDF006D7105 /* ComplexTextController.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 C330A22313EC196B0000B45B /* ColorChooser.h in Headers */ = {isa = PBXBuildFile; fileRef = C330A22113EC196B0000B45B /* ColorChooser.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -14318,6 +14322,10 @@
</span><span class="cx">                 C2AB0AF51E6B3C6C001348C5 /* FontSelectionAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontSelectionAlgorithm.h; sourceTree = "<group>"; };
</span><span class="cx">                 C2AB0B021E6DE32B001348C5 /* FontSelectionKeywordValues.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FontSelectionKeywordValues.h; sourceTree = "<group>"; };
</span><span class="cx">                 C2AB0B031E6DE92C001348C5 /* FontSelectionValueInlines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FontSelectionValueInlines.h; sourceTree = "<group>"; };
</span><ins>+                C2E38EFB1E8396FD00CA3ADF /* CSSFontStyleValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFontStyleValue.cpp; sourceTree = "<group>"; };
+                C2E38EFC1E8396FD00CA3ADF /* CSSFontStyleValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFontStyleValue.h; sourceTree = "<group>"; };
+                C2E38EFF1E84573500CA3ADF /* CSSFontStyleRangeValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFontStyleRangeValue.cpp; sourceTree = "<group>"; };
+                C2E38F001E84573500CA3ADF /* CSSFontStyleRangeValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFontStyleRangeValue.h; sourceTree = "<group>"; };
</ins><span class="cx">                 C2F4E7881E45AEDF006D7105 /* ComplexTextController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComplexTextController.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 C2F4E7891E45AEDF006D7105 /* ComplexTextController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComplexTextController.h; sourceTree = "<group>"; };
</span><span class="cx">                 C330A22113EC196B0000B45B /* ColorChooser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorChooser.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -24923,6 +24931,10 @@
</span><span class="cx">                                 3FFFF9A7159D9A550020BBD5 /* WebKitCSSViewportRule.h */,
</span><span class="cx">                                 3F2B33E3165ABD3500E3987C /* WebKitCSSViewportRule.idl */,
</span><span class="cx">                                 31055BB81E4FE18900EB604E /* WebKitFontFamilyNames.in */,
</span><ins>+                                C2E38EFB1E8396FD00CA3ADF /* CSSFontStyleValue.cpp */,
+                                C2E38EFC1E8396FD00CA3ADF /* CSSFontStyleValue.h */,
+                                C2E38EFF1E84573500CA3ADF /* CSSFontStyleRangeValue.cpp */,
+                                C2E38F001E84573500CA3ADF /* CSSFontStyleRangeValue.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = css;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="lines">@@ -27263,6 +27275,7 @@
</span><span class="cx">                                 316DCB201E78CA55001B5F87 /* JSRTCOfferAnswerOptions.h in Headers */,
</span><span class="cx">                                 51E269371DD3BD9B006B6A58 /* IDBIterateCursorData.h in Headers */,
</span><span class="cx">                                 5185FC951BB4C4E80012898F /* IDBKey.h in Headers */,
</span><ins>+                                C2E38F021E84573500CA3ADF /* CSSFontStyleRangeValue.h in Headers */,
</ins><span class="cx">                                 5185FC971BB4C4E80012898F /* IDBKeyData.h in Headers */,
</span><span class="cx">                                 5185FC991BB4C4E80012898F /* IDBKeyPath.h in Headers */,
</span><span class="cx">                                 5185FC9B1BB4C4E80012898F /* IDBKeyRange.h in Headers */,
</span><span class="lines">@@ -29407,6 +29420,7 @@
</span><span class="cx">                                 088C2F7A12390081003D65CE /* SVGTextLayoutAttributes.h in Headers */,
</span><span class="cx">                                 081093DC1255F0E700ED9D29 /* SVGTextLayoutAttributesBuilder.h in Headers */,
</span><span class="cx">                                 081668DA125603D5006F25DE /* SVGTextLayoutEngine.h in Headers */,
</span><ins>+                                C2E38EFE1E8396FD00CA3ADF /* CSSFontStyleValue.h in Headers */,
</ins><span class="cx">                                 080E49261255F3BD00EFCA27 /* SVGTextLayoutEngineBaseline.h in Headers */,
</span><span class="cx">                                 080E49281255F3BD00EFCA27 /* SVGTextLayoutEngineSpacing.h in Headers */,
</span><span class="cx">                                 08F0BFC61255C53C00075185 /* SVGTextMetrics.h in Headers */,
</span><span class="lines">@@ -30585,6 +30599,7 @@
</span><span class="cx">                                 9444CBE31D8861980073A074 /* CSSCustomIdentValue.cpp in Sources */,
</span><span class="cx">                                 94D4AC621DC24C8E0080F02D /* CSSCustomPropertyValue.cpp in Sources */,
</span><span class="cx">                                 4A9CC81716BB9AC600EC645A /* CSSDefaultStyleSheets.cpp in Sources */,
</span><ins>+                                C2E38F011E84573500CA3ADF /* CSSFontStyleRangeValue.cpp in Sources */,
</ins><span class="cx">                                 94476BDA1DFCAC0300690E23 /* CSSDeferredParser.cpp in Sources */,
</span><span class="cx">                                 FBB0C5B717BBD626003D3677 /* CSSFilterImageValue.cpp in Sources */,
</span><span class="cx">                                 BC64B4D50CB4298A005F2B62 /* CSSFontFace.cpp in Sources */,
</span><span class="lines">@@ -33109,6 +33124,7 @@
</span><span class="cx">                                 BC2274780E8366E200E7F975 /* SVGRenderStyle.cpp in Sources */,
</span><span class="cx">                                 BC22747A0E8366E200E7F975 /* SVGRenderStyleDefs.cpp in Sources */,
</span><span class="cx">                                 B2227AA20D00BF220071B782 /* SVGScriptElement.cpp in Sources */,
</span><ins>+                                C2E38EFD1E8396FD00CA3ADF /* CSSFontStyleValue.cpp in Sources */,
</ins><span class="cx">                                 B2227AA50D00BF220071B782 /* SVGSetElement.cpp in Sources */,
</span><span class="cx">                                 E4AFD00F0DAF335500F5F55C /* SVGSMILElement.cpp in Sources */,
</span><span class="cx">                                 B2227AA80D00BF220071B782 /* SVGStopElement.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSAllInOne.cpp (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSAllInOne.cpp        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/css/CSSAllInOne.cpp        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> #include "CSSFontFaceSrcValue.cpp"
</span><span class="cx"> #include "CSSFontFeatureValue.cpp"
</span><span class="cx"> #include "CSSFontSelector.cpp"
</span><ins>+#include "CSSFontStyleValue.cpp"
</ins><span class="cx"> #include "CSSFontValue.cpp"
</span><span class="cx"> #include "CSSFontVariationValue.cpp"
</span><span class="cx"> #include "CSSFunctionValue.cpp"
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #include "CSSBorderImageSliceValue.h"
</span><span class="cx"> #include "CSSCustomPropertyValue.h"
</span><span class="cx"> #include "CSSFontFeatureValue.h"
</span><ins>+#include "CSSFontStyleValue.h"
</ins><span class="cx"> #include "CSSFontValue.h"
</span><span class="cx"> #include "CSSFontVariationValue.h"
</span><span class="cx"> #include "CSSFunctionValue.h"
</span><span class="lines">@@ -1929,12 +1930,14 @@
</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<CSSPrimitiveValue> fontStyleFromStyle(const RenderStyle& style)
</del><ins>+static Ref<CSSFontStyleValue> fontStyleFromStyle(const RenderStyle& style)
</ins><span class="cx"> {
</span><del>- auto italic = style.fontDescription().italic();
- if (auto italicValue = fontStyleKeyword(italic))
- return CSSValuePool::singleton().createIdentifierValue(italicValue.value());
- return CSSValuePool::singleton().createValue(static_cast<float>(italic), CSSPrimitiveValue::CSS_DEG);
</del><ins>+ 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));
+ return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique), CSSValuePool::singleton().createValue(static_cast<float>(italic), CSSPrimitiveValue::CSS_DEG));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static Ref<CSSValue> fontVariantFromStyle(const RenderStyle& style)
</span><span class="lines">@@ -2550,7 +2553,7 @@
</span><span class="cx"> return CSSFontValue::create();
</span><span class="cx">
</span><span class="cx"> if (auto italic = fontStyleKeyword(fontDescription.italic()))
</span><del>- computedFont->style = CSSValuePool::singleton().createIdentifierValue(italic.value());
</del><ins>+ computedFont->style = CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(italic.value()));
</ins><span class="cx"> else
</span><span class="cx"> return CSSFontValue::create();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFace.cpp (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFace.cpp        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/css/CSSFontFace.cpp        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -31,6 +31,8 @@
</span><span class="cx"> #include "CSSFontFamily.h"
</span><span class="cx"> #include "CSSFontFeatureValue.h"
</span><span class="cx"> #include "CSSFontSelector.h"
</span><ins>+#include "CSSFontStyleRangeValue.h"
+#include "CSSFontStyleValue.h"
</ins><span class="cx"> #include "CSSPrimitiveValueMappings.h"
</span><span class="cx"> #include "CSSSegmentedFontFace.h"
</span><span class="cx"> #include "CSSUnicodeRangeValue.h"
</span><span class="lines">@@ -43,6 +45,7 @@
</span><span class="cx"> #include "FontVariantBuilder.h"
</span><span class="cx"> #include "RuntimeEnabledFeatures.h"
</span><span class="cx"> #include "Settings.h"
</span><ins>+#include "StyleBuilderConverter.h"
</ins><span class="cx"> #include "StyleProperties.h"
</span><span class="cx"> #include "StyleRule.h"
</span><span class="cx">
</span><span class="lines">@@ -135,28 +138,14 @@
</span><span class="cx"> ASSERT(valueList.item(1)->isPrimitiveValue());
</span><span class="cx"> auto& value0 = downcast<CSSPrimitiveValue>(*valueList.item(0));
</span><span class="cx"> auto& value1 = downcast<CSSPrimitiveValue>(*valueList.item(1));
</span><del>- ASSERT(value0.isNumber());
- ASSERT(value1.isNumber());
- return { FontSelectionValue::clampFloat(value0.floatValue()), FontSelectionValue::clampFloat(value1.floatValue()) };
</del><ins>+ auto result0 = StyleBuilderConverter::convertFontWeightFromValue(value0);
+ auto result1 = StyleBuilderConverter::convertFontWeightFromValue(value1);
+ return { result0, result1 };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ASSERT(is<CSSPrimitiveValue>(value));
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>-
- FontSelectionValue result;
- if (primitiveValue.isNumber()) {
- result = FontSelectionValue::clampFloat(primitiveValue.floatValue());
- return { result, result };
- }
-
- ASSERT(primitiveValue.isValueID());
- if (auto value = fontWeightValue(primitiveValue.valueID()))
- result = value.value();
- else {
- ASSERT_NOT_REACHED();
- result = normalWeightValue();
- }
-
</del><ins>+ FontSelectionValue result = StyleBuilderConverter::convertFontWeightFromValue(primitiveValue);
</ins><span class="cx"> return { result, result };
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -184,28 +173,14 @@
</span><span class="cx"> ASSERT(valueList.item(1)->isPrimitiveValue());
</span><span class="cx"> auto& value0 = downcast<CSSPrimitiveValue>(*valueList.item(0));
</span><span class="cx"> auto& value1 = downcast<CSSPrimitiveValue>(*valueList.item(1));
</span><del>- ASSERT(value0.isPercentage() || value0.isNumber());
- ASSERT(value1.isPercentage() || value1.isNumber());
- return { FontSelectionValue::clampFloat(value0.floatValue()), FontSelectionValue::clampFloat(value1.floatValue()) };
</del><ins>+ auto result0 = StyleBuilderConverter::convertFontStretchFromValue(value0);
+ auto result1 = StyleBuilderConverter::convertFontStretchFromValue(value1);
+ return { result0, result1 };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ASSERT(is<CSSPrimitiveValue>(value));
</span><span class="cx"> const auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>-
- FontSelectionValue result;
- if (primitiveValue.isPercentage() || primitiveValue.isNumber()) {
- result = FontSelectionValue::clampFloat(primitiveValue.floatValue());
- return { result, result };
- }
-
- ASSERT(primitiveValue.isValueID());
- if (auto value = fontStretchValue(primitiveValue.valueID()))
- result = value.value();
- else {
- ASSERT_NOT_REACHED();
- result = normalStretchValue();
- }
-
</del><ins>+ FontSelectionValue result = StyleBuilderConverter::convertFontStretchFromValue(primitiveValue);
</ins><span class="cx"> return { result, result };
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -224,37 +199,34 @@
</span><span class="cx">
</span><span class="cx"> static FontSelectionRange calculateItalicRange(CSSValue& value)
</span><span class="cx"> {
</span><del>- if (value.isValueList()) {
- auto& valueList = downcast<CSSValueList>(value);
- ASSERT(valueList.length() == 2);
- if (valueList.length() != 2)
</del><ins>+ if (value.isFontStyleValue()) {
+ auto result = StyleBuilderConverter::convertFontStyleFromValue(value);
+ return { result, result };
+ }
+
+ ASSERT(value.isFontStyleRangeValue());
+ auto& rangeValue = downcast<CSSFontStyleRangeValue>(value);
+ ASSERT(rangeValue.fontStyleValue->isValueID());
+ auto valueID = rangeValue.fontStyleValue->valueID();
+ if (!rangeValue.obliqueValues) {
+ if (valueID == CSSValueNormal)
</ins><span class="cx"> return { normalItalicValue(), normalItalicValue() };
</span><del>- ASSERT(valueList.item(0)->isPrimitiveValue());
- ASSERT(valueList.item(1)->isPrimitiveValue());
- auto& value0 = downcast<CSSPrimitiveValue>(*valueList.item(0));
- auto& value1 = downcast<CSSPrimitiveValue>(*valueList.item(1));
- ASSERT(value0.isAngle() || value0.isNumber() || value0.isCalculated());
- ASSERT(value1.isAngle() || value1.isNumber() || value1.isCalculated());
- return { FontSelectionValue::clampFloat(value0.floatValue(CSSPrimitiveValue::CSS_DEG)), FontSelectionValue::clampFloat(value1.floatValue(CSSPrimitiveValue::CSS_DEG)) };
</del><ins>+ ASSERT(valueID == CSSValueItalic || valueID == CSSValueOblique);
+ return { italicValue(), italicValue() };
</ins><span class="cx"> }
</span><del>-
- ASSERT(is<CSSPrimitiveValue>(value));
- const auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
-
- FontSelectionValue result;
- if (primitiveValue.isAngle() || primitiveValue.isNumber() || primitiveValue.isCalculated()) {
- result = FontSelectionValue::clampFloat(primitiveValue.floatValue(CSSPrimitiveValue::CSS_DEG));
</del><ins>+ ASSERT(valueID == CSSValueOblique);
+ auto length = rangeValue.obliqueValues->length();
+ if (length == 1) {
+ auto& primitiveValue = downcast<CSSPrimitiveValue>(*rangeValue.obliqueValues->item(0));
+ FontSelectionValue result(primitiveValue.value<float>(CSSPrimitiveValue::CSS_DEG));
</ins><span class="cx"> return { result, result };
</span><span class="cx"> }
</span><del>-
- ASSERT(primitiveValue.isValueID());
- if (auto value = fontStyleValue(primitiveValue.valueID()))
- result = value.value();
- else {
- ASSERT_NOT_REACHED();
- result = normalItalicValue();
- }
- return { result, result };
</del><ins>+ ASSERT(length == 2);
+ auto& primitiveValue1 = downcast<CSSPrimitiveValue>(*rangeValue.obliqueValues->item(0));
+ auto& primitiveValue2 = downcast<CSSPrimitiveValue>(*rangeValue.obliqueValues->item(1));
+ FontSelectionValue result1(primitiveValue1.value<float>(CSSPrimitiveValue::CSS_DEG));
+ FontSelectionValue result2(primitiveValue2.value<float>(CSSPrimitiveValue::CSS_DEG));
+ return { result1, result2 };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSFontFace::setStyle(CSSValue& style)
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceSet.cpp (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceSet.cpp        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/css/CSSFontFaceSet.cpp        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include "CSSFontFaceSource.h"
</span><span class="cx"> #include "CSSFontFamily.h"
</span><span class="cx"> #include "CSSFontSelector.h"
</span><ins>+#include "CSSFontStyleValue.h"
</ins><span class="cx"> #include "CSSParser.h"
</span><span class="cx"> #include "CSSPrimitiveValue.h"
</span><span class="cx"> #include "CSSSegmentedFontFace.h"
</span><span class="lines">@@ -36,6 +37,7 @@
</span><span class="cx"> #include "CSSValuePool.h"
</span><span class="cx"> #include "ExceptionCode.h"
</span><span class="cx"> #include "FontCache.h"
</span><ins>+#include "StyleBuilderConverter.h"
</ins><span class="cx"> #include "StyleProperties.h"
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -286,91 +288,25 @@
</span><span class="cx"> return m_faces[i];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static std::optional<FontSelectionValue> calculateWeightValue(CSSValue& weight)
</del><ins>+static FontSelectionRequest computeFontSelectionRequest(MutableStyleProperties& style)
</ins><span class="cx"> {
</span><del>- if (!is<CSSPrimitiveValue>(weight))
- return std::nullopt;
-
- auto& primitiveWeight = downcast<CSSPrimitiveValue>(weight);
- if (primitiveWeight.isNumber())
- return FontSelectionValue::clampFloat(primitiveWeight.floatValue());
-
- if (!primitiveWeight.isValueID())
- return std::nullopt;
-
- if (auto value = fontWeightValue(primitiveWeight.valueID()))
- return value.value();
- ASSERT_NOT_REACHED();
- return normalWeightValue();
-}
-
-static std::optional<FontSelectionValue> calculateStretchValue(CSSValue& style)
-{
- if (!is<CSSPrimitiveValue>(style))
- return std::nullopt;
-
- auto& primitiveStretch = downcast<CSSPrimitiveValue>(style);
- if (primitiveStretch.isNumber() || primitiveStretch.isPercentage())
- return FontSelectionValue::clampFloat(primitiveStretch.floatValue());
-
- if (!primitiveStretch.isValueID())
- return std::nullopt;
-
- if (auto value = fontStretchValue(primitiveStretch.valueID()))
- return value.value();
- return normalStretchValue();
-}
-
-static std::optional<FontSelectionValue> calculateStyleValue(CSSValue& style)
-{
- if (!is<CSSPrimitiveValue>(style))
- return std::nullopt;
-
- auto& primitiveSlant = downcast<CSSPrimitiveValue>(style);
- if (primitiveSlant.isNumber() || primitiveSlant.isAngle())
- return FontSelectionValue::clampFloat(primitiveSlant.floatValue());
-
- if (!primitiveSlant.isValueID())
- return std::nullopt;
-
- if (auto value = fontStyleValue(downcast<CSSPrimitiveValue>(style).valueID()))
- return value.value();
- return normalItalicValue();
-}
-
-static std::optional<FontSelectionRequest> computeFontSelectionRequest(MutableStyleProperties& style)
-{
</del><span class="cx"> RefPtr<CSSValue> weightValue = style.getPropertyCSSValue(CSSPropertyFontWeight).get();
</span><span class="cx"> if (!weightValue)
</span><span class="cx"> weightValue = CSSValuePool::singleton().createIdentifierValue(CSSValueNormal).ptr();
</span><span class="cx">
</span><del>- FontSelectionValue weightSelectionValue;
- if (auto weightOptional = calculateWeightValue(*weightValue))
- weightSelectionValue = weightOptional.value();
- else
- return std::nullopt;
-
</del><span class="cx"> RefPtr<CSSValue> stretchValue = style.getPropertyCSSValue(CSSPropertyFontStretch).get();
</span><span class="cx"> if (!stretchValue)
</span><span class="cx"> stretchValue = CSSValuePool::singleton().createIdentifierValue(CSSValueNormal).ptr();
</span><span class="cx">
</span><del>- FontSelectionValue stretchSelectionValue;
- if (auto stretchOptional = calculateStretchValue(*weightValue))
- stretchSelectionValue = stretchOptional.value();
- else
- return std::nullopt;
-
</del><span class="cx"> RefPtr<CSSValue> styleValue = style.getPropertyCSSValue(CSSPropertyFontStyle).get();
</span><span class="cx"> if (!styleValue)
</span><del>- styleValue = CSSValuePool::singleton().createIdentifierValue(CSSValueNormal).ptr();
</del><ins>+ styleValue = CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueNormal));
</ins><span class="cx">
</span><del>- FontSelectionValue styleSelectionValue;
- if (auto styleOptional = calculateStyleValue(*styleValue))
- styleSelectionValue = styleOptional.value();
- else
- return std::nullopt;
</del><ins>+ FontSelectionValue weightSelectionValue = StyleBuilderConverter::convertFontWeightFromValue(*weightValue);
+ FontSelectionValue stretchSelectionValue = StyleBuilderConverter::convertFontStretchFromValue(*stretchValue);
+ FontSelectionValue styleSelectionValue = StyleBuilderConverter::convertFontStyleFromValue(*styleValue);
</ins><span class="cx">
</span><del>- return {{ weightSelectionValue, stretchSelectionValue, styleSelectionValue }};
</del><ins>+ return { weightSelectionValue, stretchSelectionValue, styleSelectionValue };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static HashSet<UChar32> codePointsFromString(StringView stringView)
</span><span class="lines">@@ -396,11 +332,7 @@
</span><span class="cx"> if (parseResult == CSSParser::ParseResult::Error)
</span><span class="cx"> return Exception { SYNTAX_ERR };
</span><span class="cx">
</span><del>- FontSelectionRequest request;
- if (auto fontSelectionRequestOptional = computeFontSelectionRequest(style.get()))
- request = fontSelectionRequestOptional.value();
- else
- return Exception { SYNTAX_ERR };
</del><ins>+ FontSelectionRequest request = computeFontSelectionRequest(style.get());
</ins><span class="cx">
</span><span class="cx"> auto family = style->getPropertyCSSValue(CSSPropertyFontFamily);
</span><span class="cx"> if (!is<CSSValueList>(family.get()))
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceSeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceSet.h (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceSet.h        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/css/CSSFontFaceSet.h        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -52,6 +52,10 @@
</span><span class="cx"> }
</span><span class="cx"> ~CSSFontFaceSet();
</span><span class="cx">
</span><ins>+ static FontSelectionValue convertFontWeightFromValue(const CSSValue&);
+ static FontSelectionValue convertFontStretchFromValue(const CSSValue&);
+ static FontSelectionValue convertFontStyleFromValue(const CSSValue&);
+
</ins><span class="cx"> void addClient(CSSFontFaceSetClient&);
</span><span class="cx"> void removeClient(CSSFontFaceSetClient&);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontSelector.cpp        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -33,6 +33,8 @@
</span><span class="cx"> #include "CSSFontFaceSource.h"
</span><span class="cx"> #include "CSSFontFamily.h"
</span><span class="cx"> #include "CSSFontFeatureValue.h"
</span><ins>+#include "CSSFontStyleRangeValue.h"
+#include "CSSFontStyleValue.h"
</ins><span class="cx"> #include "CSSPrimitiveValue.h"
</span><span class="cx"> #include "CSSPrimitiveValueMappings.h"
</span><span class="cx"> #include "CSSPropertyNames.h"
</span><span class="lines">@@ -163,7 +165,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (!fontStyle)
</span><del>- fontStyle = CSSValuePool::singleton().createIdentifierValue(CSSValueNormal).ptr();
</del><ins>+ fontStyle = CSSFontStyleRangeValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueNormal));
</ins><span class="cx">
</span><span class="cx"> if (!fontWeight)
</span><span class="cx"> fontWeight = CSSValuePool::singleton().createIdentifierValue(CSSValueNormal);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontStyleRangeValuecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/CSSFontStyleRangeValue.cpp (0 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontStyleRangeValue.cpp         (rev 0)
+++ trunk/Source/WebCore/css/CSSFontStyleRangeValue.cpp        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "CSSFontStyleRangeValue.h"
+
+#include <wtf/text/StringBuilder.h>
+
+namespace WebCore {
+
+String CSSFontStyleRangeValue::customCSSText() const
+{
+ if (!obliqueValues)
+ return fontStyleValue->cssText();
+
+ StringBuilder builder;
+ builder.append(fontStyleValue->cssText());
+ builder.append(" ");
+ builder.append(obliqueValues->cssText());
+ return builder.toString();
+}
+
+bool CSSFontStyleRangeValue::equals(const CSSFontStyleRangeValue& other) const
+{
+ if (!obliqueValues)
+ return fontStyleValue.get() == other.fontStyleValue.get();
+ return fontStyleValue.get() == other.fontStyleValue.get()
+ && *obliqueValues == *other.obliqueValues;
+}
+
+}
</ins><span class="cx">Property changes on: trunk/Source/WebCore/css/CSSFontStyleRangeValue.cpp
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkSourceWebCorecssCSSFontStyleRangeValueh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/CSSFontStyleRangeValue.h (0 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontStyleRangeValue.h         (rev 0)
+++ trunk/Source/WebCore/css/CSSFontStyleRangeValue.h        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "CSSPrimitiveValue.h"
+#include "CSSValue.h"
+#include "CSSValueList.h"
+#include "FontSelectionAlgorithm.h"
+
+namespace WebCore {
+
+class CSSFontStyleRangeValue final : public CSSValue {
+public:
+ static Ref<CSSFontStyleRangeValue> create(Ref<CSSPrimitiveValue>&& fontStyleValue)
+ {
+ return adoptRef(*new CSSFontStyleRangeValue(WTFMove(fontStyleValue), nullptr));
+ }
+ static Ref<CSSFontStyleRangeValue> create(Ref<CSSPrimitiveValue>&& fontStyleValue, RefPtr<CSSValueList>&& obliqueValues)
+ {
+ return adoptRef(*new CSSFontStyleRangeValue(WTFMove(fontStyleValue), WTFMove(obliqueValues)));
+ }
+
+ String customCSSText() const;
+
+ bool equals(const CSSFontStyleRangeValue&) const;
+
+ Ref<CSSPrimitiveValue> fontStyleValue;
+ RefPtr<CSSValueList> obliqueValues;
+
+private:
+ CSSFontStyleRangeValue(Ref<CSSPrimitiveValue>&& fontStyleValue, RefPtr<CSSValueList>&& obliqueValues)
+ : CSSValue(FontStyleRangeClass)
+ , fontStyleValue(WTFMove(fontStyleValue))
+ , obliqueValues(WTFMove(obliqueValues))
+ {
+ }
+};
+
+}
+
+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSFontStyleRangeValue, isFontStyleRangeValue())
</ins><span class="cx">Property changes on: trunk/Source/WebCore/css/CSSFontStyleRangeValue.h
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Author Date Id Rev URL
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkSourceWebCorecssCSSFontStyleValuecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/CSSFontStyleValue.cpp (0 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontStyleValue.cpp         (rev 0)
+++ trunk/Source/WebCore/css/CSSFontStyleValue.cpp        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "CSSFontStyleValue.h"
+
+#include <wtf/text/StringBuilder.h>
+
+namespace WebCore {
+
+String CSSFontStyleValue::customCSSText() const
+{
+ if (!obliqueValue)
+ return fontStyleValue->cssText();
+
+ StringBuilder builder;
+ builder.append(fontStyleValue->cssText());
+ builder.append(" ");
+ builder.append(obliqueValue->cssText());
+ return builder.toString();
+}
+
+bool CSSFontStyleValue::equals(const CSSFontStyleValue& other) const
+{
+ if (!obliqueValue)
+ return fontStyleValue.get() == other.fontStyleValue.get();
+ return fontStyleValue.get() == other.fontStyleValue.get()
+ && *obliqueValue == *other.obliqueValue;
+}
+
+}
</ins><span class="cx">Property changes on: trunk/Source/WebCore/css/CSSFontStyleValue.cpp
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkSourceWebCorecssCSSFontStyleValueh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/CSSFontStyleValue.h (0 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontStyleValue.h         (rev 0)
+++ trunk/Source/WebCore/css/CSSFontStyleValue.h        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -0,0 +1,72 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "CSSPrimitiveValue.h"
+#include "CSSValue.h"
+#include "FontSelectionAlgorithm.h"
+
+namespace WebCore {
+
+class CSSFontStyleValue final : public CSSValue {
+public:
+ static Ref<CSSFontStyleValue> create(Ref<CSSPrimitiveValue>&& fontStyleValue)
+ {
+ return adoptRef(*new CSSFontStyleValue(WTFMove(fontStyleValue), nullptr));
+ }
+ static Ref<CSSFontStyleValue> create(Ref<CSSPrimitiveValue>&& fontStyleValue, RefPtr<CSSPrimitiveValue>&& obliqueValue)
+ {
+ return adoptRef(*new CSSFontStyleValue(WTFMove(fontStyleValue), WTFMove(obliqueValue)));
+ }
+
+ String customCSSText() const;
+
+ bool equals(const CSSFontStyleValue&) const;
+
+ bool isItalic() const
+ {
+ if (!obliqueValue) {
+ auto valueID = fontStyleValue->valueID();
+ return valueID == CSSValueItalic || CSSValueOblique;
+ }
+ return obliqueValue->value<float>(CSSPrimitiveValue::CSS_DEG) >= static_cast<float>(italicValue());
+ }
+
+ Ref<CSSPrimitiveValue> fontStyleValue;
+ RefPtr<CSSPrimitiveValue> obliqueValue;
+
+private:
+ CSSFontStyleValue(Ref<CSSPrimitiveValue>&& fontStyleValue, RefPtr<CSSPrimitiveValue>&& obliqueValue)
+ : CSSValue(FontStyleClass)
+ , fontStyleValue(WTFMove(fontStyleValue))
+ , obliqueValue(WTFMove(obliqueValue))
+ {
+ }
+};
+
+}
+
+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSFontStyleValue, isFontStyleValue())
</ins><span class="cx">Property changes on: trunk/Source/WebCore/css/CSSFontStyleValue.h
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Author Date Id Rev URL
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkSourceWebCorecssCSSFontValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontValue.cpp (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontValue.cpp        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/css/CSSFontValue.cpp        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -20,6 +20,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "CSSFontValue.h"
</span><span class="cx">
</span><ins>+#include "CSSFontStyleValue.h"
</ins><span class="cx"> #include "CSSPrimitiveValue.h"
</span><span class="cx"> #include "CSSValueList.h"
</span><span class="cx"> #include <wtf/text/StringBuilder.h>
</span><span class="lines">@@ -44,7 +45,7 @@
</span><span class="cx"> result.append(' ');
</span><span class="cx"> result.append(weight->cssText());
</span><span class="cx"> }
</span><del>- if (weight) {
</del><ins>+ if (stretch) {
</ins><span class="cx"> if (!result.isEmpty())
</span><span class="cx"> result.append(' ');
</span><span class="cx"> result.append(stretch->cssText());
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontValue.h (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontValue.h        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/css/CSSFontValue.h        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -20,6 +20,7 @@
</span><span class="cx">
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><ins>+#include "CSSFontStyleValue.h"
</ins><span class="cx"> #include "CSSValue.h"
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx">
</span><span class="lines">@@ -39,7 +40,7 @@
</span><span class="cx">
</span><span class="cx"> bool equals(const CSSFontValue&) const;
</span><span class="cx">
</span><del>- RefPtr<CSSPrimitiveValue> style;
</del><ins>+ RefPtr<CSSFontStyleValue> style;
</ins><span class="cx"> RefPtr<CSSPrimitiveValue> variant;
</span><span class="cx"> RefPtr<CSSPrimitiveValue> weight;
</span><span class="cx"> RefPtr<CSSPrimitiveValue> stretch;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.cpp (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.cpp        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/css/CSSValue.cpp        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -41,6 +41,8 @@
</span><span class="cx"> #include "CSSFilterImageValue.h"
</span><span class="cx"> #include "CSSFontFaceSrcValue.h"
</span><span class="cx"> #include "CSSFontFeatureValue.h"
</span><ins>+#include "CSSFontStyleRangeValue.h"
+#include "CSSFontStyleValue.h"
</ins><span class="cx"> #include "CSSFontValue.h"
</span><span class="cx"> #include "CSSFontVariationValue.h"
</span><span class="cx"> #include "CSSFunctionValue.h"
</span><span class="lines">@@ -206,6 +208,10 @@
</span><span class="cx"> return compareCSSValues<CSSVariableReferenceValue>(*this, other);
</span><span class="cx"> case PendingSubstitutionValueClass:
</span><span class="cx"> return compareCSSValues<CSSPendingSubstitutionValue>(*this, other);
</span><ins>+ case FontStyleClass:
+ return compareCSSValues<CSSFontStyleValue>(*this, other);
+ case FontStyleRangeClass:
+ return compareCSSValues<CSSFontStyleRangeValue>(*this, other);
</ins><span class="cx"> default:
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return false;
</span><span class="lines">@@ -302,6 +308,10 @@
</span><span class="cx"> return downcast<CSSVariableReferenceValue>(*this).customCSSText();
</span><span class="cx"> case PendingSubstitutionValueClass:
</span><span class="cx"> return downcast<CSSPendingSubstitutionValue>(*this).customCSSText();
</span><ins>+ case FontStyleClass:
+ return downcast<CSSFontStyleValue>(*this).customCSSText();
+ case FontStyleRangeClass:
+ return downcast<CSSFontStyleRangeValue>(*this).customCSSText();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -432,6 +442,12 @@
</span><span class="cx"> case PendingSubstitutionValueClass:
</span><span class="cx"> delete downcast<CSSPendingSubstitutionValue>(this);
</span><span class="cx"> return;
</span><ins>+ case FontStyleClass:
+ delete downcast<CSSFontStyleValue>(this);
+ return;
+ case FontStyleRangeClass:
+ delete downcast<CSSFontStyleRangeValue>(this);
+ return;
</ins><span class="cx"> }
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.h (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.h        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/css/CSSValue.h        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -79,6 +79,8 @@
</span><span class="cx"> #endif
</span><span class="cx"> bool isFontFaceSrcValue() const { return m_classType == FontFaceSrcClass; }
</span><span class="cx"> bool isFontValue() const { return m_classType == FontClass; }
</span><ins>+ bool isFontStyleValue() const { return m_classType == FontStyleClass; }
+ bool isFontStyleRangeValue() const { return m_classType == FontStyleRangeClass; }
</ins><span class="cx"> bool isImageGeneratorValue() const { return m_classType >= CanvasClass && m_classType <= RadialGradientClass; }
</span><span class="cx"> bool isGradientValue() const { return m_classType >= LinearGradientClass && m_classType <= RadialGradientClass; }
</span><span class="cx"> bool isNamedImageValue() const { return m_classType == NamedImageClass; }
</span><span class="lines">@@ -155,6 +157,8 @@
</span><span class="cx"> FontVariationClass,
</span><span class="cx"> #endif
</span><span class="cx"> FontClass,
</span><ins>+ FontStyleClass,
+ FontStyleRangeClass,
</ins><span class="cx"> FontFaceSrcClass,
</span><span class="cx"> FunctionClass,
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssFontFacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontFace.cpp (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontFace.cpp        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/css/FontFace.cpp        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -305,7 +305,7 @@
</span><span class="cx"> return String::format("oblique %fdeg", static_cast<float>(style.minimum));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return String::format("oblique %fdeg-%fdeg", static_cast<float>(style.minimum), static_cast<float>(style.maximum));
</del><ins>+ return String::format("oblique %fdeg %fdeg", static_cast<float>(style.minimum), static_cast<float>(style.maximum));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String FontFace::weight() const
</span><span class="lines">@@ -328,7 +328,7 @@
</span><span class="cx"> return String::format("%f", static_cast<float>(weight.minimum));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return String::format("%f-%f", static_cast<float>(weight.minimum), static_cast<float>(weight.maximum));
</del><ins>+ return String::format("%f %f", static_cast<float>(weight.minimum), static_cast<float>(weight.maximum));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String FontFace::stretch() const
</span><span class="lines">@@ -365,7 +365,7 @@
</span><span class="cx"> return String::format("%f%%", static_cast<float>(stretch.minimum));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return String::format("%f%%-%f%%", static_cast<float>(stretch.minimum), static_cast<float>(stretch.maximum));
</del><ins>+ return String::format("%f%% %f%%", static_cast<float>(stretch.minimum), static_cast<float>(stretch.maximum));
</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 (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "CSSCalculationValue.h"
</span><span class="cx"> #include "CSSContentDistributionValue.h"
</span><span class="cx"> #include "CSSFontFeatureValue.h"
</span><ins>+#include "CSSFontStyleValue.h"
</ins><span class="cx"> #include "CSSFontVariationValue.h"
</span><span class="cx"> #include "CSSFunctionValue.h"
</span><span class="cx"> #include "CSSGridAutoRepeatValue.h"
</span><span class="lines">@@ -39,6 +40,7 @@
</span><span class="cx"> #include "CSSImageSetValue.h"
</span><span class="cx"> #include "CSSImageValue.h"
</span><span class="cx"> #include "CSSPrimitiveValue.h"
</span><ins>+#include "CSSPrimitiveValueMappings.h"
</ins><span class="cx"> #include "CSSReflectValue.h"
</span><span class="cx"> #include "FontSelectionValueInlines.h"
</span><span class="cx"> #include "Frame.h"
</span><span class="lines">@@ -115,6 +117,9 @@
</span><span class="cx"> static bool convertOverflowScrolling(StyleResolver&, const CSSValue&);
</span><span class="cx"> #endif
</span><span class="cx"> static FontFeatureSettings convertFontFeatureSettings(StyleResolver&, const CSSValue&);
</span><ins>+ static FontSelectionValue convertFontWeightFromValue(const CSSValue&);
+ static FontSelectionValue convertFontStretchFromValue(const CSSValue&);
+ static FontSelectionValue convertFontStyleFromValue(const CSSValue&);
</ins><span class="cx"> static FontSelectionValue convertFontWeight(StyleResolver&, const CSSValue&);
</span><span class="cx"> static FontSelectionValue convertFontStretch(StyleResolver&, const CSSValue&);
</span><span class="cx"> static FontSelectionValue convertFontStyle(StyleResolver&, const CSSValue&);
</span><span class="lines">@@ -1160,7 +1165,7 @@
</span><span class="cx"> return settings;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline FontSelectionValue StyleBuilderConverter::convertFontWeight(StyleResolver& styleResolver, const CSSValue& value)
</del><ins>+inline FontSelectionValue StyleBuilderConverter::convertFontWeightFromValue(const CSSValue& value)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(is<CSSPrimitiveValue>(value));
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="lines">@@ -1173,11 +1178,10 @@
</span><span class="cx"> case CSSValueNormal:
</span><span class="cx"> return normalWeightValue();
</span><span class="cx"> case CSSValueBold:
</span><ins>+ case CSSValueBolder:
</ins><span class="cx"> return boldWeightValue();
</span><del>- case CSSValueBolder:
- return FontCascadeDescription::bolderWeight(styleResolver.parentStyle()->fontDescription().weight());
</del><span class="cx"> case CSSValueLighter:
</span><del>- return FontCascadeDescription::lighterWeight(styleResolver.parentStyle()->fontDescription().weight());
</del><ins>+ return lightWeightValue();
</ins><span class="cx"> default:
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return normalWeightValue();
</span><span class="lines">@@ -1184,7 +1188,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline FontSelectionValue StyleBuilderConverter::convertFontStretch(StyleResolver&, const CSSValue& value)
</del><ins>+inline FontSelectionValue StyleBuilderConverter::convertFontStretchFromValue(const CSSValue& value)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(is<CSSPrimitiveValue>(value));
</span><span class="cx"> const auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="lines">@@ -1199,19 +1203,44 @@
</span><span class="cx"> return normalStretchValue();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline FontSelectionValue StyleBuilderConverter::convertFontStyle(StyleResolver&, const CSSValue& value)
</del><ins>+inline FontSelectionValue StyleBuilderConverter::convertFontStyleFromValue(const CSSValue& value)
</ins><span class="cx"> {
</span><ins>+ ASSERT(is<CSSFontStyleValue>(value));
+ const auto& fontStyleValue = downcast<CSSFontStyleValue>(value);
+
+ auto valueID = fontStyleValue.fontStyleValue->valueID();
+ if (valueID == CSSValueNormal)
+ return normalItalicValue();
+ if (valueID == CSSValueItalic)
+ return italicValue();
+ ASSERT(valueID == CSSValueOblique);
+ if (auto* obliqueValue = fontStyleValue.obliqueValue.get())
+ return FontSelectionValue(obliqueValue->value<float>(CSSPrimitiveValue::CSS_DEG));
+ return italicValue();
+}
+
+inline FontSelectionValue StyleBuilderConverter::convertFontWeight(StyleResolver& styleResolver, const CSSValue& value)
+{
</ins><span class="cx"> ASSERT(is<CSSPrimitiveValue>(value));
</span><del>- const auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</del><ins>+ auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
+ if (primitiveValue.isValueID()) {
+ auto valueID = primitiveValue.valueID();
+ if (valueID == CSSValueBolder)
+ return FontCascadeDescription::bolderWeight(styleResolver.parentStyle()->fontDescription().weight());
+ if (valueID == CSSValueLighter)
+ return FontCascadeDescription::lighterWeight(styleResolver.parentStyle()->fontDescription().weight());
+ }
+ return convertFontWeightFromValue(value);
+}
</ins><span class="cx">
</span><del>- if (primitiveValue.isAngle() || primitiveValue.isNumber() || primitiveValue.isCalculated())
- return FontSelectionValue::clampFloat(primitiveValue.floatValue(CSSPrimitiveValue::CSS_DEG));
</del><ins>+inline FontSelectionValue StyleBuilderConverter::convertFontStretch(StyleResolver&, const CSSValue& value)
+{
+ return convertFontStretchFromValue(value);
+}
</ins><span class="cx">
</span><del>- ASSERT(primitiveValue.isValueID());
- if (auto value = fontStyleValue(primitiveValue.valueID()))
- return value.value();
- ASSERT_NOT_REACHED();
- return normalItalicValue();
</del><ins>+inline FontSelectionValue StyleBuilderConverter::convertFontStyle(StyleResolver&, const CSSValue& value)
+{
+ return convertFontStyleFromValue(value);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(VARIATION_FONTS)
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -45,6 +45,8 @@
</span><span class="cx"> #if ENABLE(VARIATION_FONTS)
</span><span class="cx"> #include "CSSFontVariationValue.h"
</span><span class="cx"> #endif
</span><ins>+#include "CSSFontStyleRangeValue.h"
+#include "CSSFontStyleValue.h"
</ins><span class="cx"> #include "CSSFunctionValue.h"
</span><span class="cx"> #include "CSSGridAutoRepeatValue.h"
</span><span class="cx"> #include "CSSGridLineNamesValue.h"
</span><span class="lines">@@ -960,66 +962,70 @@
</span><span class="cx"> return consumeIdent<CSSValueNormal, CSSValueItalic, CSSValueOblique>(range);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static RefPtr<CSSPrimitiveValue> consumeFontStyle(CSSParserTokenRange& range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr<CSSFontStyleValue> consumeFontStyle(CSSParserTokenRange& range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><del>- if (auto result = consumeFontStyleKeywordValue(range)) {
- if (result->valueID() == CSSValueOblique) {
- if (range.atEnd())
- return result;
- if (auto angle = consumeAngle(range, cssParserMode))
- return angle;
- if (auto number = consumeNumber(range, ValueRangeAll))
- return number;
- }
- return result;
- }
- return nullptr;
</del><ins>+ auto result = consumeFontStyleKeywordValue(range);
+ if (!result)
+ return nullptr;
+
+ if (result->valueID() == CSSValueNormal)
+ return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueNormal));
+ if (result->valueID() == CSSValueItalic)
+ return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueItalic));
+ ASSERT(result->valueID() == CSSValueOblique);
+ if (range.atEnd())
+ return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique));
+ if (auto angle = consumeAngle(range, cssParserMode))
+ return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique), WTFMove(angle));
+ if (auto number = consumeNumber(range, ValueRangeAll))
+ return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique), CSSValuePool::singleton().createValue(number->value<double>(), CSSPrimitiveValue::CSS_DEG));
+ return CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueOblique));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(VARIATION_FONTS)
</span><del>-static RefPtr<CSSValue> consumeFontStyleRange(CSSParserTokenRange& range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr<CSSFontStyleRangeValue> consumeFontStyleRange(CSSParserTokenRange& range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><del>- if (auto result = consumeFontStyleKeywordValue(range)) {
- if (result->valueID() == CSSValueOblique) {
- if (range.atEnd())
- return result;
</del><ins>+ auto keyword = consumeFontStyleKeywordValue(range);
+ if (!keyword)
+ return nullptr;
</ins><span class="cx">
</span><del>- if (auto firstAngle = consumeAngle(range, cssParserMode)) {
- if (range.atEnd())
- return firstAngle;
- if (!consumeSlashIncludingWhitespace(range))
- return nullptr;
- auto secondAngle = consumeAngle(range, cssParserMode);
- if (!secondAngle)
- return nullptr;
- if (firstAngle->floatValue(CSSPrimitiveValue::CSS_DEG) > secondAngle->floatValue(CSSPrimitiveValue::CSS_DEG))
- return nullptr;
- auto result = CSSValueList::createSlashSeparated();
- result->append(firstAngle.releaseNonNull());
- result->append(secondAngle.releaseNonNull());
- return RefPtr<CSSValue>(WTFMove(result));
- }
</del><ins>+ if (keyword->valueID() != CSSValueOblique || range.atEnd())
+ return CSSFontStyleRangeValue::create(keyword.releaseNonNull());
</ins><span class="cx">
</span><del>- 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));
- }
</del><ins>+ if (auto firstAngle = consumeAngle(range, cssParserMode)) {
+ if (range.atEnd()) {
+ auto result = CSSValueList::createSpaceSeparated();
+ result->append(firstAngle.releaseNonNull());
+ return CSSFontStyleRangeValue::create(keyword.releaseNonNull(), WTFMove(result));
+ }
+ auto secondAngle = consumeAngle(range, cssParserMode);
+ if (!secondAngle)
+ return nullptr;
+ if (firstAngle->floatValue(CSSPrimitiveValue::CSS_DEG) > secondAngle->floatValue(CSSPrimitiveValue::CSS_DEG))
+ return nullptr;
+ auto result = CSSValueList::createSpaceSeparated();
+ result->append(firstAngle.releaseNonNull());
+ result->append(secondAngle.releaseNonNull());
+ return CSSFontStyleRangeValue::create(keyword.releaseNonNull(), WTFMove(result));
+ }
</ins><span class="cx">
</span><ins>+ 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)
</ins><span class="cx"> return nullptr;
</span><del>- }
- return result;
</del><ins>+ 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));
</ins><span class="cx"> }
</span><ins>+
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="lines">@@ -4385,7 +4391,7 @@
</span><span class="cx"> if (!fontDescription.isAbsoluteSize())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- addProperty(CSSPropertyFontStyle, CSSPropertyFont, CSSValuePool::singleton().createIdentifierValue(isItalic(fontDescription.italic()) ? CSSValueItalic : CSSValueNormal), important);
</del><ins>+ addProperty(CSSPropertyFontStyle, CSSPropertyFont, CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(isItalic(fontDescription.italic()) ? CSSValueItalic : CSSValueNormal)), important);
</ins><span class="cx"> addProperty(CSSPropertyFontWeight, CSSPropertyFont, CSSValuePool::singleton().createValue(static_cast<float>(fontDescription.weight())), important);
</span><span class="cx"> addProperty(CSSPropertyFontSize, CSSPropertyFont, CSSValuePool::singleton().createValue(fontDescription.specifiedSize(), CSSPrimitiveValue::CSS_PX), important);
</span><span class="cx"> Ref<CSSValueList> fontFamilyList = CSSValueList::createCommaSeparated();
</span><span class="lines">@@ -4409,7 +4415,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx"> // Optional font-style, font-variant, font-stretch and font-weight.
</span><del>- RefPtr<CSSPrimitiveValue> fontStyle;
</del><ins>+ RefPtr<CSSFontStyleValue> fontStyle;
</ins><span class="cx"> RefPtr<CSSPrimitiveValue> fontVariantCaps;
</span><span class="cx"> RefPtr<CSSPrimitiveValue> fontWeight;
</span><span class="cx"> RefPtr<CSSPrimitiveValue> fontStretch;
</span><span class="lines">@@ -4448,8 +4454,11 @@
</span><span class="cx"> bool hasVariant = fontVariantCaps;
</span><span class="cx"> bool hasWeight = fontWeight;
</span><span class="cx"> bool hasStretch = fontStretch;
</span><ins>+
+ if (!fontStyle)
+ fontStyle = CSSFontStyleValue::create(CSSValuePool::singleton().createIdentifierValue(CSSValueNormal));
</ins><span class="cx">
</span><del>- addProperty(CSSPropertyFontStyle, CSSPropertyFont, fontStyle ? fontStyle.releaseNonNull() : CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, !hasStyle);
</del><ins>+ addProperty(CSSPropertyFontStyle, CSSPropertyFont, fontStyle.releaseNonNull(), important, !hasStyle);
</ins><span class="cx"> addProperty(CSSPropertyFontVariantCaps, CSSPropertyFont, fontVariantCaps ? fontVariantCaps.releaseNonNull() : CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, !hasVariant);
</span><span class="cx"> /*
</span><span class="cx"> // FIXME-NEWPARSER: What do we do with these? They aren't part of our fontShorthand().
</span><span class="lines">@@ -4472,9 +4481,8 @@
</span><span class="cx"> if (!lineHeight)
</span><span class="cx"> return false;
</span><span class="cx"> addProperty(CSSPropertyLineHeight, CSSPropertyFont, lineHeight.releaseNonNull(), important);
</span><del>- } else {
</del><ins>+ } else
</ins><span class="cx"> addProperty(CSSPropertyLineHeight, CSSPropertyFont, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, true);
</span><del>- }
</del><span class="cx">
</span><span class="cx"> // Font family must come now.
</span><span class="cx"> RefPtr<CSSValue> parsedFamilyValue = consumeFontFamily(m_range);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditingStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/EditingStyle.cpp (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/EditingStyle.cpp        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/editing/EditingStyle.cpp        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx">
</span><span class="cx"> #include "ApplyStyleCommand.h"
</span><span class="cx"> #include "CSSComputedStyleDeclaration.h"
</span><ins>+#include "CSSFontStyleValue.h"
</ins><span class="cx"> #include "CSSParser.h"
</span><span class="cx"> #include "CSSRuleList.h"
</span><span class="cx"> #include "CSSStyleRule.h"
</span><span class="lines">@@ -142,6 +143,8 @@
</span><span class="cx"> int identifierForStyleProperty(T& style, CSSPropertyID propertyID)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<CSSValue> value = extractPropertyValue(style, propertyID);
</span><ins>+ if (propertyID == CSSPropertyFontStyle && is<CSSFontStyleValue>(value.get()) && downcast<CSSFontStyleValue>(value.get())->isItalic())
+ return CSSValueItalic;
</ins><span class="cx"> if (!is<CSSPrimitiveValue>(value.get()))
</span><span class="cx"> return 0;
</span><span class="cx"> return downcast<CSSPrimitiveValue>(*value).valueID();
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontFaceElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontFaceElement.cpp (214358 => 214359)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontFaceElement.cpp        2017-03-24 18:17:48 UTC (rev 214358)
+++ trunk/Source/WebCore/svg/SVGFontFaceElement.cpp        2017-03-24 18:23:48 UTC (rev 214359)
</span><span class="lines">@@ -65,6 +65,7 @@
</span><span class="cx"> {
</span><span class="cx"> CSSPropertyID propId = cssPropertyIdForSVGAttributeName(name);
</span><span class="cx"> if (propId > 0) {
</span><ins>+ // FIXME: Parse using the @font-face descriptor grammars, not the property grammars.
</ins><span class="cx"> m_fontFaceRule->mutableProperties().setProperty(propId, value, false);
</span><span class="cx"> rebuildFontFace();
</span><span class="cx"> return;
</span></span></pre>
</div>
</div>
</body>
</html>