Title: [145455] branches/chromium/1410
Revision
145455
Author
cev...@google.com
Date
2013-03-11 18:19:39 -0700 (Mon, 11 Mar 2013)

Log Message

Merge 143859
BUG=177933
Review URL: https://codereview.chromium.org/12637021

Modified Paths

Added Paths

Diff

Copied: branches/chromium/1410/LayoutTests/svg/animations/animateTransform-list-crash-expected.txt (from rev 143859, trunk/LayoutTests/svg/animations/animateTransform-list-crash-expected.txt) (0 => 145455)


--- branches/chromium/1410/LayoutTests/svg/animations/animateTransform-list-crash-expected.txt	                        (rev 0)
+++ branches/chromium/1410/LayoutTests/svg/animations/animateTransform-list-crash-expected.txt	2013-03-12 01:19:39 UTC (rev 145455)
@@ -0,0 +1 @@
+Test for WK110704: This test passes if it does not crash. 

Copied: branches/chromium/1410/LayoutTests/svg/animations/animateTransform-list-crash.html (from rev 143859, trunk/LayoutTests/svg/animations/animateTransform-list-crash.html) (0 => 145455)


--- branches/chromium/1410/LayoutTests/svg/animations/animateTransform-list-crash.html	                        (rev 0)
+++ branches/chromium/1410/LayoutTests/svg/animations/animateTransform-list-crash.html	2013-03-12 01:19:39 UTC (rev 145455)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<body>
+Test for WK110704: This test passes if it does not crash.
+<svg xmlns="http://www.w3.org/2000/svg">
+    <animateTransform accumulate="sum" attributeName="transform" dur="0.01s" repeatCount="indefinite" type="translate" values="1 2; 3 4; a">
+</svg>
+<script>
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+setTimeout(function() {
+    if (window.testRunner)
+        testRunner.notifyDone();
+}, 0.02);
+</script>
+</body>
+</html>

Modified: branches/chromium/1410/Source/WebCore/svg/SVGAnimatedTransformList.cpp (145454 => 145455)


--- branches/chromium/1410/Source/WebCore/svg/SVGAnimatedTransformList.cpp	2013-03-12 01:17:27 UTC (rev 145454)
+++ branches/chromium/1410/Source/WebCore/svg/SVGAnimatedTransformList.cpp	2013-03-12 01:19:39 UTC (rev 145455)
@@ -116,11 +116,12 @@
 
     unsigned fromTransformListSize = fromTransformList.size();
     const SVGTransform& toTransform = toTransformList[0];
-    SVGTransform effectiveFrom = fromTransformListSize ? fromTransformList[0] : SVGTransform(toTransform.type(), SVGTransform::ConstructZeroTransform);
+    const SVGTransform effectiveFrom = fromTransformListSize ? fromTransformList[0] : SVGTransform(toTransform.type(), SVGTransform::ConstructZeroTransform);
     SVGTransform currentTransform = SVGTransformDistance(effectiveFrom, toTransform).scaledDistance(percentage).addToSVGTransform(effectiveFrom);
-    if (m_animationElement->isAccumulated() && repeatCount)
-        animatedTransformList.append(SVGTransformDistance::addSVGTransforms(currentTransform, toAtEndOfDurationTransformList[0], repeatCount));
-    else
+    if (m_animationElement->isAccumulated() && repeatCount) {
+        const SVGTransform effectiveToAtEnd = toAtEndOfDurationTransformList.size() ? toAtEndOfDurationTransformList[0] : SVGTransform(toTransform.type(), SVGTransform::ConstructZeroTransform);
+        animatedTransformList.append(SVGTransformDistance::addSVGTransforms(currentTransform, effectiveToAtEnd, repeatCount));
+    } else
         animatedTransformList.append(currentTransform);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to