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

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

Issue 29543005: Introduce DEFINE_ANIMATABLE_VALUE_TYPE_CASTS to replace manual toFoo() for animatable value (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « Source/core/animation/AnimatableLengthSize.h ('k') | Source/core/animation/AnimatableSVGLength.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimatableRepeatable.h
diff --git a/Source/core/animation/AnimatableRepeatable.h b/Source/core/animation/AnimatableRepeatable.h
index 6d1747116666aac96d03d536a293179739755e93..b1c74949c11b5850d882809188069559a3c8e711 100644
--- a/Source/core/animation/AnimatableRepeatable.h
+++ b/Source/core/animation/AnimatableRepeatable.h
@@ -72,12 +72,7 @@ private:
virtual bool equalTo(const AnimatableValue*) const OVERRIDE;
};
-inline const AnimatableRepeatable* toAnimatableRepeatable(const AnimatableValue* value)
-{
- // FIXME: Use a better typing system for AnimatableValues that doesn't require ugliness like this to support subclassing.
- ASSERT_WITH_SECURITY_IMPLICATION(value && (value->isRepeatable() || value->isStrokeDasharrayList()));
- return static_cast<const AnimatableRepeatable*>(value);
-}
+DEFINE_TYPE_CASTS(AnimatableRepeatable, AnimatableValue, value, (value->isRepeatable() || value->isStrokeDasharrayList()), (value.isRepeatable() || value.isStrokeDasharrayList()));
gyuyoung-inactive 2013/10/21 09:33:55 Unfortunately, current DEFINE_ANIMATABLE_VALUE_TYP
tkent 2013/10/21 21:48:06 Using generic DEFINE_TYPE_CASTS is reasonable.
} // namespace WebCore
« no previous file with comments | « Source/core/animation/AnimatableLengthSize.h ('k') | Source/core/animation/AnimatableSVGLength.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698