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.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121258
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-06-26 Philip Rogers <pdr@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.santos@intel.com>
[EFL] Gardening of new passing tests
--- /dev/null
+<!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>
+2012-06-26 Philip Rogers <pdr@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 <yurys@chromium.org>
Web Inspector: popover is not shown for detached DOM nodes, not referenced directly from JS
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);
}