<!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  &lt;mmaxfield@apple.com&gt;
+
+        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  &lt;achristensen@webkit.org&gt;
</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 - &quot;font-stretch&quot; property for &quot;box&quot; element at 0.5s saw something close to: 159
+PASS - &quot;font-stretch&quot; property for &quot;box&quot; element at 1s saw something close to: 167
+PASS - &quot;font-stretch&quot; property for &quot;box&quot; 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>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/animation-test-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;style&gt;
+
+@keyframes TheAnimation {
+    from {
+        font-stretch: 151%;
+    }
+    to {
+        font-stretch: 199%;
+    }
+}
+
+#box {
+    font-size: 100px;
+    animation-duration: 3s;
+    animation-timing-function: linear;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;box&quot;&gt;Hello&lt;/div&gt;
+&lt;div id=&quot;result&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+var expectedValues = [
+    // [animation-name, time, element-id, property, expected-value, tolerance]
+    [&quot;TheAnimation&quot;, 0.5, &quot;box&quot;, &quot;font-stretch&quot;, &quot;159&quot;, 1],
+    [&quot;TheAnimation&quot;, 1.0, &quot;box&quot;, &quot;font-stretch&quot;, &quot;167&quot;, 1],
+    [&quot;TheAnimation&quot;, 2.0, &quot;box&quot;, &quot;font-stretch&quot;, &quot;183&quot;, 1],
+];
+
+var promises = [];
+
+document.fonts.forEach(function(f) {
+    promises.push(f.loaded);
+});
+
+Promise.all(promises).then(function() {
+    document.getElementById(&quot;box&quot;).style.animationName = &quot;TheAnimation&quot;;
+    runAnimationTest(expectedValues, undefined, undefined, undefined, false, undefined);
+});
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</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 - &quot;font-style&quot; property for &quot;box&quot; element at 0.5s saw something close to: oblique 32.3666
+PASS - &quot;font-style&quot; property for &quot;box&quot; element at 1s saw something close to: oblique 43.6666
+PASS - &quot;font-style&quot; property for &quot;box&quot; 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>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/animation-test-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;style&gt;
+
+@keyframes TheAnimation {
+    from {
+        font-style: oblique 21deg;
+    }
+    to {
+        font-style: oblique 89deg;
+    }
+}
+
+#box {
+    font-size: 100px;
+    animation-duration: 3s;
+    animation-timing-function: linear;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;box&quot;&gt;Hello&lt;/div&gt;
+&lt;div id=&quot;result&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+var expectedValues = [
+    // [animation-name, time, element-id, property, expected-value, tolerance]
+    [&quot;TheAnimation&quot;, 0.5, &quot;box&quot;, &quot;font-style&quot;, &quot;oblique 32.3666&quot;, 10],
+    [&quot;TheAnimation&quot;, 1.0, &quot;box&quot;, &quot;font-style&quot;, &quot;oblique 43.6666&quot;, 10],
+    [&quot;TheAnimation&quot;, 2.0, &quot;box&quot;, &quot;font-style&quot;, &quot;oblique 66.3333&quot;, 10],
+];
+
+var promises = [];
+
+document.fonts.forEach(function(f) {
+    promises.push(f.loaded);
+});
+
+Promise.all(promises).then(function() {
+    document.getElementById(&quot;box&quot;).style.animationName = &quot;TheAnimation&quot;;
+    runAnimationTest(expectedValues, undefined, undefined, undefined, false, undefined);
+});
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</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 - &quot;font-weight&quot; property for &quot;box&quot; element at 0.5s saw something close to: 166.6666
+PASS - &quot;font-weight&quot; property for &quot;box&quot; element at 1s saw something close to: 233.3333
+PASS - &quot;font-weight&quot; property for &quot;box&quot; 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>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/animation-test-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;style&gt;
+
+@keyframes TheAnimation {
+    from {
+        font-weight: 100;
+    }
+    to {
+        font-weight: 500;
+    }
+}
+
+#box {
+    font-size: 100px;
+    animation-duration: 3s;
+    animation-timing-function: linear;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;box&quot;&gt;Hello&lt;/div&gt;
+&lt;div id=&quot;result&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+var expectedValues = [
+    // [animation-name, time, element-id, property, expected-value, tolerance]
+    [&quot;TheAnimation&quot;, 0.5, &quot;box&quot;, &quot;font-weight&quot;, &quot;166.6666&quot;, 20],
+    [&quot;TheAnimation&quot;, 1.0, &quot;box&quot;, &quot;font-weight&quot;, &quot;233.3333&quot;, 20],
+    [&quot;TheAnimation&quot;, 2.0, &quot;box&quot;, &quot;font-weight&quot;, &quot;366.6666&quot;, 20],
+];
+
+var promises = [];
+
+document.fonts.forEach(function(f) {
+    promises.push(f.loaded);
+});
+
+Promise.all(promises).then(function() {
+    document.getElementById(&quot;box&quot;).style.animationName = &quot;TheAnimation&quot;;
+    runAnimationTest(expectedValues, undefined, undefined, undefined, false, undefined);
+});
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</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(&quot; &quot;);
+        var expected = expectedValue.split(&quot; &quot;);
+        var computedAngle = computed[1].split(&quot;deg&quot;);
+        var expectedAngle = expected[1].split(&quot;deg&quot;);
+        return computed[0] == expected[0] &amp;&amp; Math.abs(computedAngle[0] - expectedAngle[0]) &lt;= 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 == &quot;webkitShapeInside&quot;
</span><span class="cx">                || property == &quot;webkitShapeOutside&quot;
</span><span class="cx">                || property == &quot;font-variation-settings&quot;
</span><ins>+               || property == &quot;font-style&quot;
</ins><span class="cx">                || !property.indexOf(&quot;webkitTransform&quot;)
</span><span class="cx">                || !property.indexOf(&quot;transform&quot;)) {
</span><span class="cx">         computedValue = window.getComputedStyle(element)[property.split(&quot;.&quot;)[0]];
</span><ins>+    } else if (property == &quot;font-stretch&quot;) {
+        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 == &quot;font-variation-settings&quot;)
</span><span class="cx">         result = compareFontVariationSettings(computedValue, expectedValue, tolerance);
</span><ins>+    else if (property == &quot;font-style&quot;)
+        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  &lt;mmaxfield@apple.com&gt;
+
+        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  &lt;achristensen@webkit.org&gt;
</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 &quot;CalculationValue.h&quot;
</span><span class="cx"> #include &quot;ClipPathOperation.h&quot;
</span><span class="cx"> #include &quot;FloatConversion.h&quot;
</span><ins>+#include &quot;FontSelectionAlgorithm.h&quot;
</ins><span class="cx"> #include &quot;FontTaggedSettings.h&quot;
</span><span class="cx"> #include &quot;IdentityTransformOperation.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</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&lt;float&gt;(from), static_cast&lt;float&gt;(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, &amp;RenderStyle::fontVariationSettings, &amp;RenderStyle::setFontVariationSettings),
</span><span class="cx"> #endif
</span><ins>+        new PropertyWrapper&lt;FontSelectionValue&gt;(CSSPropertyFontWeight, &amp;RenderStyle::fontWeight, &amp;RenderStyle::setFontWeight),
+        new PropertyWrapper&lt;FontSelectionValue&gt;(CSSPropertyFontStretch, &amp;RenderStyle::fontStretch, &amp;RenderStyle::setFontStretch),
+        new PropertyWrapper&lt;FontSelectionValue&gt;(CSSPropertyFontStyle, &amp;RenderStyle::fontItalic, &amp;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&amp; top, LayoutUnit&amp; right, LayoutUnit&amp; bottom, LayoutUnit&amp; 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&amp; textIndent() const { return m_rareInheritedData-&gt;indent; }
</span><span class="cx">     ETextAlign textAlign() const { return static_cast&lt;ETextAlign&gt;(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&amp;);
</span><span class="cx">     void setTextIndent(Length&amp;&amp; length) { SET_VAR(m_rareInheritedData, indent, WTFMove(length)); }
</span></span></pre>
</div>
</div>

</body>
</html>