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

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

Issue 26247003: Web Animations CSS: Support animation of background-position and background-image (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Refixed test expectations Created 7 years, 2 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 adc85162ff9613e942b555f3ab15896b4a0f6264..335ae695eb7e447a1e1dc19e98d587a9578f875d 100644
--- a/Source/core/animation/AnimatableValue.h
+++ b/Source/core/animation/AnimatableValue.h
@@ -59,6 +59,7 @@ public:
bool isLengthBox() const { return type() == TypeLengthBox; }
bool isLengthSize() const { return type() == TypeLengthSize; }
bool isNeutral() const { return type() == TypeNeutral; }
+ bool isRepeatable() const { return type() == TypeRepeatable; }
bool isSVGLength() const { return type() == TypeSVGLength; }
bool isShapeValue() const { return type() == TypeShapeValue; }
bool isSVGPaint() const { return type() == TypeSVGPaint; }
@@ -66,6 +67,12 @@ public:
bool isUnknown() const { return type() == TypeUnknown; }
bool isVisibility() const { return type() == TypeVisibility; }
+ bool isSameType(const AnimatableValue* value) const
+ {
+ ASSERT(value);
+ return value->type() == type();
+ }
+
protected:
enum AnimatableType {
TypeClipPathOperation,
@@ -76,6 +83,7 @@ protected:
TypeLengthBox,
TypeLengthSize,
TypeNeutral,
+ TypeRepeatable,
TypeSVGLength,
TypeShapeValue,
TypeSVGPaint,
@@ -84,12 +92,6 @@ protected:
TypeVisibility,
};
- bool isSameType(const AnimatableValue* value) const
- {
- ASSERT(value);
- return value->type() == type();
- }
-
virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const = 0;
static PassRefPtr<AnimatableValue> defaultInterpolateTo(const AnimatableValue* left, const AnimatableValue* right, double fraction) { return takeConstRef((fraction < 0.5) ? left : right); }
« no previous file with comments | « Source/core/animation/AnimatableRepeatable.cpp ('k') | Source/core/animation/css/CSSAnimatableValueFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698