Fix rewinding of SVG animations
authorpdr@google.com <pdr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jun 2012 10:31:06 +0000 (10:31 +0000)
committerpdr@google.com <pdr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jun 2012 10:31:06 +0000 (10:31 +0000)
commitca62d585121262ff90a3538ee2f8f783b7b6f7b9
tree816be0e5a04f866c9b88f54977a5e2b3b797c409
parent7f6a819a30efe92067e3a23caf617be0ac896d4d
Fix rewinding of SVG animations
https://bugs.webkit.org/show_bug.cgi?id=89846

Reviewed by Nikolas Zimmermann.

Source/WebCore:

r116451 introduced an optimization to only clear non-freeze animations when
calling setCurrentTime (via reset()). This causes fill=freeze animations to
not clear which breaks rewinding of an animation.

In the presence of multiple animations, we reset the first animation to the
base value and accumulate all results into that; this masked the problem because
2 animations were required to hit the bug (our tests primarily cover just 1).

Test: svg/animations/animate-reset-freeze.html

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

LayoutTests:

* svg/animations/animate-reset-freeze-expected.txt: Added.
* svg/animations/animate-reset-freeze.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121146 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/animations/animate-reset-freeze-expected.txt [new file with mode: 0644]
LayoutTests/svg/animations/animate-reset-freeze.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/svg/animation/SVGSMILElement.cpp