Title: [147581] trunk
Revision
147581
Author
[email protected]
Date
2013-04-03 13:44:22 -0700 (Wed, 03 Apr 2013)

Log Message

ASSERTION FAILED: resultAnimationElement->m_animatedType
https://bugs.webkit.org/show_bug.cgi?id=93528

Patch by David Vest <[email protected]> on 2013-04-03
Reviewed by Philip Rogers.

Source/WebCore:

When the order of animation elements change within an animation
group, we can't assume that the resultElement is the same as it
was when the animation was frozen. Make sure to reset the
animation type for the resultElement before updating the
animation.

Test: svg/animations/animation-dependency-crash.html

* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::progress):

LayoutTests:

* svg/animations/animation-dependency-crash-expected.txt: Added.
* svg/animations/animation-dependency-crash.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (147580 => 147581)


--- trunk/LayoutTests/ChangeLog	2013-04-03 20:39:22 UTC (rev 147580)
+++ trunk/LayoutTests/ChangeLog	2013-04-03 20:44:22 UTC (rev 147581)
@@ -1,3 +1,13 @@
+2013-04-03  David Vest  <[email protected]>
+
+        ASSERTION FAILED: resultAnimationElement->m_animatedType
+        https://bugs.webkit.org/show_bug.cgi?id=93528
+
+        Reviewed by Philip Rogers.
+
+        * svg/animations/animation-dependency-crash-expected.txt: Added.
+        * svg/animations/animation-dependency-crash.html: Added.
+
 2013-04-03  Max Vujovic  <[email protected]>
 
         Compositing tests failing after http://trac.webkit.org/changeset/147502

Added: trunk/LayoutTests/svg/animations/animation-dependency-crash-expected.txt (0 => 147581)


--- trunk/LayoutTests/svg/animations/animation-dependency-crash-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/svg/animations/animation-dependency-crash-expected.txt	2013-04-03 20:44:22 UTC (rev 147581)
@@ -0,0 +1 @@
+PASS: Test did not crash.

Added: trunk/LayoutTests/svg/animations/animation-dependency-crash.html (0 => 147581)


--- trunk/LayoutTests/svg/animations/animation-dependency-crash.html	                        (rev 0)
+++ trunk/LayoutTests/svg/animations/animation-dependency-crash.html	2013-04-03 20:44:22 UTC (rev 147581)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <script type="text/_javascript_">
+    if (window.testRunner)
+        testRunner.waitUntilDone();
+
+    window.setTimeout(function() {
+        document.body.innerHTML = 'PASS: Test did not crash.';
+        if (window.testRunner) {
+            testRunner.dumpAsText();
+            testRunner.notifyDone();
+        }
+    }, 120);
+  </script>
+</head>
+<body>
+  Test infinite animation loop<br/>
+  This test passes if it does not crash<br/>
+  <svg xmlns="http://www.w3.org/2000/svg">
+    <circle r="10" cx="50" cy="50" fill="green">
+      <animate id="anim1" attributeName="opacity" from="0" to="1" begin="0s; anim3.end" dur="0.01s"/>
+      <animate id="anim2" attributeName="opacity" from="1" to="1" begin="anim1.end" dur="0.03s" fill="freeze"/>
+      <animate id="anim3" attributeName="opacity" from="1" to="0" begin="anim2.end" dur="0.01s" fill="freeze"/>
+    </circle>
+  </svg>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (147580 => 147581)


--- trunk/Source/WebCore/ChangeLog	2013-04-03 20:39:22 UTC (rev 147580)
+++ trunk/Source/WebCore/ChangeLog	2013-04-03 20:44:22 UTC (rev 147581)
@@ -1,3 +1,21 @@
+2013-04-03  David Vest  <[email protected]>
+
+        ASSERTION FAILED: resultAnimationElement->m_animatedType
+        https://bugs.webkit.org/show_bug.cgi?id=93528
+
+        Reviewed by Philip Rogers.
+
+        When the order of animation elements change within an animation
+        group, we can't assume that the resultElement is the same as it
+        was when the animation was frozen. Make sure to reset the
+        animation type for the resultElement before updating the
+        animation.
+
+        Test: svg/animations/animation-dependency-crash.html
+
+        * svg/animation/SVGSMILElement.cpp:
+        (WebCore::SVGSMILElement::progress):
+
 2013-04-03  Timothy Hatcher  <[email protected]>
 
         Stop unconditionally enabling _javascript_ execution when closing the Web Inspector.

Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (147580 => 147581)


--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp	2013-04-03 20:39:22 UTC (rev 147580)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp	2013-04-03 20:44:22 UTC (rev 147581)
@@ -1070,8 +1070,11 @@
 
     if (elapsed < m_intervalBegin) {
         ASSERT(m_activeState != Active);
-        if (m_activeState == Frozen)
+        if (m_activeState == Frozen) {
+            if (this == resultElement)
+                resetAnimatedType();
             updateAnimation(m_lastPercent, m_lastRepeat, resultElement);
+        }
         m_nextProgressTime = m_intervalBegin;
         return false;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to