haikuwebkit/LayoutTests/svg/animations/svgtransform-animation-disc...

34 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

Return to transform multiplication: motion transform * other transforms https://bugs.webkit.org/show_bug.cgi?id=67601 Source/WebCore: Reviewed by Nikolas Zimmermann. Right now we take the current transform of a transformable SVG element, post multiply the animation transform and post multiply the motion transform to the other both: transform * animation transform * motion transform We switched to this behavior with the clean up of AffineTransform. While the specification of SVG demands us to do so, no other SVG viewer is doing it that way. Now switching back to: motion transform * transform * animation transform This is done by other SVG viewers as well. While their is no consense about how to multiply the different transforms on the SVG WG, their is a consense that the current specified behavior is unwanted. See http://lists.w3.org/Archives/Public/www-svg/2011Jan/0055.html for more details. We pass the following tests of the official W3C SVG test suite again now: - animate-elem-24-t.svg - animate-elem-30-t.svg * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::animatedLocalTransform): * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::animatedLocalTransform): LayoutTests: Reviewed by Nikolas Zimmermann. Change the expected results of nested transformations to match new behavior on matrices multiplications. * svg/animations/animate-path-nested-transforms-expected.txt: * svg/animations/animate-text-nested-transforms-expected.txt: * svg/animations/script-tests/animate-path-nested-transforms.js: (startSample): (endSample): * svg/animations/script-tests/animate-text-nested-transforms.js: (startSample): (endSample): * svg/animations/svgtransform-animation-discrete-expected.txt: * svg/animations/svgtransform-animation-discrete.html: Canonical link: https://commits.webkit.org/83463@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@94558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-09-06 08:18:23 +00:00
SVG 1.1 dynamic animation tests
Test calcMode=discrete animation on SVGAnimateTransform.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS rect.transform.animVal.numberOfItems is 1
PASS rect.transform.animVal.getItem(0).type is SVGTransform.SVG_TRANSFORM_TRANSLATE
PASS rect.transform.animVal.getItem(0).matrix.e is 100
PASS rect.transform.animVal.getItem(0).matrix.f is 100
Fix repetitions & by animation support for SVGAnimateTransformElement https://bugs.webkit.org/show_bug.cgi?id=85051 Reviewed by Antti Koivisto. Source/WebCore: Repetitions are currently handled by adjusting percentage (percentage += repeatCount). This doesn't work for <animateTransform> as each repetition has to be post-multiplied to the animated transform list. Fix that. By-animations are equal to values="0;by" animations in SMIL. '0' is the neutral element of addition, which is the _zero_ matrix, not the identity matrix for SVGTransform. Add a new construction mode to SVGTransform to be able to construct zero transforms. Tests: svg/animations/animateTransform-accumulation-expected.svg svg/animations/animateTransform-accumulation.svg svg/animations/animateTransform-by-scale-expected.svg svg/animations/animateTransform-by-scale.svg svg/animations/animateTransform-from-by-from-to-comparision-expected.svg svg/animations/animateTransform-from-by-from-to-comparision.svg svg/animations/animateTransform-from-by-scale-additive-sum-expected.svg svg/animations/animateTransform-from-by-scale-additive-sum.svg svg/animations/animateTransform-from-by-scale-expected.svg svg/animations/animateTransform-from-by-scale.svg svg/animations/animateTransform-rotate-around-point-expected.svg svg/animations/animateTransform-rotate-around-point.svg svg/animations/animateTransform-skewX-expected.svg svg/animations/animateTransform-skewX.svg svg/animations/animateTransform-skewY-expected.svg svg/animations/animateTransform-skewY.svg svg/animations/animateTransform-translate-expected.svg svg/animations/animateTransform-translate.svg svg/animations/multiple-animateTransform-additive-sum-expected.svg svg/animations/multiple-animateTransform-additive-sum.svg * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::parseAttribute): * svg/SVGAnimatedTransformList.cpp: (WebCore::SVGAnimatedTransformListAnimator::addAnimatedTypes): (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue): * svg/SVGAnimationElement.h: (WebCore::SVGAnimationElement::adjustFromToListValues): * svg/SVGTransform.cpp: (WebCore::SVGTransform::SVGTransform): * svg/SVGTransform.h: * svg/SVGTransformDistance.cpp: (WebCore::SVGTransformDistance::SVGTransformDistance): (WebCore::SVGTransformDistance::scaledDistance): (WebCore::SVGTransformDistance::addSVGTransforms): (WebCore::SVGTransformDistance::addToSVGTransform): (WebCore::SVGTransformDistance::distance): * svg/SVGTransformDistance.h: (SVGTransformDistance): LayoutTests: Enable <animateTransform> test in additive-type-by-animation, which was disabled as it triggered assertions before this patch. Add lots of new <animateTransform> covering additive/accumulative animations using reftests, for all animateTransform types (translate/rotate/skewX/skewY/scale). * svg/animations/additive-type-by-animation-expected.txt: * svg/animations/animateTransform-accumulation-expected.svg: Added. * svg/animations/animateTransform-accumulation.svg: Added. * svg/animations/animateTransform-by-scale-expected.svg: Added. * svg/animations/animateTransform-by-scale.svg: Added. * svg/animations/animateTransform-from-by-from-to-comparision-expected.svg: Added. * svg/animations/animateTransform-from-by-from-to-comparision.svg: Added. * svg/animations/animateTransform-from-by-scale-additive-sum-expected.svg: Added. * svg/animations/animateTransform-from-by-scale-additive-sum.svg: Added. * svg/animations/animateTransform-from-by-scale-expected.svg: Added. * svg/animations/animateTransform-from-by-scale.svg: Added. * svg/animations/animateTransform-rotate-around-point-expected.svg: Added. * svg/animations/animateTransform-rotate-around-point.svg: Added. * svg/animations/animateTransform-skewX-expected.svg: Added. * svg/animations/animateTransform-skewX.svg: Added. * svg/animations/animateTransform-skewY-expected.svg: Added. * svg/animations/animateTransform-skewY.svg: Added. * svg/animations/animateTransform-translate-expected.svg: Added. * svg/animations/animateTransform-translate.svg: Added. * svg/animations/multiple-animateTransform-additive-sum-expected.svg: Added. * svg/animations/multiple-animateTransform-additive-sum.svg: Added. * svg/animations/resources/additive-type-by-animation.svg: * svg/animations/script-tests/additive-type-by-animation.js: (checkBaseVal): (sample1): (sample2): (sample3): * svg/animations/script-tests/svgtransform-animation-1.js: (sample1): (sample2): (sample3): (sample4): (sample5): (sample6): (sample7): (executeTest): * svg/animations/script-tests/svgtransform-animation-discrete.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/svgtransform-animation-1-expected.txt: * svg/animations/svgtransform-animation-discrete-expected.txt: Canonical link: https://commits.webkit.org/102562@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-27 14:10:59 +00:00
PASS rect.transform.baseVal.numberOfItems is 0
PASS rect.transform.animVal.numberOfItems is 1
PASS rect.transform.animVal.getItem(0).type is SVGTransform.SVG_TRANSFORM_TRANSLATE
PASS rect.transform.animVal.getItem(0).matrix.e is 100
PASS rect.transform.animVal.getItem(0).matrix.f is 100
Fix repetitions & by animation support for SVGAnimateTransformElement https://bugs.webkit.org/show_bug.cgi?id=85051 Reviewed by Antti Koivisto. Source/WebCore: Repetitions are currently handled by adjusting percentage (percentage += repeatCount). This doesn't work for <animateTransform> as each repetition has to be post-multiplied to the animated transform list. Fix that. By-animations are equal to values="0;by" animations in SMIL. '0' is the neutral element of addition, which is the _zero_ matrix, not the identity matrix for SVGTransform. Add a new construction mode to SVGTransform to be able to construct zero transforms. Tests: svg/animations/animateTransform-accumulation-expected.svg svg/animations/animateTransform-accumulation.svg svg/animations/animateTransform-by-scale-expected.svg svg/animations/animateTransform-by-scale.svg svg/animations/animateTransform-from-by-from-to-comparision-expected.svg svg/animations/animateTransform-from-by-from-to-comparision.svg svg/animations/animateTransform-from-by-scale-additive-sum-expected.svg svg/animations/animateTransform-from-by-scale-additive-sum.svg svg/animations/animateTransform-from-by-scale-expected.svg svg/animations/animateTransform-from-by-scale.svg svg/animations/animateTransform-rotate-around-point-expected.svg svg/animations/animateTransform-rotate-around-point.svg svg/animations/animateTransform-skewX-expected.svg svg/animations/animateTransform-skewX.svg svg/animations/animateTransform-skewY-expected.svg svg/animations/animateTransform-skewY.svg svg/animations/animateTransform-translate-expected.svg svg/animations/animateTransform-translate.svg svg/animations/multiple-animateTransform-additive-sum-expected.svg svg/animations/multiple-animateTransform-additive-sum.svg * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::parseAttribute): * svg/SVGAnimatedTransformList.cpp: (WebCore::SVGAnimatedTransformListAnimator::addAnimatedTypes): (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue): * svg/SVGAnimationElement.h: (WebCore::SVGAnimationElement::adjustFromToListValues): * svg/SVGTransform.cpp: (WebCore::SVGTransform::SVGTransform): * svg/SVGTransform.h: * svg/SVGTransformDistance.cpp: (WebCore::SVGTransformDistance::SVGTransformDistance): (WebCore::SVGTransformDistance::scaledDistance): (WebCore::SVGTransformDistance::addSVGTransforms): (WebCore::SVGTransformDistance::addToSVGTransform): (WebCore::SVGTransformDistance::distance): * svg/SVGTransformDistance.h: (SVGTransformDistance): LayoutTests: Enable <animateTransform> test in additive-type-by-animation, which was disabled as it triggered assertions before this patch. Add lots of new <animateTransform> covering additive/accumulative animations using reftests, for all animateTransform types (translate/rotate/skewX/skewY/scale). * svg/animations/additive-type-by-animation-expected.txt: * svg/animations/animateTransform-accumulation-expected.svg: Added. * svg/animations/animateTransform-accumulation.svg: Added. * svg/animations/animateTransform-by-scale-expected.svg: Added. * svg/animations/animateTransform-by-scale.svg: Added. * svg/animations/animateTransform-from-by-from-to-comparision-expected.svg: Added. * svg/animations/animateTransform-from-by-from-to-comparision.svg: Added. * svg/animations/animateTransform-from-by-scale-additive-sum-expected.svg: Added. * svg/animations/animateTransform-from-by-scale-additive-sum.svg: Added. * svg/animations/animateTransform-from-by-scale-expected.svg: Added. * svg/animations/animateTransform-from-by-scale.svg: Added. * svg/animations/animateTransform-rotate-around-point-expected.svg: Added. * svg/animations/animateTransform-rotate-around-point.svg: Added. * svg/animations/animateTransform-skewX-expected.svg: Added. * svg/animations/animateTransform-skewX.svg: Added. * svg/animations/animateTransform-skewY-expected.svg: Added. * svg/animations/animateTransform-skewY.svg: Added. * svg/animations/animateTransform-translate-expected.svg: Added. * svg/animations/animateTransform-translate.svg: Added. * svg/animations/multiple-animateTransform-additive-sum-expected.svg: Added. * svg/animations/multiple-animateTransform-additive-sum.svg: Added. * svg/animations/resources/additive-type-by-animation.svg: * svg/animations/script-tests/additive-type-by-animation.js: (checkBaseVal): (sample1): (sample2): (sample3): * svg/animations/script-tests/svgtransform-animation-1.js: (sample1): (sample2): (sample3): (sample4): (sample5): (sample6): (sample7): (executeTest): * svg/animations/script-tests/svgtransform-animation-discrete.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/svgtransform-animation-1-expected.txt: * svg/animations/svgtransform-animation-discrete-expected.txt: Canonical link: https://commits.webkit.org/102562@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-27 14:10:59 +00:00
PASS rect.transform.baseVal.numberOfItems is 0
PASS rect.transform.animVal.numberOfItems is 1
PASS rect.transform.animVal.getItem(0).type is SVGTransform.SVG_TRANSFORM_TRANSLATE
PASS rect.transform.animVal.getItem(0).matrix.e is 0
PASS rect.transform.animVal.getItem(0).matrix.f is 0
Fix repetitions & by animation support for SVGAnimateTransformElement https://bugs.webkit.org/show_bug.cgi?id=85051 Reviewed by Antti Koivisto. Source/WebCore: Repetitions are currently handled by adjusting percentage (percentage += repeatCount). This doesn't work for <animateTransform> as each repetition has to be post-multiplied to the animated transform list. Fix that. By-animations are equal to values="0;by" animations in SMIL. '0' is the neutral element of addition, which is the _zero_ matrix, not the identity matrix for SVGTransform. Add a new construction mode to SVGTransform to be able to construct zero transforms. Tests: svg/animations/animateTransform-accumulation-expected.svg svg/animations/animateTransform-accumulation.svg svg/animations/animateTransform-by-scale-expected.svg svg/animations/animateTransform-by-scale.svg svg/animations/animateTransform-from-by-from-to-comparision-expected.svg svg/animations/animateTransform-from-by-from-to-comparision.svg svg/animations/animateTransform-from-by-scale-additive-sum-expected.svg svg/animations/animateTransform-from-by-scale-additive-sum.svg svg/animations/animateTransform-from-by-scale-expected.svg svg/animations/animateTransform-from-by-scale.svg svg/animations/animateTransform-rotate-around-point-expected.svg svg/animations/animateTransform-rotate-around-point.svg svg/animations/animateTransform-skewX-expected.svg svg/animations/animateTransform-skewX.svg svg/animations/animateTransform-skewY-expected.svg svg/animations/animateTransform-skewY.svg svg/animations/animateTransform-translate-expected.svg svg/animations/animateTransform-translate.svg svg/animations/multiple-animateTransform-additive-sum-expected.svg svg/animations/multiple-animateTransform-additive-sum.svg * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::parseAttribute): * svg/SVGAnimatedTransformList.cpp: (WebCore::SVGAnimatedTransformListAnimator::addAnimatedTypes): (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue): * svg/SVGAnimationElement.h: (WebCore::SVGAnimationElement::adjustFromToListValues): * svg/SVGTransform.cpp: (WebCore::SVGTransform::SVGTransform): * svg/SVGTransform.h: * svg/SVGTransformDistance.cpp: (WebCore::SVGTransformDistance::SVGTransformDistance): (WebCore::SVGTransformDistance::scaledDistance): (WebCore::SVGTransformDistance::addSVGTransforms): (WebCore::SVGTransformDistance::addToSVGTransform): (WebCore::SVGTransformDistance::distance): * svg/SVGTransformDistance.h: (SVGTransformDistance): LayoutTests: Enable <animateTransform> test in additive-type-by-animation, which was disabled as it triggered assertions before this patch. Add lots of new <animateTransform> covering additive/accumulative animations using reftests, for all animateTransform types (translate/rotate/skewX/skewY/scale). * svg/animations/additive-type-by-animation-expected.txt: * svg/animations/animateTransform-accumulation-expected.svg: Added. * svg/animations/animateTransform-accumulation.svg: Added. * svg/animations/animateTransform-by-scale-expected.svg: Added. * svg/animations/animateTransform-by-scale.svg: Added. * svg/animations/animateTransform-from-by-from-to-comparision-expected.svg: Added. * svg/animations/animateTransform-from-by-from-to-comparision.svg: Added. * svg/animations/animateTransform-from-by-scale-additive-sum-expected.svg: Added. * svg/animations/animateTransform-from-by-scale-additive-sum.svg: Added. * svg/animations/animateTransform-from-by-scale-expected.svg: Added. * svg/animations/animateTransform-from-by-scale.svg: Added. * svg/animations/animateTransform-rotate-around-point-expected.svg: Added. * svg/animations/animateTransform-rotate-around-point.svg: Added. * svg/animations/animateTransform-skewX-expected.svg: Added. * svg/animations/animateTransform-skewX.svg: Added. * svg/animations/animateTransform-skewY-expected.svg: Added. * svg/animations/animateTransform-skewY.svg: Added. * svg/animations/animateTransform-translate-expected.svg: Added. * svg/animations/animateTransform-translate.svg: Added. * svg/animations/multiple-animateTransform-additive-sum-expected.svg: Added. * svg/animations/multiple-animateTransform-additive-sum.svg: Added. * svg/animations/resources/additive-type-by-animation.svg: * svg/animations/script-tests/additive-type-by-animation.js: (checkBaseVal): (sample1): (sample2): (sample3): * svg/animations/script-tests/svgtransform-animation-1.js: (sample1): (sample2): (sample3): (sample4): (sample5): (sample6): (sample7): (executeTest): * svg/animations/script-tests/svgtransform-animation-discrete.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/svgtransform-animation-1-expected.txt: * svg/animations/svgtransform-animation-discrete-expected.txt: Canonical link: https://commits.webkit.org/102562@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-27 14:10:59 +00:00
PASS rect.transform.baseVal.numberOfItems is 0
PASS rect.transform.animVal.numberOfItems is 1
PASS rect.transform.animVal.getItem(0).type is SVGTransform.SVG_TRANSFORM_TRANSLATE
PASS rect.transform.animVal.getItem(0).matrix.e is 0
PASS rect.transform.animVal.getItem(0).matrix.f is 0
Fix repetitions & by animation support for SVGAnimateTransformElement https://bugs.webkit.org/show_bug.cgi?id=85051 Reviewed by Antti Koivisto. Source/WebCore: Repetitions are currently handled by adjusting percentage (percentage += repeatCount). This doesn't work for <animateTransform> as each repetition has to be post-multiplied to the animated transform list. Fix that. By-animations are equal to values="0;by" animations in SMIL. '0' is the neutral element of addition, which is the _zero_ matrix, not the identity matrix for SVGTransform. Add a new construction mode to SVGTransform to be able to construct zero transforms. Tests: svg/animations/animateTransform-accumulation-expected.svg svg/animations/animateTransform-accumulation.svg svg/animations/animateTransform-by-scale-expected.svg svg/animations/animateTransform-by-scale.svg svg/animations/animateTransform-from-by-from-to-comparision-expected.svg svg/animations/animateTransform-from-by-from-to-comparision.svg svg/animations/animateTransform-from-by-scale-additive-sum-expected.svg svg/animations/animateTransform-from-by-scale-additive-sum.svg svg/animations/animateTransform-from-by-scale-expected.svg svg/animations/animateTransform-from-by-scale.svg svg/animations/animateTransform-rotate-around-point-expected.svg svg/animations/animateTransform-rotate-around-point.svg svg/animations/animateTransform-skewX-expected.svg svg/animations/animateTransform-skewX.svg svg/animations/animateTransform-skewY-expected.svg svg/animations/animateTransform-skewY.svg svg/animations/animateTransform-translate-expected.svg svg/animations/animateTransform-translate.svg svg/animations/multiple-animateTransform-additive-sum-expected.svg svg/animations/multiple-animateTransform-additive-sum.svg * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::parseAttribute): * svg/SVGAnimatedTransformList.cpp: (WebCore::SVGAnimatedTransformListAnimator::addAnimatedTypes): (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue): * svg/SVGAnimationElement.h: (WebCore::SVGAnimationElement::adjustFromToListValues): * svg/SVGTransform.cpp: (WebCore::SVGTransform::SVGTransform): * svg/SVGTransform.h: * svg/SVGTransformDistance.cpp: (WebCore::SVGTransformDistance::SVGTransformDistance): (WebCore::SVGTransformDistance::scaledDistance): (WebCore::SVGTransformDistance::addSVGTransforms): (WebCore::SVGTransformDistance::addToSVGTransform): (WebCore::SVGTransformDistance::distance): * svg/SVGTransformDistance.h: (SVGTransformDistance): LayoutTests: Enable <animateTransform> test in additive-type-by-animation, which was disabled as it triggered assertions before this patch. Add lots of new <animateTransform> covering additive/accumulative animations using reftests, for all animateTransform types (translate/rotate/skewX/skewY/scale). * svg/animations/additive-type-by-animation-expected.txt: * svg/animations/animateTransform-accumulation-expected.svg: Added. * svg/animations/animateTransform-accumulation.svg: Added. * svg/animations/animateTransform-by-scale-expected.svg: Added. * svg/animations/animateTransform-by-scale.svg: Added. * svg/animations/animateTransform-from-by-from-to-comparision-expected.svg: Added. * svg/animations/animateTransform-from-by-from-to-comparision.svg: Added. * svg/animations/animateTransform-from-by-scale-additive-sum-expected.svg: Added. * svg/animations/animateTransform-from-by-scale-additive-sum.svg: Added. * svg/animations/animateTransform-from-by-scale-expected.svg: Added. * svg/animations/animateTransform-from-by-scale.svg: Added. * svg/animations/animateTransform-rotate-around-point-expected.svg: Added. * svg/animations/animateTransform-rotate-around-point.svg: Added. * svg/animations/animateTransform-skewX-expected.svg: Added. * svg/animations/animateTransform-skewX.svg: Added. * svg/animations/animateTransform-skewY-expected.svg: Added. * svg/animations/animateTransform-skewY.svg: Added. * svg/animations/animateTransform-translate-expected.svg: Added. * svg/animations/animateTransform-translate.svg: Added. * svg/animations/multiple-animateTransform-additive-sum-expected.svg: Added. * svg/animations/multiple-animateTransform-additive-sum.svg: Added. * svg/animations/resources/additive-type-by-animation.svg: * svg/animations/script-tests/additive-type-by-animation.js: (checkBaseVal): (sample1): (sample2): (sample3): * svg/animations/script-tests/svgtransform-animation-1.js: (sample1): (sample2): (sample3): (sample4): (sample5): (sample6): (sample7): (executeTest): * svg/animations/script-tests/svgtransform-animation-discrete.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/svgtransform-animation-1-expected.txt: * svg/animations/svgtransform-animation-discrete-expected.txt: Canonical link: https://commits.webkit.org/102562@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-27 14:10:59 +00:00
PASS rect.transform.baseVal.numberOfItems is 0
Convert svg/animations to use SMIL methods for driving the timeline https://bugs.webkit.org/show_bug.cgi?id=78422 Reviewed by Dirk Schulze. Source/WebCore: Switch the svg/animations tests to use SVGSVGElement.setCurrentTime to drive the animation timeline. This should fix all flakiness we previously had with these tests - and as nice side-effect we're now using the standard SVG methods to drive the timeline, and thus have more coverage for these methods. It already exposed several SMIL bugs, that had to be fixed, before this worked: - beginElement()/endElement() modify the begin/end times of a SVGSMILElement. When beginElement() is called a new begin time is added to the list - and the same happens for endElement() with the end list. Unfortunately the begin/end times never get removed again, leading to incorrect instance time resolving when begin/endElement is called repeatedly, combined with moving the timeline through setCurrentTime. SMIL3 specifically demands that all 'dynamic' times in the begin/endTimes list, such that got inserted via beginElement/endElement - get removed if the begin/endTimes list is updated. Why? When calling beginElement, then endElement, then beginElement again, the begin/endTimes lists should be identical, w/o leftovers from any previous begin/endElement call. To keep track of that introduce SMILTimeWithOrigin, which holds a SMILTime and an Origin enum, which determines whether this SMILTime was created by the parser or dynamically created via beginElement/endElement. - SMILTimeContainer::setElapsed() (called by SVGSVGElement::setCurrentTime) forgot to update the animation state, when it was not paused. - document.getElementsByTagName('animateMotion')[0], always returned 'object SVGElement', instead of SVGAnimateMotion element making it impossible to query the animation start time, as the interfaces from SVGAnimationElement were not available. Fix that by removing the last hacks from svgtags.in, now that all IDLs are available. Now that we use SVGSVGElement::setCurrentTime to drive the animation testing, we can remove the DRT specific sampleSVGAnimationAtTime functionality, and its code springled all over WebCore. Covered by all existing tests in svg/animations. * WebCore.exp.in: Remove sampleAnimationAtTime() symbols. * WebCore.order: Ditto. * svg/SVGAnimationElement.cpp: Add a flag to begin/endElement, SMILTimeWithOrigin::ScriptOrigin, to indicate that these are dynamic SMILTimes, added by a script. (WebCore::SVGAnimationElement::beginElementAt): (WebCore::SVGAnimationElement::endElementAt): * svg/SVGDocumentExtensions.cpp: Remove sampleAnimationAtTime. * svg/SVGDocumentExtensions.h: Ditto. * svg/animation/SMILTime.h: Add SMILTimeWithOrigin helper. (SMILTimeWithOrigin): Needs a SMILTime and an Origin enum entry. (WebCore::SMILTimeWithOrigin::SMILTimeWithOrigin): (WebCore::SMILTimeWithOrigin::time): Returns the SMILTime. (WebCore::SMILTimeWithOrigin::originIsScript): Determines if this SMILTime got added by a script. (WebCore::operator<): Used by std::sort. * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::setElapsed): Always call updateAnimations, even if the animation is not paused. Use the right elpased time value, to seek precisely to the desired position. (WebCore::SMILTimeContainer::timerFired): Cleanup code, no need for a local variable 'elapsed'. (WebCore::SMILTimeContainer::updateAnimations): Remove DRT specific sampling code, which is no longer needed. * svg/animation/SMILTimeContainer.h: Remove sampleAnimationAtTime. * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::SVGSMILElement): Only call resolveFirstInterval, not reset, from the constructor - it wastes unnecessary time, as everything is already initialized. (WebCore::clearTimesWithDynamicOrigins): Helper function to clear all SMILTimes from the begin/endTimes list, that are dynamic. (WebCore::SVGSMILElement::reset): Clear begin/endTimes lists, on any reset() call (when driving the animation timeline through setElapsed). (WebCore::SVGSMILElement::insertedIntoDocument): m_beginTimes now stores SMILTimeWithOrigins, adapt the code. (WebCore::sortTimeList): Ditto. (WebCore::SVGSMILElement::parseBeginOrEnd): Ditto. (WebCore::SVGSMILElement::addBeginTime): Ditto. (WebCore::SVGSMILElement::addEndTime): Ditto. (WebCore::extractTimeFromVector): Ditto. (WebCore::SVGSMILElement::findInstanceTime): Ditto. * svg/animation/SVGSMILElement.h: * svg/svgtags.in: Enable animateMotion/hkern/mpath JS interfaces, which were not enabled, despite their IDLs existed. Source/WebKit/chromium: Remove SVG animation sampling functionality provided for DRT, which no longer uses it. Instead we switched the svg/animations tests to use SVGSVGElement.setCurrentTime. * public/WebFrame.h: (WebFrame): * src/WebFrameImpl.cpp: * src/WebFrameImpl.h: (WebFrameImpl): Source/WebKit/efl: Remove SVG animation sampling functionality provided for DRT, which no longer uses it. Instead we switched the svg/animations tests to use SVGSVGElement.setCurrentTime. * WebCoreSupport/DumpRenderTreeSupportEfl.cpp: * WebCoreSupport/DumpRenderTreeSupportEfl.h: Source/WebKit/gtk: Remove SVG animation sampling functionality provided for DRT, which no longer uses it. Instead we switched the svg/animations tests to use SVGSVGElement.setCurrentTime. * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: * WebCoreSupport/DumpRenderTreeSupportGtk.h: (DumpRenderTreeSupportGtk): Source/WebKit/mac: Remove SVG animation sampling functionality provided for DRT, which no longer uses it. Instead we switched the svg/animations tests to use SVGSVGElement.setCurrentTime. * WebKit.order: * WebView/WebFrame.mm: * WebView/WebFramePrivate.h: Source/WebKit/qt: Remove SVG animation sampling functionality provided for DRT, which no longer uses it. Instead we switched the svg/animations tests to use SVGSVGElement.setCurrentTime. * WebCoreSupport/DumpRenderTreeSupportQt.cpp: * WebCoreSupport/DumpRenderTreeSupportQt.h: Source/WebKit/win: Remove SVG animation sampling functionality provided for DRT, which no longer uses it. Instead we switched the svg/animations tests to use SVGSVGElement.setCurrentTime. * Interfaces/IWebFramePrivate.idl: * WebFrame.cpp: * WebFrame.h: Tools: Remove no longer needed SVG specific animation sampling functionality from DRT. Instead we switched the svg/animations tests to use SVGSVGElement.setCurrentTime. * DumpRenderTree/LayoutTestController.cpp: (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController): * DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp: * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): * DumpRenderTree/chromium/LayoutTestController.h: (LayoutTestController): * DumpRenderTree/efl/LayoutTestControllerEfl.cpp: * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: * DumpRenderTree/mac/LayoutTestControllerMac.mm: * DumpRenderTree/qt/LayoutTestControllerQt.cpp: * DumpRenderTree/qt/LayoutTestControllerQt.h: (LayoutTestController): * DumpRenderTree/win/LayoutTestControllerWin.cpp: * DumpRenderTree/wx/LayoutTestControllerWx.cpp: LayoutTests: Switch the svg/animations tests to use SVGSVGElement.setCurrentTime to drive the animation timeline. This should fix all flakiness we previously had with these tests - and as nice side-effect we're now using the standard SVG methods to drive the timeline, and thus have more coverage for these methods. It already exposed several SMIL bugs, that had to be fixed, before this worked. This also unifies & cleans up the tests, to use the same formatting and the same shouldBeCloseEnough helpers. * svg/animations/animVal-basics-expected.txt: * svg/animations/animVal-basics.html: * svg/animations/animate-calcMode-spline-by-expected.txt: * svg/animations/animate-calcMode-spline-by.html: * svg/animations/animate-calcMode-spline-from-by-expected.txt: * svg/animations/animate-calcMode-spline-from-by.html: * svg/animations/animate-calcMode-spline-from-to-expected.txt: * svg/animations/animate-calcMode-spline-from-to.html: * svg/animations/animate-calcMode-spline-to-expected.txt: * svg/animations/animate-calcMode-spline-to.html: * svg/animations/animate-calcMode-spline-values-expected.txt: * svg/animations/animate-calcMode-spline-values.html: * svg/animations/animate-color-calcMode-discrete.html: * svg/animations/animate-color-fill-currentColor.html: * svg/animations/animate-color-fill-from-by.html: * svg/animations/animate-color-rgba-calcMode-discrete.html: * svg/animations/animate-color-transparent.html: * svg/animations/animate-currentColor.html: * svg/animations/animate-dynamic-update-attributeName.html: * svg/animations/animate-end-attribute-expected.txt: * svg/animations/animate-end-attribute.html: * svg/animations/animate-endElement-beginElement.html: * svg/animations/animate-from-to-keyTimes.html: * svg/animations/animate-gradient-transform.html: * svg/animations/animate-inherit-css-property.html: * svg/animations/animate-insert-begin.html: * svg/animations/animate-insert-no-begin.html: * svg/animations/animate-keySplines.html: * svg/animations/animate-mpath-insert.html: * svg/animations/animate-number-calcMode-discrete-expected.txt: * svg/animations/animate-number-calcMode-discrete-keyTimes.html: * svg/animations/animate-number-calcMode-discrete.html: * svg/animations/animate-path-animation-Cc-Ss-expected.txt: * svg/animations/animate-path-animation-Cc-Ss.html: * svg/animations/animate-path-animation-Ll-Vv-Hh-expected.txt: * svg/animations/animate-path-animation-Ll-Vv-Hh.html: * svg/animations/animate-path-animation-Qq-Tt.html: * svg/animations/animate-path-animation-cC-sS-inverse-expected.txt: * svg/animations/animate-path-animation-cC-sS-inverse.html: * svg/animations/animate-path-animation-lL-vV-hH-inverse-expected.txt: * svg/animations/animate-path-animation-lL-vV-hH-inverse.html: * svg/animations/animate-path-animation-qQ-tT-inverse.html: * svg/animations/animate-path-nested-transforms-expected.txt: * svg/animations/animate-path-nested-transforms.html: * svg/animations/animate-path-to-animation-expected.txt: * svg/animations/animate-path-to-animation.html: * svg/animations/animate-text-nested-transforms-expected.txt: * svg/animations/animate-text-nested-transforms.html: * svg/animations/animateTransform-pattern-transform.html: * svg/animations/resources/SVGAnimationTestCase.js: (isCloseEnough): (shouldBeCloseEnough): (moveAnimationTimelineAndSample): (sampleAnimation): (runSMILTest): (runAnimationTest): * svg/animations/script-tests/TEMPLATE.html: Removed. * svg/animations/script-tests/animVal-basics.js: (sample3): (executeTest): * svg/animations/script-tests/animate-calcMode-spline-by.js: (sample2): (sample3): (executeTest): * svg/animations/script-tests/animate-calcMode-spline-from-by.js: (sample2): (sample3): (executeTest): * svg/animations/script-tests/animate-calcMode-spline-from-to.js: (sample2): (sample3): (executeTest): * svg/animations/script-tests/animate-calcMode-spline-to.js: (sample2): (sample3): (executeTest): * svg/animations/script-tests/animate-calcMode-spline-values.js: (sample2): (sample3): (executeTest): * svg/animations/script-tests/animate-color-calcMode-discrete.js: (executeTest): * svg/animations/script-tests/animate-color-fill-currentColor.js: (executeTest): * svg/animations/script-tests/animate-color-fill-from-by.js: (executeTest): * svg/animations/script-tests/animate-color-rgba-calcMode-discrete.js: (executeTest): * svg/animations/script-tests/animate-color-transparent.js: (executeTest): * svg/animations/script-tests/animate-currentColor.js: (executeTest): * svg/animations/script-tests/animate-dynamic-update-attributeName.js: (executeTest): * svg/animations/script-tests/animate-end-attribute.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/script-tests/animate-endElement-beginElement.js: (executeTest): (end): (begin): * svg/animations/script-tests/animate-from-to-keyTimes.js: (executeTest): * svg/animations/script-tests/animate-gradient-transform.js: (executeTest): * svg/animations/script-tests/animate-inherit-css-property.js: (executeTest): * svg/animations/script-tests/animate-insert-begin.js: (executeTest): * svg/animations/script-tests/animate-insert-no-begin.js: (executeTest): * svg/animations/script-tests/animate-keySplines.js: (executeTest): * svg/animations/script-tests/animate-mpath-insert.js: (executeTest): * svg/animations/script-tests/animate-number-calcMode-discrete-keyTimes.js: (executeTest): * svg/animations/script-tests/animate-number-calcMode-discrete.js: (sample1): (sample2): (executeTest): * svg/animations/script-tests/animate-path-animation-Cc-Ss.js: (sample4): (executeTest): * svg/animations/script-tests/animate-path-animation-Ll-Vv-Hh.js: (sample4): (executeTest): * svg/animations/script-tests/animate-path-animation-Qq-Tt.js: (executeTest): * svg/animations/script-tests/animate-path-animation-cC-sS-inverse.js: (sample4): (executeTest): * svg/animations/script-tests/animate-path-animation-lL-vV-hH-inverse.js: (sample4): (executeTest): * svg/animations/script-tests/animate-path-animation-qQ-tT-inverse.js: (executeTest): * svg/animations/script-tests/animate-path-nested-transforms.js: (g.setAttribute.rect.createSVGElement.rect.setAttribute.rect.setAttribute.rect.setAttribute.rect.setAttribute.rect.setAttribute.g.appendChild.animateMotion.createSVGElement.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.g.appendChild.rootSVGElement.appendChild.startSample): (endSample): (executeTest): * svg/animations/script-tests/animate-path-to-animation.js: (sample2): (sample3): (executeTest): * svg/animations/script-tests/animate-text-nested-transforms.js: (rootSVGElement.setAttribute.text.createSVGElement.text.setAttribute.text.textContent.string_appeared_here.text.setAttribute.animateMotion.createSVGElement.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.text.appendChild.rootSVGElement.appendChild.startSample): (endSample): (executeTest): * svg/animations/script-tests/animateTransform-pattern-transform.js: (executeTest): * svg/animations/script-tests/svgPreserveAspectRatio-animation-1.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/script-tests/svgangle-animation-deg-to-grad.js: (sample2): (sample3): (executeTest): * svg/animations/script-tests/svgangle-animation-deg-to-rad.js: (sample2): (sample3): (executeTest): * svg/animations/script-tests/svgangle-animation-grad-to-deg.js: (sample2): (sample3): (executeTest): * svg/animations/script-tests/svgangle-animation-grad-to-rad.js: (sample2): (sample3): (executeTest): * svg/animations/script-tests/svgangle-animation-rad-to-deg.js: (sample2): (sample3): (executeTest): * svg/animations/script-tests/svgangle-animation-rad-to-grad.js: (sample2): (sample3): (executeTest): * svg/animations/script-tests/svgboolean-animation-1.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/script-tests/svginteger-animation-1.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/script-tests/svglength-animation-LengthModeHeight.js: (sample3): (executeTest): * svg/animations/script-tests/svglength-animation-LengthModeOther.js: (sample3): (executeTest): * svg/animations/script-tests/svglength-animation-LengthModeWidth.js: (sample3): (executeTest): * svg/animations/script-tests/svglength-animation-invalid-value-1.js: (executeTest): * svg/animations/script-tests/svglength-animation-invalid-value-2.js: (executeTest): * svg/animations/script-tests/svglength-animation-invalid-value-3.js: (executeTest): * svg/animations/script-tests/svglength-animation-number-to-number.js: (sample3): (executeTest): * svg/animations/script-tests/svglength-animation-px-to-cm.js: (sample3): (executeTest): * svg/animations/script-tests/svglength-animation-px-to-ems.js: (sample3): (executeTest): * svg/animations/script-tests/svglength-animation-px-to-exs.js: (sample3): (executeTest): * svg/animations/script-tests/svglength-animation-px-to-in.js: (sample3): (executeTest): * svg/animations/script-tests/svglength-animation-px-to-number.js: (sample3): (executeTest): * svg/animations/script-tests/svglength-animation-px-to-pc.js: (sample3): (executeTest): * svg/animations/script-tests/svglength-animation-px-to-percentage.js: (sample3): (executeTest): * svg/animations/script-tests/svglength-animation-px-to-pt.js: (sample3): (executeTest): * svg/animations/script-tests/svglength-animation-px-to-px.js: (sample3): (executeTest): * svg/animations/script-tests/svglength-animation-unitType.js: (executeTest): * svg/animations/script-tests/svglength-animation-values.js: (sample5): (executeTest): * svg/animations/script-tests/svglengthlist-animation-1.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/script-tests/svglengthlist-animation-2.js: (sample3): (executeTest): * svg/animations/script-tests/svglengthlist-animation-3.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/script-tests/svglengthlist-animation-4.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/script-tests/svglengthlist-animation-5.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/script-tests/svgnumber-animation-1.js: (executeTest): * svg/animations/script-tests/svgnumber-animation-2.js: (executeTest): * svg/animations/script-tests/svgnumber-animation-3.js: (executeTest): * svg/animations/script-tests/svgnumberlist-animation-1.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/script-tests/svgnumberlist-animation-2.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/script-tests/svgnumberoptionalnumber-animation-1.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/script-tests/svgnumberoptionalnumber-animation-2.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/script-tests/svgnumberoptionalnumber-animation-3.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/script-tests/svgnumberoptionalnumber-animation-4.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/script-tests/svgpath-animation-1.js: (sample3): (executeTest): * svg/animations/script-tests/svgpointlist-animation-1.js: (sample3): (executeTest): * svg/animations/script-tests/svgpointlist-animation-2.js: (sample3): (executeTest): * svg/animations/script-tests/svgrect-animation-1.js: (sample3): (executeTest): * svg/animations/script-tests/svgrect-animation-2.js: (sample3): (executeTest): * svg/animations/script-tests/svgstring-animation-fallback-to-discrete.js: (executeTest): * svg/animations/script-tests/svgtransform-animation-1.js: (executeTest): * svg/animations/script-tests/svgtransform-animation-discrete.js: (executeTest): * svg/animations/smil-element-not-removed-crash.html: * svg/animations/svgPreserveAspectRatio-animation-1.html: * svg/animations/svgangle-animation-deg-to-grad-expected.txt: * svg/animations/svgangle-animation-deg-to-grad.html: * svg/animations/svgangle-animation-deg-to-rad-expected.txt: * svg/animations/svgangle-animation-deg-to-rad.html: * svg/animations/svgangle-animation-grad-to-deg-expected.txt: * svg/animations/svgangle-animation-grad-to-deg.html: * svg/animations/svgangle-animation-grad-to-rad-expected.txt: * svg/animations/svgangle-animation-grad-to-rad.html: * svg/animations/svgangle-animation-rad-to-deg-expected.txt: * svg/animations/svgangle-animation-rad-to-deg.html: * svg/animations/svgangle-animation-rad-to-grad-expected.txt: * svg/animations/svgangle-animation-rad-to-grad.html: * svg/animations/svgboolean-animation-1.html: * svg/animations/svginteger-animation-1.html: * svg/animations/svglength-animation-LengthModeHeight-expected.txt: * svg/animations/svglength-animation-LengthModeHeight.html: * svg/animations/svglength-animation-LengthModeOther-expected.txt: * svg/animations/svglength-animation-LengthModeOther.html: * svg/animations/svglength-animation-LengthModeWidth-expected.txt: * svg/animations/svglength-animation-LengthModeWidth.html: * svg/animations/svglength-animation-invalid-value-1.html: * svg/animations/svglength-animation-invalid-value-2.html: * svg/animations/svglength-animation-invalid-value-3.html: * svg/animations/svglength-animation-number-to-number-expected.txt: * svg/animations/svglength-animation-number-to-number.html: * svg/animations/svglength-animation-px-to-cm-expected.txt: * svg/animations/svglength-animation-px-to-cm.html: * svg/animations/svglength-animation-px-to-ems-expected.txt: * svg/animations/svglength-animation-px-to-ems.html: * svg/animations/svglength-animation-px-to-exs-expected.txt: * svg/animations/svglength-animation-px-to-exs.html: * svg/animations/svglength-animation-px-to-in-expected.txt: * svg/animations/svglength-animation-px-to-in.html: * svg/animations/svglength-animation-px-to-number-expected.txt: * svg/animations/svglength-animation-px-to-number.html: * svg/animations/svglength-animation-px-to-pc-expected.txt: * svg/animations/svglength-animation-px-to-pc.html: * svg/animations/svglength-animation-px-to-percentage-expected.txt: * svg/animations/svglength-animation-px-to-percentage.html: * svg/animations/svglength-animation-px-to-pt-expected.txt: * svg/animations/svglength-animation-px-to-pt.html: * svg/animations/svglength-animation-px-to-px-expected.txt: * svg/animations/svglength-animation-px-to-px.html: * svg/animations/svglength-animation-unitType.html: * svg/animations/svglength-animation-values-expected.txt: * svg/animations/svglength-animation-values.html: * svg/animations/svglengthlist-animation-1.html: * svg/animations/svglengthlist-animation-2-expected.txt: * svg/animations/svglengthlist-animation-2.html: * svg/animations/svglengthlist-animation-3.html: * svg/animations/svglengthlist-animation-4.html: * svg/animations/svglengthlist-animation-5.html: * svg/animations/svgnumber-animation-1.html: * svg/animations/svgnumber-animation-2.html: * svg/animations/svgnumber-animation-3.html: * svg/animations/svgnumberlist-animation-1-expected.txt: * svg/animations/svgnumberlist-animation-1.html: * svg/animations/svgnumberlist-animation-2-expected.txt: * svg/animations/svgnumberlist-animation-2.html: * svg/animations/svgnumberoptionalnumber-animation-1.html: * svg/animations/svgnumberoptionalnumber-animation-2.html: * svg/animations/svgnumberoptionalnumber-animation-3.html: * svg/animations/svgnumberoptionalnumber-animation-4.html: * svg/animations/svgpath-animation-1-expected.txt: * svg/animations/svgpath-animation-1.html: * svg/animations/svgpointlist-animation-1-expected.txt: * svg/animations/svgpointlist-animation-1.html: * svg/animations/svgpointlist-animation-2-expected.txt: * svg/animations/svgpointlist-animation-2.html: * svg/animations/svgrect-animation-1-expected.txt: * svg/animations/svgrect-animation-1.html: * svg/animations/svgrect-animation-2-expected.txt: * svg/animations/svgrect-animation-2.html: * svg/animations/svgstring-animation-fallback-to-discrete-expected.txt: * svg/animations/svgstring-animation-fallback-to-discrete.html: * svg/animations/svgtransform-animation-1.html: * svg/animations/svgtransform-animation-discrete-expected.txt: * svg/animations/svgtransform-animation-discrete.html: Canonical link: https://commits.webkit.org/95529@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-02-14 08:41:30 +00:00
PASS rect.transform.animVal.numberOfItems is 0
Fix repetitions & by animation support for SVGAnimateTransformElement https://bugs.webkit.org/show_bug.cgi?id=85051 Reviewed by Antti Koivisto. Source/WebCore: Repetitions are currently handled by adjusting percentage (percentage += repeatCount). This doesn't work for <animateTransform> as each repetition has to be post-multiplied to the animated transform list. Fix that. By-animations are equal to values="0;by" animations in SMIL. '0' is the neutral element of addition, which is the _zero_ matrix, not the identity matrix for SVGTransform. Add a new construction mode to SVGTransform to be able to construct zero transforms. Tests: svg/animations/animateTransform-accumulation-expected.svg svg/animations/animateTransform-accumulation.svg svg/animations/animateTransform-by-scale-expected.svg svg/animations/animateTransform-by-scale.svg svg/animations/animateTransform-from-by-from-to-comparision-expected.svg svg/animations/animateTransform-from-by-from-to-comparision.svg svg/animations/animateTransform-from-by-scale-additive-sum-expected.svg svg/animations/animateTransform-from-by-scale-additive-sum.svg svg/animations/animateTransform-from-by-scale-expected.svg svg/animations/animateTransform-from-by-scale.svg svg/animations/animateTransform-rotate-around-point-expected.svg svg/animations/animateTransform-rotate-around-point.svg svg/animations/animateTransform-skewX-expected.svg svg/animations/animateTransform-skewX.svg svg/animations/animateTransform-skewY-expected.svg svg/animations/animateTransform-skewY.svg svg/animations/animateTransform-translate-expected.svg svg/animations/animateTransform-translate.svg svg/animations/multiple-animateTransform-additive-sum-expected.svg svg/animations/multiple-animateTransform-additive-sum.svg * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::parseAttribute): * svg/SVGAnimatedTransformList.cpp: (WebCore::SVGAnimatedTransformListAnimator::addAnimatedTypes): (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue): * svg/SVGAnimationElement.h: (WebCore::SVGAnimationElement::adjustFromToListValues): * svg/SVGTransform.cpp: (WebCore::SVGTransform::SVGTransform): * svg/SVGTransform.h: * svg/SVGTransformDistance.cpp: (WebCore::SVGTransformDistance::SVGTransformDistance): (WebCore::SVGTransformDistance::scaledDistance): (WebCore::SVGTransformDistance::addSVGTransforms): (WebCore::SVGTransformDistance::addToSVGTransform): (WebCore::SVGTransformDistance::distance): * svg/SVGTransformDistance.h: (SVGTransformDistance): LayoutTests: Enable <animateTransform> test in additive-type-by-animation, which was disabled as it triggered assertions before this patch. Add lots of new <animateTransform> covering additive/accumulative animations using reftests, for all animateTransform types (translate/rotate/skewX/skewY/scale). * svg/animations/additive-type-by-animation-expected.txt: * svg/animations/animateTransform-accumulation-expected.svg: Added. * svg/animations/animateTransform-accumulation.svg: Added. * svg/animations/animateTransform-by-scale-expected.svg: Added. * svg/animations/animateTransform-by-scale.svg: Added. * svg/animations/animateTransform-from-by-from-to-comparision-expected.svg: Added. * svg/animations/animateTransform-from-by-from-to-comparision.svg: Added. * svg/animations/animateTransform-from-by-scale-additive-sum-expected.svg: Added. * svg/animations/animateTransform-from-by-scale-additive-sum.svg: Added. * svg/animations/animateTransform-from-by-scale-expected.svg: Added. * svg/animations/animateTransform-from-by-scale.svg: Added. * svg/animations/animateTransform-rotate-around-point-expected.svg: Added. * svg/animations/animateTransform-rotate-around-point.svg: Added. * svg/animations/animateTransform-skewX-expected.svg: Added. * svg/animations/animateTransform-skewX.svg: Added. * svg/animations/animateTransform-skewY-expected.svg: Added. * svg/animations/animateTransform-skewY.svg: Added. * svg/animations/animateTransform-translate-expected.svg: Added. * svg/animations/animateTransform-translate.svg: Added. * svg/animations/multiple-animateTransform-additive-sum-expected.svg: Added. * svg/animations/multiple-animateTransform-additive-sum.svg: Added. * svg/animations/resources/additive-type-by-animation.svg: * svg/animations/script-tests/additive-type-by-animation.js: (checkBaseVal): (sample1): (sample2): (sample3): * svg/animations/script-tests/svgtransform-animation-1.js: (sample1): (sample2): (sample3): (sample4): (sample5): (sample6): (sample7): (executeTest): * svg/animations/script-tests/svgtransform-animation-discrete.js: (sample1): (sample2): (sample3): (executeTest): * svg/animations/svgtransform-animation-1-expected.txt: * svg/animations/svgtransform-animation-discrete-expected.txt: Canonical link: https://commits.webkit.org/102562@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-27 14:10:59 +00:00
PASS rect.transform.baseVal.numberOfItems is 0
PASS successfullyParsed is true
TEST COMPLETE