OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2011, 2012. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2011, 2012. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 class SVGAnimatorFactory { | 46 class SVGAnimatorFactory { |
47 public: | 47 public: |
48 static PassOwnPtr<SVGAnimatedTypeAnimator> create(SVGAnimationElement* anima
tionElement, SVGElement* contextElement, AnimatedPropertyType attributeType) | 48 static PassOwnPtr<SVGAnimatedTypeAnimator> create(SVGAnimationElement* anima
tionElement, SVGElement* contextElement, AnimatedPropertyType attributeType) |
49 { | 49 { |
50 ASSERT(animationElement); | 50 ASSERT(animationElement); |
51 ASSERT(contextElement); | 51 ASSERT(contextElement); |
52 | 52 |
53 switch (attributeType) { | 53 switch (attributeType) { |
54 case AnimatedAngle: | 54 case AnimatedAngle: |
55 return adoptPtr(new SVGAnimatedAngleAnimator(animationElement, conte
xtElement)); | 55 return adoptPtr(new SVGAnimatedAngleAnimator(animationElement, conte
xtElement)); |
56 case AnimatedBoolean: | |
57 return adoptPtr(new SVGAnimatedBooleanAnimator(animationElement, con
textElement)); | |
58 case AnimatedColor: | 56 case AnimatedColor: |
59 return adoptPtr(new SVGAnimatedColorAnimator(animationElement, conte
xtElement)); | 57 return adoptPtr(new SVGAnimatedColorAnimator(animationElement, conte
xtElement)); |
60 case AnimatedEnumeration: | 58 case AnimatedEnumeration: |
61 return adoptPtr(new SVGAnimatedEnumerationAnimator(animationElement,
contextElement)); | 59 return adoptPtr(new SVGAnimatedEnumerationAnimator(animationElement,
contextElement)); |
62 case AnimatedInteger: | 60 case AnimatedInteger: |
63 return adoptPtr(new SVGAnimatedIntegerAnimator(animationElement, con
textElement)); | 61 return adoptPtr(new SVGAnimatedIntegerAnimator(animationElement, con
textElement)); |
64 case AnimatedIntegerOptionalInteger: | 62 case AnimatedIntegerOptionalInteger: |
65 return adoptPtr(new SVGAnimatedIntegerOptionalIntegerAnimator(animat
ionElement, contextElement)); | 63 return adoptPtr(new SVGAnimatedIntegerOptionalIntegerAnimator(animat
ionElement, contextElement)); |
66 case AnimatedNumber: | 64 case AnimatedNumber: |
67 return adoptPtr(new SVGAnimatedNumberAnimator(animationElement, cont
extElement)); | 65 return adoptPtr(new SVGAnimatedNumberAnimator(animationElement, cont
extElement)); |
68 case AnimatedNumberList: | 66 case AnimatedNumberList: |
69 return adoptPtr(new SVGAnimatedNumberListAnimator(animationElement,
contextElement)); | 67 return adoptPtr(new SVGAnimatedNumberListAnimator(animationElement,
contextElement)); |
70 case AnimatedNumberOptionalNumber: | 68 case AnimatedNumberOptionalNumber: |
71 return adoptPtr(new SVGAnimatedNumberOptionalNumberAnimator(animatio
nElement, contextElement)); | 69 return adoptPtr(new SVGAnimatedNumberOptionalNumberAnimator(animatio
nElement, contextElement)); |
72 case AnimatedPath: | 70 case AnimatedPath: |
73 return adoptPtr(new SVGAnimatedPathAnimator(animationElement, contex
tElement)); | 71 return adoptPtr(new SVGAnimatedPathAnimator(animationElement, contex
tElement)); |
74 case AnimatedPoints: | 72 case AnimatedPoints: |
75 return adoptPtr(new SVGAnimatedPointListAnimator(animationElement, c
ontextElement)); | 73 return adoptPtr(new SVGAnimatedPointListAnimator(animationElement, c
ontextElement)); |
76 case AnimatedPreserveAspectRatio: | 74 case AnimatedPreserveAspectRatio: |
77 return adoptPtr(new SVGAnimatedPreserveAspectRatioAnimator(animation
Element, contextElement)); | 75 return adoptPtr(new SVGAnimatedPreserveAspectRatioAnimator(animation
Element, contextElement)); |
78 case AnimatedRect: | 76 case AnimatedRect: |
79 return adoptPtr(new SVGAnimatedRectAnimator(animationElement, contex
tElement)); | 77 return adoptPtr(new SVGAnimatedRectAnimator(animationElement, contex
tElement)); |
80 case AnimatedString: | 78 case AnimatedString: |
81 return adoptPtr(new SVGAnimatedStringAnimator(animationElement, cont
extElement)); | 79 return adoptPtr(new SVGAnimatedStringAnimator(animationElement, cont
extElement)); |
82 case AnimatedTransformList: | 80 case AnimatedTransformList: |
83 return adoptPtr(new SVGAnimatedTransformListAnimator(animationElemen
t, contextElement)); | 81 return adoptPtr(new SVGAnimatedTransformListAnimator(animationElemen
t, contextElement)); |
84 // Below properties have migrated to new property implementation. | 82 // Below properties have migrated to new property implementation. |
| 83 case AnimatedBoolean: |
85 case AnimatedLength: | 84 case AnimatedLength: |
86 case AnimatedLengthList: | 85 case AnimatedLengthList: |
87 return adoptPtr(new SVGAnimatedNewPropertyAnimator(attributeType, an
imationElement, contextElement)); | 86 return adoptPtr(new SVGAnimatedNewPropertyAnimator(attributeType, an
imationElement, contextElement)); |
88 case AnimatedUnknown: | 87 case AnimatedUnknown: |
89 break; | 88 break; |
90 } | 89 } |
91 | 90 |
92 ASSERT_NOT_REACHED(); | 91 ASSERT_NOT_REACHED(); |
93 return nullptr; | 92 return nullptr; |
94 } | 93 } |
95 | 94 |
96 private: | 95 private: |
97 SVGAnimatorFactory() { } | 96 SVGAnimatorFactory() { } |
98 | 97 |
99 }; | 98 }; |
100 | 99 |
101 } // namespace WebCore | 100 } // namespace WebCore |
102 | 101 |
103 #endif // SVGAnimatorFactory_h | 102 #endif // SVGAnimatorFactory_h |
OLD | NEW |