Index: Source/core/animation/AnimatableDouble.h |
diff --git a/Source/core/animation/AnimatableTransform.h b/Source/core/animation/AnimatableDouble.h |
similarity index 69% |
copy from Source/core/animation/AnimatableTransform.h |
copy to Source/core/animation/AnimatableDouble.h |
index cececfe45afd3344a927cf50373e5f25becb258b..ed10de4b11478d308f4a20ee62d1c8259f3391a3 100644 |
--- a/Source/core/animation/AnimatableTransform.h |
+++ b/Source/core/animation/AnimatableDouble.h |
@@ -28,43 +28,46 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef AnimatableTransform_h |
-#define AnimatableTransform_h |
+#ifndef AnimatableDouble_h |
+#define AnimatableDouble_h |
#include "core/animation/AnimatableValue.h" |
-#include "core/platform/graphics/transforms/TransformOperations.h" |
+#include "core/css/CSSValue.h" |
namespace WebCore { |
-class AnimatableTransform : public AnimatableValue { |
+class AnimatableDouble : public AnimatableValue { |
public: |
- virtual ~AnimatableTransform() { } |
- static PassRefPtr<AnimatableTransform> create(const TransformOperations&); |
- const TransformOperations& transformOperations() const |
+ virtual ~AnimatableDouble() { } |
+ |
+ static PassRefPtr<AnimatableDouble> create(double number) |
{ |
- return m_transform; |
+ return adoptRef(new AnimatableDouble(number)); |
} |
+ PassRefPtr<CSSValue> toCSSValue() const; |
+ double toDouble() const { return m_number; } |
+ |
protected: |
virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const OVERRIDE; |
virtual PassRefPtr<AnimatableValue> addWith(const AnimatableValue*) const OVERRIDE; |
private: |
- explicit AnimatableTransform(const TransformOperations& transform) |
- : m_transform(transform) |
+ AnimatableDouble(double number) |
+ : m_number(number) |
{ |
} |
- virtual AnimatableType type() const OVERRIDE { return TypeTransform; } |
- const TransformOperations m_transform; |
+ virtual AnimatableType type() const OVERRIDE { return TypeDouble; } |
+ |
+ double m_number; |
}; |
-inline const AnimatableTransform* toAnimatableTransform(const AnimatableValue* value) |
+inline const AnimatableDouble* toAnimatableDouble(const AnimatableValue* value) |
{ |
- ASSERT_WITH_SECURITY_IMPLICATION(value && value->isTransform()); |
- return static_cast<const AnimatableTransform*>(value); |
+ ASSERT_WITH_SECURITY_IMPLICATION(value && value->isDouble()); |
+ return static_cast<const AnimatableDouble*>(value); |
} |
} // namespace WebCore |
-#endif // AnimatableTransform_h |
- |
+#endif // AnimatableDouble_h |