<!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>[167472] 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/167472">167472</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2014-04-17 17:44:53 -0700 (Thu, 17 Apr 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Make RenderLayerBacking get the timingFunction of the correct animation.
https://bugs.webkit.org/show_bug.cgi?id=100632
Source/WebCore:
Patch by Huang Dongsung <luxtella@company100.net> on 2014-04-16
Reviewed by Simon Fraser.
When an element has multiple animations that have different timingFunctions,
the progress of each animation should be calculated using its respective
timingFunction. But at this point, the timingFunction of the first animation is
only used in RenderLayerBacking::startAnimation(), regardless of how many
animations the element has.
getAnimationFromStyleByName() was introduced in <a href="http://trac.webkit.org/projects/webkit/changeset/89462">r89462</a> so that the
timingFunction of the correct animation searched by its name would be
used. This patch moves the function to KeyframeValue::timingFunction()
so that RenderLayerBacking reuses this method.
Test: animations/keyframe-multiple-timing-functions-transform.html
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation):
* rendering/style/KeyframeList.cpp:
(WebCore::KeyframeValue::timingFunction):
(WebCore):
* rendering/style/KeyframeList.h:
(WebCore):
(KeyframeValue):
Source/WebKit2:
Reviewed by Simon Fraser.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Update for new signatures for
FloatAnimationValue, TransformAnimationValue, etc.
LayoutTests:
Patch by Huang Dongsung <luxtella@company100.net> on 2014-04-16
Reviewed by Simon Fraser.
When an element on a compositing layer has multiple animations that have
different timingFunctions, the progress of each animation should be
calculated using its respective timingFunction in Accelerated
Compositing.
* animations/keyframe-multiple-timing-functions-transform-expected.txt: Added.
* animations/keyframe-multiple-timing-functions-transform.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageanimationKeyframeAnimationcpp">trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsLayerh">trunk/Source/WebCore/platform/graphics/GraphicsLayer.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerBackingcpp">trunk/Source/WebCore/rendering/RenderLayerBacking.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleKeyframeListcpp">trunk/Source/WebCore/rendering/style/KeyframeList.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleKeyframeListh">trunk/Source/WebCore/rendering/style/KeyframeList.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedCoordinatedGraphicsCoordinatedGraphicsArgumentCoderscpp">trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsanimationskeyframemultipletimingfunctionstransformexpectedtxt">trunk/LayoutTests/animations/keyframe-multiple-timing-functions-transform-expected.txt</a></li>
<li><a href="#trunkLayoutTestsanimationskeyframemultipletimingfunctionstransformhtml">trunk/LayoutTests/animations/keyframe-multiple-timing-functions-transform.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (167471 => 167472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-04-18 00:37:39 UTC (rev 167471)
+++ trunk/LayoutTests/ChangeLog        2014-04-18 00:44:53 UTC (rev 167472)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-04-16 Huang Dongsung <luxtella@company100.net>
+
+ Make RenderLayerBacking get the timingFunction of the correct animation.
+ https://bugs.webkit.org/show_bug.cgi?id=100632
+
+ Reviewed by Simon Fraser.
+
+ When an element on a compositing layer has multiple animations that have
+ different timingFunctions, the progress of each animation should be
+ calculated using its respective timingFunction in Accelerated
+ Compositing.
+
+ * animations/keyframe-multiple-timing-functions-transform-expected.txt: Added.
+ * animations/keyframe-multiple-timing-functions-transform.html: Added.
+
</ins><span class="cx"> 2014-04-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
</span><span class="cx">
</span><span class="cx"> Unreviewed, EFL gardening. Remove duplicated test case in EFL WK2 TestExpectations.
</span></span></pre></div>
<a id="trunkLayoutTestsanimationskeyframemultipletimingfunctionstransformexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/keyframe-multiple-timing-functions-transform-expected.txt (0 => 167472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/keyframe-multiple-timing-functions-transform-expected.txt         (rev 0)
+++ trunk/LayoutTests/animations/keyframe-multiple-timing-functions-transform-expected.txt        2014-04-18 00:44:53 UTC (rev 167472)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+PASS - "webkitTransform" property for "box" element at 0.5s saw something close to: 1,0,0,1,50,0
+PASS - "webkitTransform" property for "box" element at 1s saw something close to: 1,0,0,1,100,0
+PASS - "webkitTransform" property for "box" element at 1.5s saw something close to: 1,0,0,1,150,0
+PASS - "opacity" property for "box" element at 0.5s saw something close to: 1
+PASS - "opacity" property for "box" element at 0.9s saw something close to: 1
+PASS - "opacity" property for "box" element at 1.5s saw something close to: 0.5
+
</ins></span></pre></div>
<a id="trunkLayoutTestsanimationskeyframemultipletimingfunctionstransformhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/keyframe-multiple-timing-functions-transform.html (0 => 167472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/keyframe-multiple-timing-functions-transform.html         (rev 0)
+++ trunk/LayoutTests/animations/keyframe-multiple-timing-functions-transform.html        2014-04-18 00:44:53 UTC (rev 167472)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+<html>
+<head>
+ <style>
+ #box {
+ position: relative;
+ height: 100px;
+ width: 100px;
+ margin: 20px;
+ background-color: red;
+ -webkit-animation:
+ horizontal 2s linear 1 alternate,
+ fade 2s steps(2) 1 alternate;
+ }
+
+ @-webkit-keyframes horizontal {
+ from { -webkit-transform: translateX(0px); }
+ to { -webkit-transform: translateX(200px); }
+ }
+
+ @-webkit-keyframes fade {
+ from { opacity: 1.0; }
+ to { opacity: 0.0; }
+ }
+ </style>
+ <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
+ <script type="text/javascript" charset="utf-8">
+ const expectedValues = [
+ // [animation-name, time, element-id, property, expected-value, tolerance]
+ ["horizontal", 0.5, "box", "webkitTransform", [1,0,0,1, 50,0], 20],
+ ["horizontal", 1.0, "box", "webkitTransform", [1,0,0,1,100,0], 20],
+ ["horizontal", 1.5, "box", "webkitTransform", [1,0,0,1,150,0], 20],
+ ["fade", 0.5, "box", "opacity", 1.0, 0.15],
+ ["fade", 0.9, "box", "opacity", 1.0, 0.15],
+ ["fade", 1.5, "box", "opacity", 0.5, 0.15],
+ ];
+
+ runAnimationTest(expectedValues);
+ </script>
+</head>
+<body>
+ <div id="box"></div>
+ <div id="result"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (167471 => 167472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-18 00:37:39 UTC (rev 167471)
+++ trunk/Source/WebCore/ChangeLog        2014-04-18 00:44:53 UTC (rev 167472)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2014-04-16 Huang Dongsung <luxtella@company100.net>
+
+ Make RenderLayerBacking get the timingFunction of the correct animation.
+ https://bugs.webkit.org/show_bug.cgi?id=100632
+
+ Reviewed by Simon Fraser.
+
+ When an element has multiple animations that have different timingFunctions,
+ the progress of each animation should be calculated using its respective
+ timingFunction. But at this point, the timingFunction of the first animation is
+ only used in RenderLayerBacking::startAnimation(), regardless of how many
+ animations the element has.
+
+ getAnimationFromStyleByName() was introduced in r89462 so that the
+ timingFunction of the correct animation searched by its name would be
+ used. This patch moves the function to KeyframeValue::timingFunction()
+ so that RenderLayerBacking reuses this method.
+
+ Test: animations/keyframe-multiple-timing-functions-transform.html
+
+ * page/animation/KeyframeAnimation.cpp:
+ (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::startAnimation):
+ * rendering/style/KeyframeList.cpp:
+ (WebCore::KeyframeValue::timingFunction):
+ (WebCore):
+ * rendering/style/KeyframeList.h:
+ (WebCore):
+ (KeyframeValue):
+
</ins><span class="cx"> 2014-04-17 Andreas Kling <akling@apple.com>
</span><span class="cx">
</span><span class="cx"> Rollout: Add a way to cache never-changing IDL attributes in the wrapper.
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationKeyframeAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp (167471 => 167472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp        2014-04-18 00:37:39 UTC (rev 167471)
+++ trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp        2014-04-18 00:44:53 UTC (rev 167472)
</span><span class="lines">@@ -65,19 +65,6 @@
</span><span class="cx"> endAnimation();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static const Animation* getAnimationFromStyleByName(const RenderStyle* style, const AtomicString& name)
-{
- if (!style->animations())
- return 0;
-
- for (size_t i = 0; i < style->animations()->size(); i++) {
- if (name == style->animations()->animation(i).name())
- return &style->animations()->animation(i);
- }
-
- return 0;
-}
-
</del><span class="cx"> void KeyframeAnimation::fetchIntervalEndpointsForProperty(CSSPropertyID property, const RenderStyle*& fromStyle, const RenderStyle*& toStyle, double& prog) const
</span><span class="cx"> {
</span><span class="cx"> // Find the first key
</span><span class="lines">@@ -130,11 +117,7 @@
</span><span class="cx"> offset = prevKeyframe.key();
</span><span class="cx"> scale = 1.0 / (nextKeyframe.key() - prevKeyframe.key());
</span><span class="cx">
</span><del>- const TimingFunction* timingFunction = 0;
- if (const Animation* matchedAnimation = getAnimationFromStyleByName(fromStyle, name()))
- timingFunction = matchedAnimation->timingFunction().get();
-
- prog = progress(scale, offset, timingFunction);
</del><ins>+ prog = progress(scale, offset, prevKeyframe.timingFunction(name()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void KeyframeAnimation::animate(CompositeAnimation* compositeAnimation, RenderElement*, const RenderStyle*, RenderStyle* targetStyle, RefPtr<RenderStyle>& animatedStyle)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (167471 => 167472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2014-04-18 00:37:39 UTC (rev 167471)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2014-04-18 00:44:53 UTC (rev 167472)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2009 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2009, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx"> virtual PassOwnPtr<AnimationValue> clone() const = 0;
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- AnimationValue(double keyTime, PassRefPtr<TimingFunction> timingFunction = 0)
</del><ins>+ AnimationValue(double keyTime, TimingFunction* timingFunction = nullptr)
</ins><span class="cx"> : m_keyTime(keyTime)
</span><span class="cx"> , m_timingFunction(timingFunction)
</span><span class="cx"> {
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx"> // FIXME: Should be moved to its own header file.
</span><span class="cx"> class FloatAnimationValue : public AnimationValue {
</span><span class="cx"> public:
</span><del>- static PassOwnPtr<FloatAnimationValue> create(double keyTime, float value, PassRefPtr<TimingFunction> timingFunction = 0)
</del><ins>+ static PassOwnPtr<FloatAnimationValue> create(double keyTime, float value, TimingFunction* timingFunction = nullptr)
</ins><span class="cx"> {
</span><span class="cx"> return adoptPtr(new FloatAnimationValue(keyTime, value, timingFunction));
</span><span class="cx"> }
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx"> float value() const { return m_value; }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- FloatAnimationValue(double keyTime, float value, PassRefPtr<TimingFunction> timingFunction)
</del><ins>+ FloatAnimationValue(double keyTime, float value, TimingFunction* timingFunction)
</ins><span class="cx"> : AnimationValue(keyTime, timingFunction)
</span><span class="cx"> , m_value(value)
</span><span class="cx"> {
</span><span class="lines">@@ -123,7 +123,7 @@
</span><span class="cx"> // FIXME: Should be moved to its own header file.
</span><span class="cx"> class TransformAnimationValue : public AnimationValue {
</span><span class="cx"> public:
</span><del>- static PassOwnPtr<TransformAnimationValue> create(double keyTime, const TransformOperations& value, PassRefPtr<TimingFunction> timingFunction = 0)
</del><ins>+ static PassOwnPtr<TransformAnimationValue> create(double keyTime, const TransformOperations& value, TimingFunction* timingFunction = nullptr)
</ins><span class="cx"> {
</span><span class="cx"> return adoptPtr(new TransformAnimationValue(keyTime, value, timingFunction));
</span><span class="cx"> }
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx"> const TransformOperations& value() const { return m_value; }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- TransformAnimationValue(double keyTime, const TransformOperations& value, PassRefPtr<TimingFunction> timingFunction)
</del><ins>+ TransformAnimationValue(double keyTime, const TransformOperations& value, TimingFunction* timingFunction)
</ins><span class="cx"> : AnimationValue(keyTime, timingFunction)
</span><span class="cx"> , m_value(value)
</span><span class="cx"> {
</span><span class="lines">@@ -150,7 +150,7 @@
</span><span class="cx"> // FIXME: Should be moved to its own header file.
</span><span class="cx"> class FilterAnimationValue : public AnimationValue {
</span><span class="cx"> public:
</span><del>- static PassOwnPtr<FilterAnimationValue> create(double keyTime, const FilterOperations& value, PassRefPtr<TimingFunction> timingFunction = 0)
</del><ins>+ static PassOwnPtr<FilterAnimationValue> create(double keyTime, const FilterOperations& value, TimingFunction* timingFunction = nullptr)
</ins><span class="cx"> {
</span><span class="cx"> return adoptPtr(new FilterAnimationValue(keyTime, value, timingFunction));
</span><span class="cx"> }
</span><span class="lines">@@ -163,7 +163,7 @@
</span><span class="cx"> const FilterOperations& value() const { return m_value; }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- FilterAnimationValue(double keyTime, const FilterOperations& value, PassRefPtr<TimingFunction> timingFunction)
</del><ins>+ FilterAnimationValue(double keyTime, const FilterOperations& value, TimingFunction* timingFunction)
</ins><span class="cx"> : AnimationValue(keyTime, timingFunction)
</span><span class="cx"> , m_value(value)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (167471 => 167472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-04-18 00:37:39 UTC (rev 167471)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-04-18 00:44:53 UTC (rev 167472)
</span><span class="lines">@@ -2366,8 +2366,7 @@
</span><span class="cx"> if (!keyframeStyle)
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- // Get timing function.
- RefPtr<TimingFunction> tf = keyframeStyle->hasAnimations() ? (*keyframeStyle->animations()).animation(0).timingFunction() : 0;
</del><ins>+ TimingFunction* tf = currentKeyframe.timingFunction(keyframes.animationName());
</ins><span class="cx">
</span><span class="cx"> bool isFirstOrLastKeyframe = key == 0 || key == 1;
</span><span class="cx"> if ((hasTransform && isFirstOrLastKeyframe) || currentKeyframe.containsProperty(CSSPropertyWebkitTransform))
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleKeyframeListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/KeyframeList.cpp (167471 => 167472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/KeyframeList.cpp        2014-04-18 00:37:39 UTC (rev 167471)
+++ trunk/Source/WebCore/rendering/style/KeyframeList.cpp        2014-04-18 00:44:53 UTC (rev 167472)
</span><span class="lines">@@ -21,10 +21,27 @@
</span><span class="cx">
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "KeyframeList.h"
</span><ins>+
+#include "Animation.h"
</ins><span class="cx"> #include "RenderObject.h"
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+TimingFunction* KeyframeValue::timingFunction(const AtomicString& name) const
+{
+ const RenderStyle* keyframeStyle = style();
+ if (!keyframeStyle || !keyframeStyle->animations())
+ return nullptr;
+
+ for (size_t i = 0; i < keyframeStyle->animations()->size(); ++i) {
+ const Animation& animation = keyframeStyle->animations()->animation(i);
+ if (name == animation.name())
+ return animation.timingFunction().get();
+ }
+
+ return nullptr;
+}
+
</ins><span class="cx"> KeyframeList::~KeyframeList()
</span><span class="cx"> {
</span><span class="cx"> clear();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleKeyframeListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/KeyframeList.h (167471 => 167472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/KeyframeList.h        2014-04-18 00:37:39 UTC (rev 167471)
+++ trunk/Source/WebCore/rendering/style/KeyframeList.h        2014-04-18 00:44:53 UTC (rev 167472)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class RenderStyle;
</span><ins>+class TimingFunction;
</ins><span class="cx">
</span><span class="cx"> class KeyframeValue {
</span><span class="cx"> public:
</span><span class="lines">@@ -54,6 +55,8 @@
</span><span class="cx"> const RenderStyle* style() const { return m_style.get(); }
</span><span class="cx"> void setStyle(PassRefPtr<RenderStyle> style) { m_style = style; }
</span><span class="cx">
</span><ins>+ TimingFunction* timingFunction(const AtomicString& name) const;
+
</ins><span class="cx"> private:
</span><span class="cx"> double m_key;
</span><span class="cx"> HashSet<CSSPropertyID> m_properties; // The properties specified in this keyframe.
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (167471 => 167472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-04-18 00:37:39 UTC (rev 167471)
+++ trunk/Source/WebKit2/ChangeLog        2014-04-18 00:44:53 UTC (rev 167472)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2014-04-17 Brent Fulgham <bfulgham@apple.com>
+
+ Make RenderLayerBacking get the timingFunction of the correct animation.
+ https://bugs.webkit.org/show_bug.cgi?id=100632
+
+ Reviewed by Simon Fraser.
+
+ * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
+ (IPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Update for new signatures for
+ FloatAnimationValue, TransformAnimationValue, etc.
+
</ins><span class="cx"> 2014-04-17 Enrica Casucci <enrica@apple.com>
</span><span class="cx">
</span><span class="cx"> [iOS WebKit2] support replacements for misspelled words.
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedCoordinatedGraphicsCoordinatedGraphicsArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp (167471 => 167472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp        2014-04-18 00:37:39 UTC (rev 167471)
+++ trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp        2014-04-18 00:44:53 UTC (rev 167472)
</span><span class="lines">@@ -518,14 +518,14 @@
</span><span class="cx"> float value;
</span><span class="cx"> if (!decoder.decode(value))
</span><span class="cx"> return false;
</span><del>- keyframes.insert(FloatAnimationValue::create(keyTime, value, timingFunction));
</del><ins>+ keyframes.insert(FloatAnimationValue::create(keyTime, value, timingFunction.get()));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case AnimatedPropertyWebkitTransform: {
</span><span class="cx"> TransformOperations transform;
</span><span class="cx"> if (!decoder.decode(transform))
</span><span class="cx"> return false;
</span><del>- keyframes.insert(TransformAnimationValue::create(keyTime, transform, timingFunction));
</del><ins>+ keyframes.insert(TransformAnimationValue::create(keyTime, transform, timingFunction.get()));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><span class="lines">@@ -533,7 +533,7 @@
</span><span class="cx"> FilterOperations filter;
</span><span class="cx"> if (!decoder.decode(filter))
</span><span class="cx"> return false;
</span><del>- keyframes.insert(FilterAnimationValue::create(keyTime, filter, timingFunction));
</del><ins>+ keyframes.insert(FilterAnimationValue::create(keyTime, filter, timingFunction.get()));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre>
</div>
</div>
</body>
</html>