Title: [121258] trunk
- Revision
- 121258
- Author
- p...@google.com
- Date
- 2012-06-26 05:56:13 -0700 (Tue, 26 Jun 2012)
Log Message
Fix bug where animations failed to start
https://bugs.webkit.org/show_bug.cgi?id=89943
Reviewed by Nikolas Zimmermann.
Source/WebCore:
The unpause code previously checked that the animations had not started
before un-setting the pause state. This meant that if an animation was
paused and unpaused before the animations started, it would remain in the
paused state. This patch simply reorders the unpause logic to fix this bug.
Test: svg/custom/animate-initial-pause-unpause.html
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::resume):
LayoutTests:
* svg/custom/animate-initial-pause-unpause-expected.txt: Added.
* svg/custom/animate-initial-pause-unpause.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (121257 => 121258)
--- trunk/LayoutTests/ChangeLog 2012-06-26 12:49:12 UTC (rev 121257)
+++ trunk/LayoutTests/ChangeLog 2012-06-26 12:56:13 UTC (rev 121258)
@@ -1,3 +1,13 @@
+2012-06-26 Philip Rogers <p...@google.com>
+
+ Fix bug where animations failed to start
+ https://bugs.webkit.org/show_bug.cgi?id=89943
+
+ Reviewed by Nikolas Zimmermann.
+
+ * svg/custom/animate-initial-pause-unpause-expected.txt: Added.
+ * svg/custom/animate-initial-pause-unpause.html: Added.
+
2012-06-26 Thiago Marcos P. Santos <thiago.san...@intel.com>
[EFL] Gardening of new passing tests
Added: trunk/LayoutTests/svg/custom/animate-initial-pause-unpause-expected.txt (0 => 121258)
--- trunk/LayoutTests/svg/custom/animate-initial-pause-unpause-expected.txt (rev 0)
+++ trunk/LayoutTests/svg/custom/animate-initial-pause-unpause-expected.txt 2012-06-26 12:56:13 UTC (rev 121258)
@@ -0,0 +1 @@
+PASS
Added: trunk/LayoutTests/svg/custom/animate-initial-pause-unpause.html (0 => 121258)
--- trunk/LayoutTests/svg/custom/animate-initial-pause-unpause.html (rev 0)
+++ trunk/LayoutTests/svg/custom/animate-initial-pause-unpause.html 2012-06-26 12:56:13 UTC (rev 121258)
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+ Test for WK89943: pausing and unpausing an animation before it starts should have no effect.
+-->
+<body>
+ <svg id="svg" width="400" height="400">
+ <rect x="0" y="0" width="100" height="100" fill="red"/>
+ <rect id="rect" x="100" y="0" width="100" height="100" fill="green">
+ <set attributeName="x" to="0" begin="0.01s" fill="freeze"/>
+ </rect>
+ </svg>
+ <script>
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+ }
+
+ var svg = document.getElementById("svg");
+ var rect = document.getElementById("rect");
+
+ svg.pauseAnimations();
+ svg.unpauseAnimations();
+
+ setTimeout(function() {
+ if (rect.x.animVal.value == 0)
+ document.body.innerHTML = "PASS";
+ else
+ document.body.innerHTML = "FAIL : rect.x.animVal.value was " + rect.x.animVal.value + " but we expected 0.";
+
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 50);
+ </script>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (121257 => 121258)
--- trunk/Source/WebCore/ChangeLog 2012-06-26 12:49:12 UTC (rev 121257)
+++ trunk/Source/WebCore/ChangeLog 2012-06-26 12:56:13 UTC (rev 121258)
@@ -1,3 +1,20 @@
+2012-06-26 Philip Rogers <p...@google.com>
+
+ Fix bug where animations failed to start
+ https://bugs.webkit.org/show_bug.cgi?id=89943
+
+ Reviewed by Nikolas Zimmermann.
+
+ The unpause code previously checked that the animations had not started
+ before un-setting the pause state. This meant that if an animation was
+ paused and unpaused before the animations started, it would remain in the
+ paused state. This patch simply reorders the unpause logic to fix this bug.
+
+ Test: svg/custom/animate-initial-pause-unpause.html
+
+ * svg/animation/SMILTimeContainer.cpp:
+ (WebCore::SMILTimeContainer::resume):
+
2012-06-26 Yury Semikhatsky <yu...@chromium.org>
Web Inspector: popover is not shown for detached DOM nodes, not referenced directly from JS
Modified: trunk/Source/WebCore/svg/animation/SMILTimeContainer.cpp (121257 => 121258)
--- trunk/Source/WebCore/svg/animation/SMILTimeContainer.cpp 2012-06-26 12:49:12 UTC (rev 121257)
+++ trunk/Source/WebCore/svg/animation/SMILTimeContainer.cpp 2012-06-26 12:56:13 UTC (rev 121258)
@@ -112,10 +112,11 @@
void SMILTimeContainer::resume()
{
- if (!m_beginTime)
- return;
ASSERT(isPaused());
- m_accumulatedPauseTime += currentTime() - m_pauseTime;
+
+ if (m_beginTime)
+ m_accumulatedPauseTime += currentTime() - m_pauseTime;
+
m_pauseTime = 0;
startTimer(0);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes