<!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>[214414] 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/214414">214414</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2017-03-27 09:12:21 -0700 (Mon, 27 Mar 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Make sure animation works for font-weight, font-stretch, and font-style
https://bugs.webkit.org/show_bug.cgi?id=169683
Reviewed by Simon Fraser.
Source/WebCore:
Hook up animation code for FontSelectionValues.
Tests: animations/font-variations/font-stretch.html
animations/font-variations/font-style.html
animations/font-variations/font-weight.html
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setFontWeight):
(WebCore::RenderStyle::setFontStretch):
(WebCore::RenderStyle::setFontItalic):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::fontWeight):
(WebCore::RenderStyle::fontStretch):
(WebCore::RenderStyle::fontItalic):
LayoutTests:
* animations/font-variations/font-stretch-expected.txt: Added.
* animations/font-variations/font-stretch.html: Added.
* animations/font-variations/font-style-expected.txt: Added.
* animations/font-variations/font-style.html: Added.
* animations/font-variations/font-weight-expected.txt: Added.
* animations/font-variations/font-weight.html: Added.
* animations/resources/animation-test-helpers.js:
(compareFontStyle):
(getPropertyValue):
(comparePropertyValue):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsanimationsresourcesanimationtesthelpersjs">trunk/LayoutTests/animations/resources/animation-test-helpers.js</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageanimationCSSPropertyAnimationcpp">trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsanimationsfontvariationsfontstretchexpectedtxt">trunk/LayoutTests/animations/font-variations/font-stretch-expected.txt</a></li>
<li><a href="#trunkLayoutTestsanimationsfontvariationsfontstretchhtml">trunk/LayoutTests/animations/font-variations/font-stretch.html</a></li>
<li><a href="#trunkLayoutTestsanimationsfontvariationsfontstyleexpectedtxt">trunk/LayoutTests/animations/font-variations/font-style-expected.txt</a></li>
<li><a href="#trunkLayoutTestsanimationsfontvariationsfontstylehtml">trunk/LayoutTests/animations/font-variations/font-style.html</a></li>
<li><a href="#trunkLayoutTestsanimationsfontvariationsfontweightexpectedtxt">trunk/LayoutTests/animations/font-variations/font-weight-expected.txt</a></li>
<li><a href="#trunkLayoutTestsanimationsfontvariationsfontweighthtml">trunk/LayoutTests/animations/font-variations/font-weight.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (214413 => 214414)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-03-27 15:43:34 UTC (rev 214413)
+++ trunk/LayoutTests/ChangeLog        2017-03-27 16:12:21 UTC (rev 214414)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2017-03-27 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Make sure animation works for font-weight, font-stretch, and font-style
+ https://bugs.webkit.org/show_bug.cgi?id=169683
+
+ Reviewed by Simon Fraser.
+
+ * animations/font-variations/font-stretch-expected.txt: Added.
+ * animations/font-variations/font-stretch.html: Added.
+ * animations/font-variations/font-style-expected.txt: Added.
+ * animations/font-variations/font-style.html: Added.
+ * animations/font-variations/font-weight-expected.txt: Added.
+ * animations/font-variations/font-weight.html: Added.
+ * animations/resources/animation-test-helpers.js:
+ (compareFontStyle):
+ (getPropertyValue):
+ (comparePropertyValue):
+
</ins><span class="cx"> 2017-03-27 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Make WebSockets work in network process
</span></span></pre></div>
<a id="trunkLayoutTestsanimationsfontvariationsfontstretchexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/font-variations/font-stretch-expected.txt (0 => 214414)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/font-variations/font-stretch-expected.txt         (rev 0)
+++ trunk/LayoutTests/animations/font-variations/font-stretch-expected.txt        2017-03-27 16:12:21 UTC (rev 214414)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+Hello
+PASS - "font-stretch" property for "box" element at 0.5s saw something close to: 159
+PASS - "font-stretch" property for "box" element at 1s saw something close to: 167
+PASS - "font-stretch" property for "box" element at 2s saw something close to: 183
+
</ins></span></pre></div>
<a id="trunkLayoutTestsanimationsfontvariationsfontstretchhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/font-variations/font-stretch.html (0 => 214414)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/font-variations/font-stretch.html         (rev 0)
+++ trunk/LayoutTests/animations/font-variations/font-stretch.html        2017-03-27 16:12:21 UTC (rev 214414)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../resources/animation-test-helpers.js"></script>
+<style>
+
+@keyframes TheAnimation {
+ from {
+ font-stretch: 151%;
+ }
+ to {
+ font-stretch: 199%;
+ }
+}
+
+#box {
+ font-size: 100px;
+ animation-duration: 3s;
+ animation-timing-function: linear;
+}
+</style>
+</head>
+<body>
+<div id="box">Hello</div>
+<div id="result"></div>
+<script>
+var expectedValues = [
+ // [animation-name, time, element-id, property, expected-value, tolerance]
+ ["TheAnimation", 0.5, "box", "font-stretch", "159", 1],
+ ["TheAnimation", 1.0, "box", "font-stretch", "167", 1],
+ ["TheAnimation", 2.0, "box", "font-stretch", "183", 1],
+];
+
+var promises = [];
+
+document.fonts.forEach(function(f) {
+ promises.push(f.loaded);
+});
+
+Promise.all(promises).then(function() {
+ document.getElementById("box").style.animationName = "TheAnimation";
+ runAnimationTest(expectedValues, undefined, undefined, undefined, false, undefined);
+});
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsanimationsfontvariationsfontstyleexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/font-variations/font-style-expected.txt (0 => 214414)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/font-variations/font-style-expected.txt         (rev 0)
+++ trunk/LayoutTests/animations/font-variations/font-style-expected.txt        2017-03-27 16:12:21 UTC (rev 214414)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+Hello
+PASS - "font-style" property for "box" element at 0.5s saw something close to: oblique 32.3666
+PASS - "font-style" property for "box" element at 1s saw something close to: oblique 43.6666
+PASS - "font-style" property for "box" element at 2s saw something close to: oblique 66.3333
+
</ins></span></pre></div>
<a id="trunkLayoutTestsanimationsfontvariationsfontstylehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/font-variations/font-style.html (0 => 214414)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/font-variations/font-style.html         (rev 0)
+++ trunk/LayoutTests/animations/font-variations/font-style.html        2017-03-27 16:12:21 UTC (rev 214414)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../resources/animation-test-helpers.js"></script>
+<style>
+
+@keyframes TheAnimation {
+ from {
+ font-style: oblique 21deg;
+ }
+ to {
+ font-style: oblique 89deg;
+ }
+}
+
+#box {
+ font-size: 100px;
+ animation-duration: 3s;
+ animation-timing-function: linear;
+}
+</style>
+</head>
+<body>
+<div id="box">Hello</div>
+<div id="result"></div>
+<script>
+var expectedValues = [
+ // [animation-name, time, element-id, property, expected-value, tolerance]
+ ["TheAnimation", 0.5, "box", "font-style", "oblique 32.3666", 10],
+ ["TheAnimation", 1.0, "box", "font-style", "oblique 43.6666", 10],
+ ["TheAnimation", 2.0, "box", "font-style", "oblique 66.3333", 10],
+];
+
+var promises = [];
+
+document.fonts.forEach(function(f) {
+ promises.push(f.loaded);
+});
+
+Promise.all(promises).then(function() {
+ document.getElementById("box").style.animationName = "TheAnimation";
+ runAnimationTest(expectedValues, undefined, undefined, undefined, false, undefined);
+});
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsanimationsfontvariationsfontweightexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/font-variations/font-weight-expected.txt (0 => 214414)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/font-variations/font-weight-expected.txt         (rev 0)
+++ trunk/LayoutTests/animations/font-variations/font-weight-expected.txt        2017-03-27 16:12:21 UTC (rev 214414)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+Hello
+PASS - "font-weight" property for "box" element at 0.5s saw something close to: 166.6666
+PASS - "font-weight" property for "box" element at 1s saw something close to: 233.3333
+PASS - "font-weight" property for "box" element at 2s saw something close to: 366.6666
+
</ins></span></pre></div>
<a id="trunkLayoutTestsanimationsfontvariationsfontweighthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/font-variations/font-weight.html (0 => 214414)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/font-variations/font-weight.html         (rev 0)
+++ trunk/LayoutTests/animations/font-variations/font-weight.html        2017-03-27 16:12:21 UTC (rev 214414)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../resources/animation-test-helpers.js"></script>
+<style>
+
+@keyframes TheAnimation {
+ from {
+ font-weight: 100;
+ }
+ to {
+ font-weight: 500;
+ }
+}
+
+#box {
+ font-size: 100px;
+ animation-duration: 3s;
+ animation-timing-function: linear;
+}
+</style>
+</head>
+<body>
+<div id="box">Hello</div>
+<div id="result"></div>
+<script>
+var expectedValues = [
+ // [animation-name, time, element-id, property, expected-value, tolerance]
+ ["TheAnimation", 0.5, "box", "font-weight", "166.6666", 20],
+ ["TheAnimation", 1.0, "box", "font-weight", "233.3333", 20],
+ ["TheAnimation", 2.0, "box", "font-weight", "366.6666", 20],
+];
+
+var promises = [];
+
+document.fonts.forEach(function(f) {
+ promises.push(f.loaded);
+});
+
+Promise.all(promises).then(function() {
+ document.getElementById("box").style.animationName = "TheAnimation";
+ runAnimationTest(expectedValues, undefined, undefined, undefined, false, undefined);
+});
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsanimationsresourcesanimationtesthelpersjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/animations/resources/animation-test-helpers.js (214413 => 214414)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/resources/animation-test-helpers.js        2017-03-27 15:43:34 UTC (rev 214413)
+++ trunk/LayoutTests/animations/resources/animation-test-helpers.js        2017-03-27 16:12:21 UTC (rev 214414)
</span><span class="lines">@@ -283,6 +283,15 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+function compareFontStyle(computedValue, expectedValue, tolerance)
+{
+        var computed = computedValue.split(" ");
+        var expected = expectedValue.split(" ");
+        var computedAngle = computed[1].split("deg");
+        var expectedAngle = expected[1].split("deg");
+        return computed[0] == expected[0] && Math.abs(computedAngle[0] - expectedAngle[0]) <= tolerance;
+}
+
</ins><span class="cx"> // Called by CSS Image function filter() as well as filter property.
</span><span class="cx"> function compareFilterFunctions(computedValue, expectedValue, tolerance)
</span><span class="cx"> {
</span><span class="lines">@@ -427,9 +436,13 @@
</span><span class="cx"> || property == "webkitShapeInside"
</span><span class="cx"> || property == "webkitShapeOutside"
</span><span class="cx"> || property == "font-variation-settings"
</span><ins>+ || property == "font-style"
</ins><span class="cx"> || !property.indexOf("webkitTransform")
</span><span class="cx"> || !property.indexOf("transform")) {
</span><span class="cx"> computedValue = window.getComputedStyle(element)[property.split(".")[0]];
</span><ins>+ } else if (property == "font-stretch") {
+ var computedStyle = window.getComputedStyle(element).getPropertyCSSValue(property);
+ computedValue = computedStyle.getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE);
</ins><span class="cx"> } else {
</span><span class="cx"> var computedStyle = window.getComputedStyle(element).getPropertyCSSValue(property);
</span><span class="cx"> computedValue = computedStyle.getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
</span><span class="lines">@@ -474,6 +487,8 @@
</span><span class="cx"> result = compareCSSImages(computedValue, expectedValue, tolerance);
</span><span class="cx"> else if (property == "font-variation-settings")
</span><span class="cx"> result = compareFontVariationSettings(computedValue, expectedValue, tolerance);
</span><ins>+ else if (property == "font-style")
+ result = compareFontStyle(computedValue, expectedValue, tolerance);
</ins><span class="cx"> else
</span><span class="cx"> result = isCloseEnough(computedValue, expectedValue, tolerance);
</span><span class="cx"> return result;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (214413 => 214414)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-27 15:43:34 UTC (rev 214413)
+++ trunk/Source/WebCore/ChangeLog        2017-03-27 16:12:21 UTC (rev 214414)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2017-03-27 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Make sure animation works for font-weight, font-stretch, and font-style
+ https://bugs.webkit.org/show_bug.cgi?id=169683
+
+ Reviewed by Simon Fraser.
+
+ Hook up animation code for FontSelectionValues.
+
+ Tests: animations/font-variations/font-stretch.html
+ animations/font-variations/font-style.html
+ animations/font-variations/font-weight.html
+
+ * page/animation/CSSPropertyAnimation.cpp:
+ (WebCore::blendFunc):
+ (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::setFontWeight):
+ (WebCore::RenderStyle::setFontStretch):
+ (WebCore::RenderStyle::setFontItalic):
+ * rendering/style/RenderStyle.h:
+ (WebCore::RenderStyle::fontWeight):
+ (WebCore::RenderStyle::fontStretch):
+ (WebCore::RenderStyle::fontItalic):
+
</ins><span class="cx"> 2017-03-27 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Make WebSockets work in network process
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationCSSPropertyAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (214413 => 214414)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2017-03-27 15:43:34 UTC (rev 214413)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2017-03-27 16:12:21 UTC (rev 214414)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> #include "CalculationValue.h"
</span><span class="cx"> #include "ClipPathOperation.h"
</span><span class="cx"> #include "FloatConversion.h"
</span><ins>+#include "FontSelectionAlgorithm.h"
</ins><span class="cx"> #include "FontTaggedSettings.h"
</span><span class="cx"> #include "IdentityTransformOperation.h"
</span><span class="cx"> #include "Logging.h"
</span><span class="lines">@@ -392,6 +393,11 @@
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+static inline FontSelectionValue blendFunc(const AnimationBase* anim, FontSelectionValue from, FontSelectionValue to, double progress)
+{
+ return FontSelectionValue(blendFunc(anim, static_cast<float>(from), static_cast<float>(to), progress));
+}
+
</ins><span class="cx"> class AnimationPropertyWrapperBase {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(AnimationPropertyWrapperBase);
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="lines">@@ -1600,6 +1606,9 @@
</span><span class="cx"> #if ENABLE(VARIATION_FONTS)
</span><span class="cx"> new PropertyWrapperFontVariationSettings(CSSPropertyFontVariationSettings, &RenderStyle::fontVariationSettings, &RenderStyle::setFontVariationSettings),
</span><span class="cx"> #endif
</span><ins>+ new PropertyWrapper<FontSelectionValue>(CSSPropertyFontWeight, &RenderStyle::fontWeight, &RenderStyle::setFontWeight),
+ new PropertyWrapper<FontSelectionValue>(CSSPropertyFontStretch, &RenderStyle::fontStretch, &RenderStyle::setFontStretch),
+ new PropertyWrapper<FontSelectionValue>(CSSPropertyFontStyle, &RenderStyle::fontItalic, &RenderStyle::setFontItalic),
</ins><span class="cx"> };
</span><span class="cx"> const unsigned animatableLonghandPropertiesCount = WTF_ARRAY_LENGTH(animatableLonghandPropertyWrappers);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (214413 => 214414)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2017-03-27 15:43:34 UTC (rev 214413)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2017-03-27 16:12:21 UTC (rev 214414)
</span><span class="lines">@@ -1607,6 +1607,36 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+void RenderStyle::setFontWeight(FontSelectionValue value)
+{
+ FontSelector* currentFontSelector = fontCascade().fontSelector();
+ auto description = fontDescription();
+ description.setWeight(value);
+
+ setFontDescription(description);
+ fontCascade().update(currentFontSelector);
+}
+
+void RenderStyle::setFontStretch(FontSelectionValue value)
+{
+ FontSelector* currentFontSelector = fontCascade().fontSelector();
+ auto description = fontDescription();
+ description.setStretch(value);
+
+ setFontDescription(description);
+ fontCascade().update(currentFontSelector);
+}
+
+void RenderStyle::setFontItalic(FontSelectionValue value)
+{
+ FontSelector* currentFontSelector = fontCascade().fontSelector();
+ auto description = fontDescription();
+ description.setItalic(value);
+
+ setFontDescription(description);
+ fontCascade().update(currentFontSelector);
+}
+
</ins><span class="cx"> void RenderStyle::getShadowExtent(const ShadowData* shadow, LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const
</span><span class="cx"> {
</span><span class="cx"> top = 0;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (214413 => 214414)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2017-03-27 15:43:34 UTC (rev 214413)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2017-03-27 16:12:21 UTC (rev 214414)
</span><span class="lines">@@ -353,6 +353,9 @@
</span><span class="cx"> #if ENABLE(VARIATION_FONTS)
</span><span class="cx"> FontVariationSettings fontVariationSettings() const { return fontDescription().variationSettings(); }
</span><span class="cx"> #endif
</span><ins>+ FontSelectionValue fontWeight() const { return fontDescription().weight(); }
+ FontSelectionValue fontStretch() const { return fontDescription().stretch(); }
+ FontSelectionValue fontItalic() const { return fontDescription().italic(); }
</ins><span class="cx">
</span><span class="cx"> const Length& textIndent() const { return m_rareInheritedData->indent; }
</span><span class="cx"> ETextAlign textAlign() const { return static_cast<ETextAlign>(m_inheritedFlags.textAlign); }
</span><span class="lines">@@ -900,6 +903,9 @@
</span><span class="cx"> #if ENABLE(VARIATION_FONTS)
</span><span class="cx"> void setFontVariationSettings(FontVariationSettings);
</span><span class="cx"> #endif
</span><ins>+ void setFontWeight(FontSelectionValue);
+ void setFontStretch(FontSelectionValue);
+ void setFontItalic(FontSelectionValue);
</ins><span class="cx">
</span><span class="cx"> void setColor(const Color&);
</span><span class="cx"> void setTextIndent(Length&& length) { SET_VAR(m_rareInheritedData, indent, WTFMove(length)); }
</span></span></pre>
</div>
</div>
</body>
</html>