<!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>[56795] 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/56795">56795</a></dd>
<dt>Author</dt> <dd>krit@webkit.org</dd>
<dt>Date</dt> <dd>2010-03-30 09:40:50 -0700 (Tue, 30 Mar 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>2010-03-30  Dirk Schulze  &lt;krit@webkit.org&gt;

        Reviewed by Nikolas Zimmermann.

        Cannot animate &quot;points&quot; attribute for &lt;svg:polygon&gt;
        https://bugs.webkit.org/show_bug.cgi?id=21371

        Add animation support for 'points' on polygons in SVG. 

        Test: svg/animations/animate-points.html

        * svg/SVGAnimateElement.cpp:
        (WebCore::SVGAnimateElement::determinePropertyType):
        (WebCore::SVGAnimateElement::calculateAnimatedValue):
        (WebCore::SVGAnimateElement::calculateFromAndToValues):
        (WebCore::SVGAnimateElement::resetToBaseValue):
        (WebCore::SVGAnimateElement::applyResultsToTarget):
        * svg/SVGAnimateElement.h:
        (WebCore::SVGAnimateElement::): added PropertyType PointsProperty
        * svg/SVGPointList.cpp:
        (WebCore::blendFunc):
        (WebCore::SVGPointList::createAnimated): calculates animated PointList
        * svg/SVGPointList.h:

2010-03-30  Dirk Schulze  &lt;krit@webkit.org&gt;

        Reviewed by Nikolas Zimmermann.

        Cannot animate &quot;points&quot; attribute for &lt;svg:polygon&gt;
        https://bugs.webkit.org/show_bug.cgi?id=21371

        Tests if points of a polygon are animateable.

        * svg/animations/animate-points-expected.txt: Added.
        * svg/animations/animate-points.html: Added.
        * svg/animations/script-tests/animate-points.js: Added.
        (sample1):
        (sample2):
        (sample3):
        (executeTest):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoresvgSVGAnimateElementcpp">trunk/WebCore/svg/SVGAnimateElement.cpp</a></li>
<li><a href="#trunkWebCoresvgSVGAnimateElementh">trunk/WebCore/svg/SVGAnimateElement.h</a></li>
<li><a href="#trunkWebCoresvgSVGPathSegListcpp">trunk/WebCore/svg/SVGPathSegList.cpp</a></li>
<li><a href="#trunkWebCoresvgSVGPathSegListh">trunk/WebCore/svg/SVGPathSegList.h</a></li>
<li><a href="#trunkWebCoresvgSVGPointListcpp">trunk/WebCore/svg/SVGPointList.cpp</a></li>
<li><a href="#trunkWebCoresvgSVGPointListh">trunk/WebCore/svg/SVGPointList.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestssvganimationsanimatepointsexpectedtxt">trunk/LayoutTests/svg/animations/animate-points-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvganimationsanimatepointshtml">trunk/LayoutTests/svg/animations/animate-points.html</a></li>
<li><a href="#trunkLayoutTestssvganimationsscripttestsanimatepointsjs">trunk/LayoutTests/svg/animations/script-tests/animate-points.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (56794 => 56795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2010-03-30 16:18:56 UTC (rev 56794)
+++ trunk/LayoutTests/ChangeLog        2010-03-30 16:40:50 UTC (rev 56795)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2010-03-30  Dirk Schulze  &lt;krit@webkit.org&gt;
+
+        Reviewed by Nikolas Zimmermann.
+
+        Cannot animate &quot;points&quot; attribute for &lt;svg:polygon&gt;
+        https://bugs.webkit.org/show_bug.cgi?id=21371
+
+        Tests if points of a polygon are animateable.
+
+        * svg/animations/animate-points-expected.txt: Added.
+        * svg/animations/animate-points.html: Added.
+        * svg/animations/script-tests/animate-points.js: Added.
+        (sample1):
+        (sample2):
+        (sample3):
+        (executeTest):
+
</ins><span class="cx"> 2010-03-30  Pavel Feldman  &lt;pfeldman@chromium.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Not reviewed: bring test expectation back - it still fails for some
</span></span></pre></div>
<a id="trunkLayoutTestssvganimationsanimatepointsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/animations/animate-points-expected.txt (0 => 56795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/animations/animate-points-expected.txt                                (rev 0)
+++ trunk/LayoutTests/svg/animations/animate-points-expected.txt        2010-03-30 16:40:50 UTC (rev 56795)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+SVG 1.1 dynamic animation tests
+
+Tests if points of a polygon are animateable.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS poly.points.getItem(2).x is 200
+PASS poly.points.getItem(2).y is 200
+PASS poly.points.getItem(2).x is 150
+PASS poly.points.getItem(2).y is 150
+PASS poly.points.getItem(2).x is almost 100, just before-end
+PASS poly.points.getItem(2).x is 200
+PASS poly.points.getItem(2).y is 200
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestssvganimationsanimatepointshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/animations/animate-points.html (0 => 56795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/animations/animate-points.html                                (rev 0)
+++ trunk/LayoutTests/svg/animations/animate-points.html        2010-03-30 16:40:50 UTC (rev 56795)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../fast/js/resources/js-test-style.css&quot;&gt;
+&lt;script src=&quot;../../fast/js/resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../dynamic-updates/resources/SVGTestCase.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/SVGAnimationTestCase.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;h1&gt;SVG 1.1 dynamic animation tests&lt;/h1&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script src=&quot;script-tests/animate-points.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestssvganimationsscripttestsanimatepointsjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/animations/script-tests/animate-points.js (0 => 56795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/animations/script-tests/animate-points.js                                (rev 0)
+++ trunk/LayoutTests/svg/animations/script-tests/animate-points.js        2010-03-30 16:40:50 UTC (rev 56795)
</span><span class="lines">@@ -0,0 +1,70 @@
</span><ins>+// FIXME: This test will become useful once we have basic animVal support. For now it's just testing the SVG animation test infrastructure
+description(&quot;Tests if points of a polygon are animateable.&quot;);
+createSVGTestCase();
+
+// Setup test document
+var poly = createSVGElement(&quot;polygon&quot;);
+poly.setAttribute(&quot;id&quot;, &quot;poly&quot;);
+poly.setAttribute(&quot;fill&quot;, &quot;green&quot;);
+poly.setAttribute(&quot;points&quot;, &quot;0,0 200,0 200,200 0,200&quot;);
+poly.setAttribute(&quot;onclick&quot;, &quot;executeTest()&quot;);
+
+var animate = createSVGElement(&quot;animate&quot;);
+animate.setAttribute(&quot;id&quot;, &quot;animation&quot;);
+animate.setAttribute(&quot;attributeName&quot;, &quot;points&quot;);
+animate.setAttribute(&quot;from&quot;, &quot;0,0 200,0 200,200 0,200&quot;);
+animate.setAttribute(&quot;to&quot;, &quot;0,0 100,0 100,100 0,100&quot;);
+animate.setAttribute(&quot;begin&quot;, &quot;click&quot;);
+animate.setAttribute(&quot;dur&quot;, &quot;4s&quot;);
+poly.appendChild(animate);
+rootSVGElement.appendChild(poly);
+
+// Setup animation test
+function sample1() {
+    // Check initial/end conditions
+    shouldBe(&quot;poly.points.getItem(2).x&quot;, &quot;200&quot;);
+    shouldBe(&quot;poly.points.getItem(2).y&quot;, &quot;200&quot;);
+    //shouldBe(&quot;poly.animatedPoints.getItem(2).x&quot;, &quot;200&quot;);
+    //shouldBe(&quot;poly.animatedPoints.getItem(2).y&quot;, &quot;200&quot;);
+}
+
+function sample2() {
+    // FIXME: Add animVal support. Animates baseVal at the moment.
+    // shouldBe(&quot;rect.width.animVal.value&quot;, &quot;150&quot;);
+    // shouldBe(&quot;rect.width.baseVal.value&quot;, &quot;200&quot;);
+
+    // Check half-time conditions
+    shouldBe(&quot;poly.points.getItem(2).x&quot;, &quot;150&quot;);
+    shouldBe(&quot;poly.points.getItem(2).y&quot;, &quot;150&quot;);
+    //shouldBe(&quot;poly.animatedPoints.getItem(2).x&quot;, &quot;150&quot;);
+    //shouldBe(&quot;poly.animatedPoints.getItem(2).y&quot;, &quot;150&quot;);
+}
+
+function sample3() {
+    // FIXME: Add animVal support. Animates baseVal at the moment.
+    // shouldBe(&quot;rect.width.animVal.value&quot;, &quot;100&quot;);
+    // shouldBe(&quot;rect.width.baseVal.value&quot;, &quot;200&quot;);
+
+    // Check just before-end conditions
+    var ok = isCloseEnough(poly.points.getItem(2).x, 100, 0.01);
+    if (ok)
+        testPassed(&quot;poly.points.getItem(2).x is almost 100, just before-end&quot;);
+    else
+        testFailed(&quot;poly.points.getItem(2).x is NOT almost 100, as expected&quot;);
+}
+
+function executeTest() {
+    const expectedValues = [
+        // [animationId, time, elementId, sampleCallback]
+        [&quot;animation&quot;, 0.0,    &quot;poly&quot;, sample1],
+        [&quot;animation&quot;, 2.0,    &quot;poly&quot;, sample2],
+        [&quot;animation&quot;, 3.9999, &quot;poly&quot;, sample3],
+        [&quot;animation&quot;, 4.0 ,   &quot;poly&quot;, sample1]
+    ];
+
+    runAnimationTest(expectedValues);
+}
+
+// Begin test async
+window.setTimeout(&quot;triggerUpdate(15, 30)&quot;, 0);
+var successfullyParsed = true;
</ins></span></pre></div>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (56794 => 56795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2010-03-30 16:18:56 UTC (rev 56794)
+++ trunk/WebCore/ChangeLog        2010-03-30 16:40:50 UTC (rev 56795)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2010-03-30  Dirk Schulze  &lt;krit@webkit.org&gt;
+
+        Reviewed by Nikolas Zimmermann.
+
+        Cannot animate &quot;points&quot; attribute for &lt;svg:polygon&gt;
+        https://bugs.webkit.org/show_bug.cgi?id=21371
+
+        Add animation support for 'points' on polygons in SVG. 
+
+        Test: svg/animations/animate-points.html
+
+        * svg/SVGAnimateElement.cpp:
+        (WebCore::SVGAnimateElement::determinePropertyType):
+        (WebCore::SVGAnimateElement::calculateAnimatedValue):
+        (WebCore::SVGAnimateElement::calculateFromAndToValues):
+        (WebCore::SVGAnimateElement::resetToBaseValue):
+        (WebCore::SVGAnimateElement::applyResultsToTarget):
+        * svg/SVGAnimateElement.h:
+        (WebCore::SVGAnimateElement::): added PropertyType PointsProperty
+        * svg/SVGPointList.cpp:
+        (WebCore::blendFunc):
+        (WebCore::SVGPointList::createAnimated): calculates animated PointList
+        * svg/SVGPointList.h:
+
</ins><span class="cx"> 2010-03-30  Alexander Pavlov  &lt;apavlov@chromium.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Pavel Feldman.
</span></span></pre></div>
<a id="trunkWebCoresvgSVGAnimateElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/svg/SVGAnimateElement.cpp (56794 => 56795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/svg/SVGAnimateElement.cpp        2010-03-30 16:18:56 UTC (rev 56794)
+++ trunk/WebCore/svg/SVGAnimateElement.cpp        2010-03-30 16:40:50 UTC (rev 56795)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include &quot;SVGColor.h&quot;
</span><span class="cx"> #include &quot;SVGParserUtilities.h&quot;
</span><span class="cx"> #include &quot;SVGPathSegList.h&quot;
</span><ins>+#include &quot;SVGPointList.h&quot;
</ins><span class="cx"> #include &lt;math.h&gt;
</span><span class="cx"> 
</span><span class="cx"> using namespace std;
</span><span class="lines">@@ -80,6 +81,8 @@
</span><span class="cx">         return ColorProperty;
</span><span class="cx">     if (attribute == &quot;d&quot;)
</span><span class="cx">         return PathProperty;
</span><ins>+    if (attribute == &quot;points&quot;)
+        return PointsProperty;
</ins><span class="cx">     if (attribute == &quot;color&quot; || attribute == &quot;fill&quot; || attribute == &quot;stroke&quot;)
</span><span class="cx">         return ColorProperty;
</span><span class="cx">     return NumberProperty;
</span><span class="lines">@@ -142,6 +145,22 @@
</span><span class="cx">                     ? m_toPath : m_fromPath;
</span><span class="cx">         }
</span><span class="cx">         return;
</span><ins>+    } else if (m_propertyType == PointsProperty) {
+        if (percentage == 0)
+            results-&gt;m_animatedPoints = m_fromPoints;
+        else if (percentage == 1.f)
+            results-&gt;m_animatedPoints = m_toPoints;
+        else {
+            if (m_fromPoints &amp;&amp; m_toPoints)
+                results-&gt;m_animatedPoints = SVGPointList::createAnimated(m_fromPoints.get(), m_toPoints.get(), percentage);
+            else
+                results-&gt;m_animatedPoints.clear();
+            // Fall back to discrete animation if the points are not compatible
+            if (!results-&gt;m_animatedPoints)
+                results-&gt;m_animatedPoints = ((animationMode == FromToAnimation &amp;&amp; percentage &gt; 0.5f) || animationMode == ToAnimation || percentage == 1.0f) 
+                    ? m_toPoints : m_fromPoints;
+        }
+        return;
</ins><span class="cx">     }
</span><span class="cx">     ASSERT(animationMode == FromToAnimation || animationMode == ToAnimation || animationMode == ValuesAnimation);
</span><span class="cx">     if ((animationMode == FromToAnimation &amp;&amp; percentage &gt; 0.5f) || animationMode == ToAnimation || percentage == 1.0f)
</span><span class="lines">@@ -177,6 +196,15 @@
</span><span class="cx">         }
</span><span class="cx">         m_fromPath.clear();
</span><span class="cx">         m_toPath.clear();
</span><ins>+    } else if (m_propertyType == PointsProperty) {
+        m_fromPoints = SVGPointList::create(SVGNames::pointsAttr);
+        if (pointsListFromSVGData(m_fromPoints.get(), fromString)) {
+            m_toPoints = SVGPointList::create(SVGNames::pointsAttr);
+            if (pointsListFromSVGData(m_toPoints.get(), toString))
+                return true;
+        }
+        m_fromPoints.clear();
+        m_toPoints.clear();
</ins><span class="cx">     }
</span><span class="cx">     m_fromString = fromString;
</span><span class="cx">     m_toString = toString;
</span><span class="lines">@@ -224,6 +252,9 @@
</span><span class="cx">     } else if (m_propertyType == PathProperty) {
</span><span class="cx">         m_animatedPath.clear();
</span><span class="cx">         return;
</span><ins>+    } else if (m_propertyType == PointsProperty) {
+        m_animatedPoints.clear();
+        return;
</ins><span class="cx">     }
</span><span class="cx">     m_propertyType = StringProperty;
</span><span class="cx"> }
</span><span class="lines">@@ -250,6 +281,11 @@
</span><span class="cx">                 valueToApply.append(segment-&gt;toString() + &quot; &quot;);
</span><span class="cx">             }
</span><span class="cx">         }
</span><ins>+    } else if (m_propertyType == PointsProperty) {
+        if (!m_animatedPoints || !m_animatedPoints-&gt;numberOfItems())
+            valueToApply = m_animatedString;
+        else
+            valueToApply = m_animatedPoints-&gt;valueAsString();
</ins><span class="cx">     } else
</span><span class="cx">         valueToApply = m_animatedString;
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkWebCoresvgSVGAnimateElementh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/svg/SVGAnimateElement.h (56794 => 56795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/svg/SVGAnimateElement.h        2010-03-30 16:18:56 UTC (rev 56794)
+++ trunk/WebCore/svg/SVGAnimateElement.h        2010-03-30 16:40:50 UTC (rev 56795)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx">     class SVGPathSegList;
</span><ins>+    class SVGPointList;
</ins><span class="cx"> 
</span><span class="cx">     class SVGAnimateElement : public SVGAnimationElement {
</span><span class="cx">     public:
</span><span class="lines">@@ -44,7 +45,7 @@
</span><span class="cx">         virtual float calculateDistance(const String&amp; fromString, const String&amp; toString);
</span><span class="cx"> 
</span><span class="cx">     private:
</span><del>-        enum PropertyType { NumberProperty, ColorProperty, StringProperty, PathProperty };
</del><ins>+        enum PropertyType { NumberProperty, ColorProperty, StringProperty, PathProperty, PointsProperty };
</ins><span class="cx">         PropertyType determinePropertyType(const String&amp; attribute) const;
</span><span class="cx">         PropertyType m_propertyType;
</span><span class="cx">         
</span><span class="lines">@@ -61,6 +62,9 @@
</span><span class="cx">         RefPtr&lt;SVGPathSegList&gt; m_fromPath;
</span><span class="cx">         RefPtr&lt;SVGPathSegList&gt; m_toPath;
</span><span class="cx">         RefPtr&lt;SVGPathSegList&gt; m_animatedPath;
</span><ins>+        RefPtr&lt;SVGPointList&gt; m_fromPoints;
+        RefPtr&lt;SVGPointList&gt; m_toPoints;
+        RefPtr&lt;SVGPointList&gt; m_animatedPoints;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkWebCoresvgSVGPathSegListcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/svg/SVGPathSegList.cpp (56794 => 56795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/svg/SVGPathSegList.cpp        2010-03-30 16:18:56 UTC (rev 56794)
+++ trunk/WebCore/svg/SVGPathSegList.cpp        2010-03-30 16:40:50 UTC (rev 56795)
</span><span class="lines">@@ -144,40 +144,40 @@
</span><span class="cx">     return pathData;
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-static inline float blendFunc(float from, float to, float progress)
</del><ins>+float adjustAnimatedValue(float from, float to, float progress)
</ins><span class="cx"> {
</span><span class="cx">     return (to - from) * progress + from;
</span><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> #define BLENDPATHSEG1(class, attr1) \
</span><del>-    class::create(blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr1(), static_cast&lt;class*&gt;(to)-&gt;attr1(), progress))
</del><ins>+    class::create(adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr1(), static_cast&lt;class*&gt;(to)-&gt;attr1(), progress))
</ins><span class="cx">     
</span><span class="cx"> #define BLENDPATHSEG2(class, attr1, attr2) \
</span><del>-    class::create(blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr1(), static_cast&lt;class*&gt;(to)-&gt;attr1(), progress), \
-                    blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr2(), static_cast&lt;class*&gt;(to)-&gt;attr2(), progress))
</del><ins>+    class::create(adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr1(), static_cast&lt;class*&gt;(to)-&gt;attr1(), progress), \
+                    adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr2(), static_cast&lt;class*&gt;(to)-&gt;attr2(), progress))
</ins><span class="cx">     
</span><span class="cx"> #define BLENDPATHSEG4(class, attr1, attr2, attr3, attr4) \
</span><del>-    class::create(blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr1(), static_cast&lt;class*&gt;(to)-&gt;attr1(), progress), \
-                blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr2(), static_cast&lt;class*&gt;(to)-&gt;attr2(), progress), \
-                blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr3(), static_cast&lt;class*&gt;(to)-&gt;attr3(), progress), \
-                blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr4(), static_cast&lt;class*&gt;(to)-&gt;attr4(), progress))
</del><ins>+    class::create(adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr1(), static_cast&lt;class*&gt;(to)-&gt;attr1(), progress), \
+                adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr2(), static_cast&lt;class*&gt;(to)-&gt;attr2(), progress), \
+                adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr3(), static_cast&lt;class*&gt;(to)-&gt;attr3(), progress), \
+                adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr4(), static_cast&lt;class*&gt;(to)-&gt;attr4(), progress))
</ins><span class="cx">     
</span><span class="cx"> #define BLENDPATHSEG6(class, attr1, attr2, attr3, attr4, attr5, attr6) \
</span><del>-    class::create(blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr1(), static_cast&lt;class*&gt;(to)-&gt;attr1(), progress), \
-                blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr2(), static_cast&lt;class*&gt;(to)-&gt;attr2(), progress), \
-                blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr3(), static_cast&lt;class*&gt;(to)-&gt;attr3(), progress), \
-                blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr4(), static_cast&lt;class*&gt;(to)-&gt;attr4(), progress), \
-                blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr5(), static_cast&lt;class*&gt;(to)-&gt;attr5(), progress), \
-                blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr6(), static_cast&lt;class*&gt;(to)-&gt;attr6(), progress))
</del><ins>+    class::create(adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr1(), static_cast&lt;class*&gt;(to)-&gt;attr1(), progress), \
+                adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr2(), static_cast&lt;class*&gt;(to)-&gt;attr2(), progress), \
+                adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr3(), static_cast&lt;class*&gt;(to)-&gt;attr3(), progress), \
+                adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr4(), static_cast&lt;class*&gt;(to)-&gt;attr4(), progress), \
+                adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr5(), static_cast&lt;class*&gt;(to)-&gt;attr5(), progress), \
+                adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr6(), static_cast&lt;class*&gt;(to)-&gt;attr6(), progress))
</ins><span class="cx"> 
</span><span class="cx"> #define BLENDPATHSEG7(class, attr1, attr2, attr3, attr4, attr5, bool1, bool2) \
</span><del>-    class::create(blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr1(), static_cast&lt;class*&gt;(to)-&gt;attr1(), progress), \
-                blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr2(), static_cast&lt;class*&gt;(to)-&gt;attr2(), progress), \
-                blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr3(), static_cast&lt;class*&gt;(to)-&gt;attr3(), progress), \
-                blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr4(), static_cast&lt;class*&gt;(to)-&gt;attr4(), progress), \
-                blendFunc(static_cast&lt;class*&gt;(from)-&gt;attr5(), static_cast&lt;class*&gt;(to)-&gt;attr5(), progress), \
-                static_cast&lt;bool&gt;(blendFunc(static_cast&lt;class*&gt;(from)-&gt;bool1(), static_cast&lt;class*&gt;(to)-&gt;bool1(), progress)), \
-                static_cast&lt;bool&gt;(blendFunc(static_cast&lt;class*&gt;(from)-&gt;bool2(), static_cast&lt;class*&gt;(to)-&gt;bool2(), progress)))
</del><ins>+    class::create(adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr1(), static_cast&lt;class*&gt;(to)-&gt;attr1(), progress), \
+                adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr2(), static_cast&lt;class*&gt;(to)-&gt;attr2(), progress), \
+                adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr3(), static_cast&lt;class*&gt;(to)-&gt;attr3(), progress), \
+                adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr4(), static_cast&lt;class*&gt;(to)-&gt;attr4(), progress), \
+                adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;attr5(), static_cast&lt;class*&gt;(to)-&gt;attr5(), progress), \
+                static_cast&lt;bool&gt;(adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;bool1(), static_cast&lt;class*&gt;(to)-&gt;bool1(), progress)), \
+                static_cast&lt;bool&gt;(adjustAnimatedValue(static_cast&lt;class*&gt;(from)-&gt;bool2(), static_cast&lt;class*&gt;(to)-&gt;bool2(), progress)))
</ins><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;SVGPathSegList&gt; SVGPathSegList::createAnimated(const SVGPathSegList* fromList, const SVGPathSegList* toList, float progress)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkWebCoresvgSVGPathSegListh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/svg/SVGPathSegList.h (56794 => 56795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/svg/SVGPathSegList.h        2010-03-30 16:18:56 UTC (rev 56794)
+++ trunk/WebCore/svg/SVGPathSegList.h        2010-03-30 16:40:50 UTC (rev 56795)
</span><span class="lines">@@ -45,6 +45,8 @@
</span><span class="cx">         SVGPathSegList(const QualifiedName&amp;);
</span><span class="cx">     };
</span><span class="cx"> 
</span><ins>+    float adjustAnimatedValue(float from, float to, float progress);
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(SVG)
</span></span></pre></div>
<a id="trunkWebCoresvgSVGPointListcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/svg/SVGPointList.cpp (56794 => 56795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/svg/SVGPointList.cpp        2010-03-30 16:18:56 UTC (rev 56794)
+++ trunk/WebCore/svg/SVGPointList.cpp        2010-03-30 16:40:50 UTC (rev 56795)
</span><span class="lines">@@ -22,6 +22,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SVG)
</span><span class="cx"> #include &quot;SVGPointList.h&quot;
</span><ins>+#include &quot;SVGPathSegList.h&quot;
</ins><span class="cx"> #include &quot;PlatformString.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -53,6 +54,29 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+PassRefPtr&lt;SVGPointList&gt; SVGPointList::createAnimated(const SVGPointList* fromList, const SVGPointList* toList, float progress)
+{
+    unsigned itemCount = fromList-&gt;numberOfItems();
+    if (!itemCount || itemCount != toList-&gt;numberOfItems())
+        return 0;
+    RefPtr&lt;SVGPointList&gt; result = create(fromList-&gt;associatedAttributeName());
+    ExceptionCode ec = 0;
+    for (unsigned n = 0; n &lt; itemCount; ++n) {
+        FloatPoint from = fromList-&gt;getItem(n, ec);
+        if (ec)
+            return 0;
+        FloatPoint to = toList-&gt;getItem(n, ec);
+        if (ec)
+            return 0;
+        FloatPoint segment = FloatPoint(adjustAnimatedValue(from.x(), to.x(), progress),
+                                        adjustAnimatedValue(from.y(), to.y(), progress));
+        result-&gt;appendItem(segment, ec);
+        if (ec)
+            return 0;
+    }
+    return result.release();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+}
+
</ins><span class="cx"> #endif // ENABLE(SVG)
</span></span></pre></div>
<a id="trunkWebCoresvgSVGPointListh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/svg/SVGPointList.h (56794 => 56795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/svg/SVGPointList.h        2010-03-30 16:18:56 UTC (rev 56794)
+++ trunk/WebCore/svg/SVGPointList.h        2010-03-30 16:40:50 UTC (rev 56795)
</span><span class="lines">@@ -37,6 +37,8 @@
</span><span class="cx"> 
</span><span class="cx">         String valueAsString() const;
</span><span class="cx"> 
</span><ins>+        static PassRefPtr&lt;SVGPointList&gt; createAnimated(const SVGPointList* fromList, const SVGPointList* toList, float progress);
+
</ins><span class="cx">     private:
</span><span class="cx">         SVGPointList(const QualifiedName&amp;);
</span><span class="cx">     };
</span></span></pre>
</div>
</div>

</body>
</html>