Changeset 112247 in webkit
- Timestamp:
- Mar 27, 2012 3:47:05 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r112246 r112247 1 2012-03-27 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 Enable animVal support for SVGAnimatedRect 4 https://bugs.webkit.org/show_bug.cgi?id=82317 5 6 Reviewed by Zoltan Herczeg. 7 8 Extend SVGAnimatedRect tests to cover animVal support. 9 10 * svg/animations/script-tests/svgrect-animation-1.js: 11 (sample1): 12 (sample2): 13 (sample3): 14 * svg/animations/script-tests/svgrect-animation-2.js: 15 (sample1): 16 (sample2): 17 (sample3): 18 * svg/animations/svgrect-animation-1-expected.txt: 19 * svg/animations/svgrect-animation-2-expected.txt: 20 1 21 2012-03-27 Nikolas Zimmermann <nzimmermann@rim.com> 2 22 -
trunk/LayoutTests/svg/animations/script-tests/svgrect-animation-1.js
r110574 r112247 30 30 shouldBeCloseEnough("rootSVGElement.viewBox.animVal.height", "100"); 31 31 32 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.x", "0");33 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.y", "0");34 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.width", "100");35 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.height", "100");32 shouldBe("rootSVGElement.viewBox.baseVal.x", "0"); 33 shouldBe("rootSVGElement.viewBox.baseVal.y", "0"); 34 shouldBe("rootSVGElement.viewBox.baseVal.width", "100"); 35 shouldBe("rootSVGElement.viewBox.baseVal.height", "100"); 36 36 } 37 37 … … 42 42 shouldBeCloseEnough("rootSVGElement.viewBox.animVal.height", "75"); 43 43 44 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.x", "25");45 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.y", "25");46 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.width", "75");47 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.height", "75");44 shouldBe("rootSVGElement.viewBox.baseVal.x", "0"); 45 shouldBe("rootSVGElement.viewBox.baseVal.y", "0"); 46 shouldBe("rootSVGElement.viewBox.baseVal.width", "100"); 47 shouldBe("rootSVGElement.viewBox.baseVal.height", "100"); 48 48 } 49 49 … … 54 54 shouldBeCloseEnough("rootSVGElement.viewBox.animVal.height", "50"); 55 55 56 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.x", "50");57 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.y", "50");58 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.width", "50");59 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.height", "50");56 shouldBe("rootSVGElement.viewBox.baseVal.x", "0"); 57 shouldBe("rootSVGElement.viewBox.baseVal.y", "0"); 58 shouldBe("rootSVGElement.viewBox.baseVal.width", "100"); 59 shouldBe("rootSVGElement.viewBox.baseVal.height", "100"); 60 60 } 61 61 -
trunk/LayoutTests/svg/animations/script-tests/svgrect-animation-2.js
r110574 r112247 30 30 shouldBeCloseEnough("rootSVGElement.viewBox.animVal.height", "100"); 31 31 32 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.x", "0");33 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.y", "0");34 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.width", "100");35 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.height", "100");32 shouldBe("rootSVGElement.viewBox.baseVal.x", "0"); 33 shouldBe("rootSVGElement.viewBox.baseVal.y", "0"); 34 shouldBe("rootSVGElement.viewBox.baseVal.width", "100"); 35 shouldBe("rootSVGElement.viewBox.baseVal.height", "100"); 36 36 } 37 37 … … 42 42 shouldBeCloseEnough("rootSVGElement.viewBox.animVal.height", "125"); 43 43 44 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.x", "25");45 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.y", "25");46 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.width", "125");47 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.height", "125");44 shouldBe("rootSVGElement.viewBox.baseVal.x", "0"); 45 shouldBe("rootSVGElement.viewBox.baseVal.y", "0"); 46 shouldBe("rootSVGElement.viewBox.baseVal.width", "100"); 47 shouldBe("rootSVGElement.viewBox.baseVal.height", "100"); 48 48 } 49 49 … … 54 54 shouldBeCloseEnough("rootSVGElement.viewBox.animVal.height", "150"); 55 55 56 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.x", "50");57 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.y", "50");58 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.width", "150");59 shouldBe CloseEnough("rootSVGElement.viewBox.baseVal.height", "150");56 shouldBe("rootSVGElement.viewBox.baseVal.x", "0"); 57 shouldBe("rootSVGElement.viewBox.baseVal.y", "0"); 58 shouldBe("rootSVGElement.viewBox.baseVal.width", "100"); 59 shouldBe("rootSVGElement.viewBox.baseVal.height", "100"); 60 60 } 61 61 -
trunk/LayoutTests/svg/animations/svgrect-animation-1-expected.txt
r107791 r112247 18 18 PASS rootSVGElement.viewBox.animVal.width is 75 19 19 PASS rootSVGElement.viewBox.animVal.height is 75 20 PASS rootSVGElement.viewBox.baseVal.x is 2521 PASS rootSVGElement.viewBox.baseVal.y is 2522 PASS rootSVGElement.viewBox.baseVal.width is 7523 PASS rootSVGElement.viewBox.baseVal.height is 7520 PASS rootSVGElement.viewBox.baseVal.x is 0 21 PASS rootSVGElement.viewBox.baseVal.y is 0 22 PASS rootSVGElement.viewBox.baseVal.width is 100 23 PASS rootSVGElement.viewBox.baseVal.height is 100 24 24 PASS rootSVGElement.viewBox.animVal.x is 50 25 25 PASS rootSVGElement.viewBox.animVal.y is 50 26 26 PASS rootSVGElement.viewBox.animVal.width is 50 27 27 PASS rootSVGElement.viewBox.animVal.height is 50 28 PASS rootSVGElement.viewBox.baseVal.x is 5029 PASS rootSVGElement.viewBox.baseVal.y is 5030 PASS rootSVGElement.viewBox.baseVal.width is 5031 PASS rootSVGElement.viewBox.baseVal.height is 5028 PASS rootSVGElement.viewBox.baseVal.x is 0 29 PASS rootSVGElement.viewBox.baseVal.y is 0 30 PASS rootSVGElement.viewBox.baseVal.width is 100 31 PASS rootSVGElement.viewBox.baseVal.height is 100 32 32 PASS rootSVGElement.viewBox.animVal.x is 0 33 33 PASS rootSVGElement.viewBox.animVal.y is 0 -
trunk/LayoutTests/svg/animations/svgrect-animation-2-expected.txt
r107791 r112247 18 18 PASS rootSVGElement.viewBox.animVal.width is 125 19 19 PASS rootSVGElement.viewBox.animVal.height is 125 20 PASS rootSVGElement.viewBox.baseVal.x is 2521 PASS rootSVGElement.viewBox.baseVal.y is 2522 PASS rootSVGElement.viewBox.baseVal.width is 1 2523 PASS rootSVGElement.viewBox.baseVal.height is 1 2520 PASS rootSVGElement.viewBox.baseVal.x is 0 21 PASS rootSVGElement.viewBox.baseVal.y is 0 22 PASS rootSVGElement.viewBox.baseVal.width is 100 23 PASS rootSVGElement.viewBox.baseVal.height is 100 24 24 PASS rootSVGElement.viewBox.animVal.x is 50 25 25 PASS rootSVGElement.viewBox.animVal.y is 50 26 26 PASS rootSVGElement.viewBox.animVal.width is 150 27 27 PASS rootSVGElement.viewBox.animVal.height is 150 28 PASS rootSVGElement.viewBox.baseVal.x is 5029 PASS rootSVGElement.viewBox.baseVal.y is 5030 PASS rootSVGElement.viewBox.baseVal.width is 1 5031 PASS rootSVGElement.viewBox.baseVal.height is 1 5028 PASS rootSVGElement.viewBox.baseVal.x is 0 29 PASS rootSVGElement.viewBox.baseVal.y is 0 30 PASS rootSVGElement.viewBox.baseVal.width is 100 31 PASS rootSVGElement.viewBox.baseVal.height is 100 32 32 PASS rootSVGElement.viewBox.animVal.x is 0 33 33 PASS rootSVGElement.viewBox.animVal.y is 0 -
trunk/Source/WebCore/ChangeLog
r112245 r112247 1 2012-03-27 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 Enable animVal support for SVGAnimatedRect 4 https://bugs.webkit.org/show_bug.cgi?id=82317 5 6 Reviewed by Zoltan Herczeg. 7 8 Enable animVal support for SVGAnimatedRect. Very simple now that everything is prepared. 9 All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedRectAnimator. 10 11 Extended existing tests to cover this. 12 13 * svg/SVGAnimatedRect.cpp: 14 (WebCore::SVGAnimatedRectAnimator::startAnimValAnimation): 15 (WebCore::SVGAnimatedRectAnimator::stopAnimValAnimation): 16 (WebCore::SVGAnimatedRectAnimator::resetAnimValToBaseVal): 17 (WebCore::SVGAnimatedRectAnimator::animValWillChange): 18 (WebCore::SVGAnimatedRectAnimator::animValDidChange): 19 * svg/SVGAnimatedRect.h: 20 (SVGAnimatedRectAnimator): 21 * svg/SVGAnimatedType.cpp: 22 (WebCore::SVGAnimatedType::supportsAnimVal): 23 1 24 2012-03-27 Sheriff Bot <webkit.review.bot@gmail.com> 2 25 -
trunk/Source/WebCore/svg/SVGAnimatedRect.cpp
r95901 r112247 38 38 parseRect(string, animatedType->rect()); 39 39 return animatedType.release(); 40 } 41 42 PassOwnPtr<SVGAnimatedType> SVGAnimatedRectAnimator::startAnimValAnimation(const Vector<SVGAnimatedProperty*>& properties) 43 { 44 return SVGAnimatedType::createRect(constructFromOneBaseValue<FloatRect, SVGAnimatedRect>(properties)); 45 } 46 47 void SVGAnimatedRectAnimator::stopAnimValAnimation(const Vector<SVGAnimatedProperty*>& properties) 48 { 49 SVGAnimatedTypeAnimator::stopAnimValAnimationForType<SVGAnimatedRect>(properties); 50 } 51 52 void SVGAnimatedRectAnimator::resetAnimValToBaseVal(const Vector<SVGAnimatedProperty*>& properties, SVGAnimatedType* type) 53 { 54 resetFromOneBaseValue<FloatRect, SVGAnimatedRect>(properties, type, &SVGAnimatedType::rect); 55 } 56 57 void SVGAnimatedRectAnimator::animValWillChange(const Vector<SVGAnimatedProperty*>& properties) 58 { 59 animValWillChangeForType<SVGAnimatedRect>(properties); 60 } 61 62 void SVGAnimatedRectAnimator::animValDidChange(const Vector<SVGAnimatedProperty*>& properties) 63 { 64 animValDidChangeForType<SVGAnimatedRect>(properties); 40 65 } 41 66 -
trunk/Source/WebCore/svg/SVGAnimatedRect.h
r95901 r112247 41 41 42 42 class SVGAnimatedRectAnimator : public SVGAnimatedTypeAnimator { 43 44 43 public: 45 44 SVGAnimatedRectAnimator(SVGAnimationElement*, SVGElement*); … … 47 46 48 47 virtual PassOwnPtr<SVGAnimatedType> constructFromString(const String&); 48 virtual PassOwnPtr<SVGAnimatedType> startAnimValAnimation(const Vector<SVGAnimatedProperty*>&); 49 virtual void stopAnimValAnimation(const Vector<SVGAnimatedProperty*>&); 50 virtual void resetAnimValToBaseVal(const Vector<SVGAnimatedProperty*>&, SVGAnimatedType*); 51 virtual void animValWillChange(const Vector<SVGAnimatedProperty*>&); 52 virtual void animValDidChange(const Vector<SVGAnimatedProperty*>&); 49 53 50 54 virtual void calculateFromAndToValues(OwnPtr<SVGAnimatedType>& fromValue, OwnPtr<SVGAnimatedType>& toValue, const String& fromString, const String& toString); -
trunk/Source/WebCore/svg/SVGAnimatedType.cpp
r112240 r112247 480 480 case AnimatedNumberList: 481 481 case AnimatedNumberOptionalNumber: 482 case AnimatedRect: 482 483 case AnimatedString: 483 484 case AnimatedTransformList: … … 488 489 case AnimatedPoints: 489 490 case AnimatedPreserveAspectRatio: 490 case AnimatedRect:491 491 case AnimatedUnknown: 492 492 return false;
Note: See TracChangeset
for help on using the changeset viewer.