Title: [162459] trunk
Revision
162459
Author
[email protected]
Date
2014-01-21 12:17:15 -0800 (Tue, 21 Jan 2014)

Log Message

ASSERT(time.isFinite()) in SVGSMILElement::createInstanceTimesFromSyncbase
<https://webkit.org/b/108184>

Patch by Tamas Gergely <[email protected]> on 2014-01-21
Reviewed by Philip Rogers.

Source/WebCore:

In the case a SMILElement timing had a syncbase dependency on an indefinite value
the assert were raised. The assert has been removed and a check has been added
instead that prevents the addition of indefinite times to the time list.

Test: svg/animations/smil-syncbase-self-dependency.svg

* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
  ASSERT removed.

LayoutTests:

Test checks whether valid self-dependency is accidentally broken.

* svg/animations/smil-syncbase-self-dependency-expected.txt: Added.
* svg/animations/smil-syncbase-self-dependency.svg: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (162458 => 162459)


--- trunk/LayoutTests/ChangeLog	2014-01-21 19:58:49 UTC (rev 162458)
+++ trunk/LayoutTests/ChangeLog	2014-01-21 20:17:15 UTC (rev 162459)
@@ -1,3 +1,15 @@
+2014-01-21  Tamas Gergely  <[email protected]>
+
+        ASSERT(time.isFinite()) in SVGSMILElement::createInstanceTimesFromSyncbase
+        <https://webkit.org/b/108184>
+
+        Reviewed by Philip Rogers.
+
+        Test checks whether valid self-dependency is accidentally broken.
+
+        * svg/animations/smil-syncbase-self-dependency-expected.txt: Added.
+        * svg/animations/smil-syncbase-self-dependency.svg: Added.
+
 2014-01-20  Myles C. Maxfield  <[email protected]>
 
         Test that text-decoration-skip: ink inherits as expected

Added: trunk/LayoutTests/svg/animations/smil-syncbase-self-dependency-expected.txt (0 => 162459)


--- trunk/LayoutTests/svg/animations/smil-syncbase-self-dependency-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/svg/animations/smil-syncbase-self-dependency-expected.txt	2014-01-21 20:17:15 UTC (rev 162459)
@@ -0,0 +1 @@
+SMILElement animation time self-dependency is handled.

Added: trunk/LayoutTests/svg/animations/smil-syncbase-self-dependency.svg (0 => 162459)


--- trunk/LayoutTests/svg/animations/smil-syncbase-self-dependency.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/animations/smil-syncbase-self-dependency.svg	2014-01-21 20:17:15 UTC (rev 162459)
@@ -0,0 +1,25 @@
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" _onload_="loaded()">
+    <!-- Test whether SMILElement animation self dependencies handled correctly. -->
+    <rect id="rectID" width="100" height="100" fill="green">
+        <animate id="selfID" attributeName="x" begin="0s; selfID.end" dur="0.02s" from="0" to="400"/>
+    </rect>
+    <text id="label" y="150"/>
+    <script>
+        if (window.testRunner) {
+            testRunner.dumpAsText();
+            testRunner.waitUntilDone();
+        }
+
+        function displayMessage() {
+            document.getElementById("label").textContent = "SMILElement animation time self-dependency is" +
+                ((document.getElementById("rectID").x.animVal.value > 0) ? " " : " not ") + "handled.";
+        }
+
+        function loaded() {
+            setTimeout('displayMessage()', 30);
+            if (window.testRunner) {
+                setTimeout('testRunner.notifyDone()', 40);
+            }
+        }
+    </script>
+</svg>

Modified: trunk/Source/WebCore/ChangeLog (162458 => 162459)


--- trunk/Source/WebCore/ChangeLog	2014-01-21 19:58:49 UTC (rev 162458)
+++ trunk/Source/WebCore/ChangeLog	2014-01-21 20:17:15 UTC (rev 162459)
@@ -1,3 +1,20 @@
+2014-01-21  Tamas Gergely  <[email protected]>
+
+        ASSERT(time.isFinite()) in SVGSMILElement::createInstanceTimesFromSyncbase
+        <https://webkit.org/b/108184>
+
+        Reviewed by Philip Rogers.
+
+        In the case a SMILElement timing had a syncbase dependency on an indefinite value
+        the assert were raised. The assert has been removed and a check has been added
+        instead that prevents the addition of indefinite times to the time list.
+
+        Test: svg/animations/smil-syncbase-self-dependency.svg
+
+        * svg/animation/SVGSMILElement.cpp:
+        (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
+          ASSERT removed.
+
 2014-01-21  Tim Horton  <[email protected]>
 
         Address late review naming comments after r162453.

Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (162458 => 162459)


--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp	2014-01-21 19:58:49 UTC (rev 162458)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp	2014-01-21 20:17:15 UTC (rev 162459)
@@ -1146,7 +1146,8 @@
                 time = syncbase->m_intervalBegin + condition.m_offset;
             else
                 time = syncbase->m_intervalEnd + condition.m_offset;
-            ASSERT(time.isFinite());
+            if (!time.isFinite())
+                continue;
             if (condition.m_beginOrEnd == Begin)
                 addBeginTime(elapsed(), time);
             else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to