Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Unified Diff: Source/core/animation/AnimatableValue.h

Issue 25082007: Web Animations CSS: Split AnimatableNumber into AnimatableDouble and AnimatableLength (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased onto virtual enum change Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/animation/AnimatableValue.h
diff --git a/Source/core/animation/AnimatableValue.h b/Source/core/animation/AnimatableValue.h
index c06e6bb314ec13ce2f360d49db7a131557fd5cb2..cfff495a618b7dd73490bfa5d6bb6eedabf514c4 100644
--- a/Source/core/animation/AnimatableValue.h
+++ b/Source/core/animation/AnimatableValue.h
@@ -46,11 +46,12 @@ public:
// For noncommutative values read add(A, B) to mean the value A with B composed onto it.
static PassRefPtr<AnimatableValue> add(const AnimatableValue*, const AnimatableValue*);
+ bool isDouble() const { return type() == TypeDouble; }
bool isColor() const { return type() == TypeColor; }
bool isImage() const { return type() == TypeImage; }
+ bool isLength() const { return type() == TypeLength; }
bool isLengthBox() const { return type() == TypeLengthBox; }
bool isLengthSize() const { return type() == TypeLengthSize; }
- bool isNumber() const { return type() == TypeNumber; }
bool isNeutral() const { return type() == TypeNeutral; }
bool isTransform() const { return type() == TypeTransform; }
bool isUnknown() const { return type() == TypeUnknown; }
@@ -58,12 +59,13 @@ public:
protected:
enum AnimatableType {
+ TypeDouble,
TypeColor,
TypeImage,
+ TypeLength,
TypeLengthBox,
TypeLengthSize,
TypeNeutral,
- TypeNumber,
TypeTransform,
TypeUnknown,
TypeVisibility,

Powered by Google App Engine
This is Rietveld 408576698