Changeset 112223 in webkit
- Timestamp:
- Mar 27, 2012 1:22:37 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r112222 r112223 1 2012-03-25 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 Enable animVal support for SVGAngle 4 https://bugs.webkit.org/show_bug.cgi?id=82144 5 6 Reviewed by Rob Buis. 7 8 Update tests after enabling animVal support for SVGAnimatedAngle. 9 10 * svg/animations/script-tests/svgangle-animation-deg-to-grad.js: 11 (sample2): 12 (sample3): 13 * svg/animations/script-tests/svgangle-animation-deg-to-rad.js: 14 (sample2): 15 (sample3): 16 * svg/animations/script-tests/svgangle-animation-grad-to-deg.js: 17 (sample2): 18 (sample3): 19 * svg/animations/script-tests/svgangle-animation-grad-to-rad.js: 20 (sample2): 21 (sample3): 22 * svg/animations/script-tests/svgangle-animation-rad-to-deg.js: 23 (sample2): 24 (sample3): 25 * svg/animations/script-tests/svgangle-animation-rad-to-grad.js: 26 (sample2): 27 (sample3): 28 * svg/animations/svgangle-animation-deg-to-grad-expected.txt: 29 * svg/animations/svgangle-animation-deg-to-rad-expected.txt: 30 * svg/animations/svgangle-animation-grad-to-deg-expected.txt: 31 * svg/animations/svgangle-animation-grad-to-rad-expected.txt: 32 * svg/animations/svgangle-animation-rad-to-deg-expected.txt: 33 * svg/animations/svgangle-animation-rad-to-grad-expected.txt: 34 1 35 2012-03-27 Yury Semikhatsky <yurys@chromium.org> 2 36 -
trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-deg-to-grad.js
r110574 r112223 50 50 function sample2() { 51 51 shouldBeCloseEnough("marker.orientAngle.animVal.value", "90"); 52 shouldBeCloseEnough("marker.orientAngle.baseVal.value", " 90");52 shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0"); 53 53 } 54 54 55 55 function sample3() { 56 56 shouldBeCloseEnough("marker.orientAngle.animVal.value", "180"); 57 shouldBeCloseEnough("marker.orientAngle.baseVal.value", " 180");57 shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0"); 58 58 } 59 59 -
trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-deg-to-rad.js
r110574 r112223 50 50 function sample2() { 51 51 shouldBeCloseEnough("marker.orientAngle.animVal.value", "90"); 52 shouldBeCloseEnough("marker.orientAngle.baseVal.value", " 90");52 shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0"); 53 53 } 54 54 55 55 function sample3() { 56 56 shouldBeCloseEnough("marker.orientAngle.animVal.value", "180"); 57 shouldBeCloseEnough("marker.orientAngle.baseVal.value", " 180");57 shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0"); 58 58 } 59 59 -
trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-grad-to-deg.js
r110574 r112223 50 50 function sample2() { 51 51 shouldBeCloseEnough("marker.orientAngle.animVal.value", "90"); 52 shouldBeCloseEnough("marker.orientAngle.baseVal.value", " 90");52 shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0"); 53 53 } 54 54 55 55 function sample3() { 56 56 shouldBeCloseEnough("marker.orientAngle.animVal.value", "180"); 57 shouldBeCloseEnough("marker.orientAngle.baseVal.value", " 180");57 shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0"); 58 58 } 59 59 -
trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-grad-to-rad.js
r110574 r112223 50 50 function sample2() { 51 51 shouldBeCloseEnough("marker.orientAngle.animVal.value", "90"); 52 shouldBeCloseEnough("marker.orientAngle.baseVal.value", " 90");52 shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0"); 53 53 } 54 54 55 55 function sample3() { 56 56 shouldBeCloseEnough("marker.orientAngle.animVal.value", "180"); 57 shouldBeCloseEnough("marker.orientAngle.baseVal.value", " 180");57 shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0"); 58 58 } 59 59 -
trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-rad-to-deg.js
r110574 r112223 50 50 function sample2() { 51 51 shouldBeCloseEnough("marker.orientAngle.animVal.value", "90"); 52 shouldBeCloseEnough("marker.orientAngle.baseVal.value", " 90");52 shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0"); 53 53 } 54 54 55 55 function sample3() { 56 56 shouldBeCloseEnough("marker.orientAngle.animVal.value", "180"); 57 shouldBeCloseEnough("marker.orientAngle.baseVal.value", " 180");57 shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0"); 58 58 } 59 59 -
trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-rad-to-grad.js
r110574 r112223 50 50 function sample2() { 51 51 shouldBeCloseEnough("marker.orientAngle.animVal.value", "90"); 52 shouldBeCloseEnough("marker.orientAngle.baseVal.value", " 90");52 shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0"); 53 53 } 54 54 55 55 function sample3() { 56 56 shouldBeCloseEnough("marker.orientAngle.animVal.value", "180"); 57 shouldBeCloseEnough("marker.orientAngle.baseVal.value", " 180");57 shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0"); 58 58 } 59 59 -
trunk/LayoutTests/svg/animations/svgangle-animation-deg-to-grad-expected.txt
r107791 r112223 9 9 PASS marker.orientAngle.baseVal.value is 0 10 10 PASS marker.orientAngle.animVal.value is 90 11 PASS marker.orientAngle.baseVal.value is 9011 PASS marker.orientAngle.baseVal.value is 0 12 12 PASS marker.orientAngle.animVal.value is 180 13 PASS marker.orientAngle.baseVal.value is 18013 PASS marker.orientAngle.baseVal.value is 0 14 14 PASS marker.orientAngle.animVal.value is 0 15 15 PASS marker.orientAngle.baseVal.value is 0 -
trunk/LayoutTests/svg/animations/svgangle-animation-deg-to-rad-expected.txt
r107791 r112223 9 9 PASS marker.orientAngle.baseVal.value is 0 10 10 PASS marker.orientAngle.animVal.value is 90 11 PASS marker.orientAngle.baseVal.value is 9011 PASS marker.orientAngle.baseVal.value is 0 12 12 PASS marker.orientAngle.animVal.value is 180 13 PASS marker.orientAngle.baseVal.value is 18013 PASS marker.orientAngle.baseVal.value is 0 14 14 PASS marker.orientAngle.animVal.value is 0 15 15 PASS marker.orientAngle.baseVal.value is 0 -
trunk/LayoutTests/svg/animations/svgangle-animation-grad-to-deg-expected.txt
r107791 r112223 9 9 PASS marker.orientAngle.baseVal.value is 0 10 10 PASS marker.orientAngle.animVal.value is 90 11 PASS marker.orientAngle.baseVal.value is 9011 PASS marker.orientAngle.baseVal.value is 0 12 12 PASS marker.orientAngle.animVal.value is 180 13 PASS marker.orientAngle.baseVal.value is 18013 PASS marker.orientAngle.baseVal.value is 0 14 14 PASS marker.orientAngle.animVal.value is 0 15 15 PASS marker.orientAngle.baseVal.value is 0 -
trunk/LayoutTests/svg/animations/svgangle-animation-grad-to-rad-expected.txt
r107791 r112223 9 9 PASS marker.orientAngle.baseVal.value is 0 10 10 PASS marker.orientAngle.animVal.value is 90 11 PASS marker.orientAngle.baseVal.value is 9011 PASS marker.orientAngle.baseVal.value is 0 12 12 PASS marker.orientAngle.animVal.value is 180 13 PASS marker.orientAngle.baseVal.value is 18013 PASS marker.orientAngle.baseVal.value is 0 14 14 PASS marker.orientAngle.animVal.value is 0 15 15 PASS marker.orientAngle.baseVal.value is 0 -
trunk/LayoutTests/svg/animations/svgangle-animation-rad-to-deg-expected.txt
r107791 r112223 9 9 PASS marker.orientAngle.baseVal.value is 0 10 10 PASS marker.orientAngle.animVal.value is 90 11 PASS marker.orientAngle.baseVal.value is 9011 PASS marker.orientAngle.baseVal.value is 0 12 12 PASS marker.orientAngle.animVal.value is 180 13 PASS marker.orientAngle.baseVal.value is 18013 PASS marker.orientAngle.baseVal.value is 0 14 14 PASS marker.orientAngle.animVal.value is 0 15 15 PASS marker.orientAngle.baseVal.value is 0 -
trunk/LayoutTests/svg/animations/svgangle-animation-rad-to-grad-expected.txt
r107791 r112223 9 9 PASS marker.orientAngle.baseVal.value is 0 10 10 PASS marker.orientAngle.animVal.value is 90 11 PASS marker.orientAngle.baseVal.value is 9011 PASS marker.orientAngle.baseVal.value is 0 12 12 PASS marker.orientAngle.animVal.value is 180 13 PASS marker.orientAngle.baseVal.value is 18013 PASS marker.orientAngle.baseVal.value is 0 14 14 PASS marker.orientAngle.animVal.value is 0 15 15 PASS marker.orientAngle.baseVal.value is 0 -
trunk/Source/WebCore/ChangeLog
r112222 r112223 1 2012-03-25 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 Enable animVal support for SVGAngle 4 https://bugs.webkit.org/show_bug.cgi?id=82144 5 6 Reviewed by Rob Buis. 7 8 Enable animVal support for SVGAnimatedAngle. Very simple now that everything is prepared. 9 All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedAngleAnimator. 10 11 Extended existing tests to cover this. 12 13 * svg/SVGAnimatedAngle.cpp: 14 (WebCore::sharedSVGAngle): 15 (WebCore::SVGAnimatedAngleAnimator::constructFromString): 16 (WebCore::SVGAnimatedAngleAnimator::startAnimValAnimation): 17 (WebCore::SVGAnimatedAngleAnimator::stopAnimValAnimation): 18 (WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal): 19 (WebCore::SVGAnimatedAngleAnimator::animValWillChange): 20 (WebCore::SVGAnimatedAngleAnimator::animValDidChange): 21 (WebCore::SVGAnimatedAngleAnimator::calculateDistance): 22 * svg/SVGAnimatedAngle.h: 23 (SVGAnimatedAngleAnimator): 24 * svg/SVGAnimatedType.cpp: 25 (WebCore::SVGAnimatedType::supportsAnimVal): 26 1 27 2012-03-27 Yury Semikhatsky <yurys@chromium.org> 2 28 -
trunk/Source/WebCore/svg/SVGAnimatedAngle.cpp
r95901 r112223 35 35 { 36 36 DEFINE_STATIC_LOCAL(SVGAngle, sharedAngle, ()); 37 ExceptionCode ec = 0; 38 sharedAngle.setValueAsString(valueAsString, ec); 39 ASSERT(!ec); 37 sharedAngle.setValueAsString(valueAsString, ASSERT_NO_EXCEPTION); 40 38 return sharedAngle; 41 39 } … … 44 42 { 45 43 OwnPtr<SVGAnimatedType> animatedType = SVGAnimatedType::createAngle(new SVGAngle); 46 ExceptionCode ec = 0; 47 animatedType->angle().setValueAsString(string, ec); 48 ASSERT(!ec); 44 animatedType->angle().setValueAsString(string, ASSERT_NO_EXCEPTION); 49 45 return animatedType.release(); 46 } 47 48 PassOwnPtr<SVGAnimatedType> SVGAnimatedAngleAnimator::startAnimValAnimation(const Vector<SVGAnimatedProperty*>& properties) 49 { 50 return SVGAnimatedType::createAngle(constructFromOneBaseValue<SVGAngle, SVGAnimatedAngle>(properties)); 51 } 52 53 void SVGAnimatedAngleAnimator::stopAnimValAnimation(const Vector<SVGAnimatedProperty*>& properties) 54 { 55 SVGAnimatedTypeAnimator::stopAnimValAnimationForType<SVGAnimatedAngle>(properties); 56 } 57 58 void SVGAnimatedAngleAnimator::resetAnimValToBaseVal(const Vector<SVGAnimatedProperty*>& properties, SVGAnimatedType* type) 59 { 60 resetFromOneBaseValue<SVGAngle, SVGAnimatedAngle>(properties, type, &SVGAnimatedType::angle); 61 } 62 63 void SVGAnimatedAngleAnimator::animValWillChange(const Vector<SVGAnimatedProperty*>& properties) 64 { 65 animValWillChangeForType<SVGAnimatedAngle>(properties); 66 } 67 68 void SVGAnimatedAngleAnimator::animValDidChange(const Vector<SVGAnimatedProperty*>& properties) 69 { 70 animValDidChangeForType<SVGAnimatedAngle>(properties); 50 71 } 51 72 … … 124 145 float SVGAnimatedAngleAnimator::calculateDistance(const String& fromString, const String& toString) 125 146 { 126 ExceptionCode ec = 0;127 147 SVGAngle from = SVGAngle(); 128 from.setValueAsString(fromString, ec); 129 ASSERT(!ec); 148 from.setValueAsString(fromString, ASSERT_NO_EXCEPTION); 130 149 SVGAngle to = SVGAngle(); 131 to.setValueAsString(toString, ec); 132 ASSERT(!ec); 150 to.setValueAsString(toString, ASSERT_NO_EXCEPTION); 133 151 return fabsf(to.value() - from.value()); 134 152 } -
trunk/Source/WebCore/svg/SVGAnimatedAngle.h
r95901 r112223 40 40 41 41 class SVGAnimatedAngleAnimator : public SVGAnimatedTypeAnimator { 42 43 42 public: 44 43 SVGAnimatedAngleAnimator(SVGAnimationElement*, SVGElement*); … … 46 45 47 46 virtual PassOwnPtr<SVGAnimatedType> constructFromString(const String&); 47 virtual PassOwnPtr<SVGAnimatedType> startAnimValAnimation(const Vector<SVGAnimatedProperty*>&); 48 virtual void stopAnimValAnimation(const Vector<SVGAnimatedProperty*>&); 49 virtual void resetAnimValToBaseVal(const Vector<SVGAnimatedProperty*>&, SVGAnimatedType*); 50 virtual void animValWillChange(const Vector<SVGAnimatedProperty*>&); 51 virtual void animValDidChange(const Vector<SVGAnimatedProperty*>&); 48 52 49 53 virtual void calculateFromAndToValues(OwnPtr<SVGAnimatedType>& fromValue, OwnPtr<SVGAnimatedType>& toValue, const String& fromString, const String& toString); -
trunk/Source/WebCore/svg/SVGAnimatedType.cpp
r111120 r112223 454 454 // FIXME: This lists the current state of our animVal support. 455 455 switch (type) { 456 case AnimatedAngle: 456 457 case AnimatedLength: 457 458 case AnimatedLengthList: … … 461 462 case AnimatedTransformList: 462 463 return true; 463 case AnimatedAngle:464 464 case AnimatedBoolean: 465 465 case AnimatedColor:
Note: See TracChangeset
for help on using the changeset viewer.