SVGAnimation does not support 'values' for from-to animations
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Sep 2011 08:17:38 +0000 (08:17 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Sep 2011 08:17:38 +0000 (08:17 +0000)
commit56d0e548f5b6e9857337b50ef7ea357627fbf232
treeb8f02ea42b3e178b85476ce9eeb4838bb669b126
parentd51019c1fddac6a502028985600394bb4d5dae30
SVGAnimation does not support 'values' for from-to animations
https://bugs.webkit.org/show_bug.cgi?id=64859

Patch by Young Han Lee <joybro@company100.net> on 2011-09-24
Reviewed by Dirk Schulze.

If from-to animation have discrete calc-mode and have a 'keyTimes' list, values of
the keyTimes indicate the begin and the end of the animation respectively.[1][2]

When keyTimes is given, calculate the progress percentage of the animation with it
even for from-to animation.

[1] http://www.w3.org/TR/SVG/animate.html#ValueAttributes
[2] http://www.w3.org/TR/2001/REC-smil-animation-20010904/#AnimFuncValues

Source/WebCore:

Test: svg/animations/animate-from-to-keyTimes.html

* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::calculatePercentForFromTo):
(WebCore::SVGAnimationElement::updateAnimation):
* svg/SVGAnimationElement.h:

LayoutTests:

* svg/animations/animate-from-to-keyTimes-expected.txt: Added.
* svg/animations/animate-from-to-keyTimes.html: Added.
* svg/animations/script-tests/animate-from-to-keyTimes.js: Added.
(sample1):
(sample2):
(executeTest):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/animations/animate-from-to-keyTimes-expected.txt [new file with mode: 0644]
LayoutTests/svg/animations/animate-from-to-keyTimes.html [new file with mode: 0644]
LayoutTests/svg/animations/script-tests/animate-from-to-keyTimes.js [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/svg/SVGAnimationElement.cpp
Source/WebCore/svg/SVGAnimationElement.h