Support values animation mode with just a single value
authorzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Apr 2012 14:58:46 +0000 (14:58 +0000)
committerzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Apr 2012 14:58:46 +0000 (14:58 +0000)
commitc32d97f23340f3ed54159e4e258f75c4bdbe4bad
treeda93d4160c43e1d510647d116bfc2ca393691fc6
parente635990dbced3ae7500d5f3813ab3a20d04e055e
Support values animation mode with just a single value
https://bugs.webkit.org/show_bug.cgi?id=85064

Reviewed by Antti Koivisto.

Source/WebCore:

values="a" is equal to <set to="a"> per SMIL specification.
We currently only support values animation if at least two values are given, fix that.

The reference animations in Dr. Olaf Hoffmanns SVG Animation test suite are mostly using
values animations, sometimes with only a single value given. Lots of the reference animations
are broken in trunk w/o this patch and now work as expected.

See http://hoffmann.bplaced.net/svgtest/index.php?s=en&in=start.

Test: svg/animations/single-values-animation.html

* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
(WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
(WebCore::SVGAnimationElement::startedActiveInterval):

LayoutTests:

* svg/animations/resources/single-values-animation.svg: Added.
* svg/animations/script-tests/single-values-animation.js: Added.
(sample1):
(sample2):
(executeTest):
* svg/animations/single-values-animation-expected.txt: Added.
* svg/animations/single-values-animation.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/animations/resources/single-values-animation.svg [new file with mode: 0644]
LayoutTests/svg/animations/script-tests/single-values-animation.js [new file with mode: 0644]
LayoutTests/svg/animations/single-values-animation-expected.txt [new file with mode: 0644]
LayoutTests/svg/animations/single-values-animation.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/svg/SVGAnimationElement.cpp