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

Unified Diff: third_party/WebKit/Source/core/animation/NonInterpolableValue.h

Issue 2314443002: Code health: Add type checks to CSSLengthInterpolationType::nonInterpolableValuesAreCompatible() (Closed)
Patch Set: Simplify macro Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/animation/NonInterpolableValue.h
diff --git a/third_party/WebKit/Source/core/animation/NonInterpolableValue.h b/third_party/WebKit/Source/core/animation/NonInterpolableValue.h
index 97a7c4f1aaa2a402d5920eb63e089bc7bd285a91..33730bee514a3c4811cf28274111c0e1a466ded3 100644
--- a/third_party/WebKit/Source/core/animation/NonInterpolableValue.h
+++ b/third_party/WebKit/Source/core/animation/NonInterpolableValue.h
@@ -28,7 +28,9 @@ public:
NonInterpolableValue::Type T::staticType = &T::staticType;
#define DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(T) \
- DEFINE_TYPE_CASTS(T, NonInterpolableValue, value, value->getType() == T::staticType, value.getType() == T::staticType);
+ inline bool is##T(const NonInterpolableValue* value) { return !value || value->getType() == T::staticType; } \
+ DEFINE_TYPE_CASTS(T, NonInterpolableValue, value, is##T(value), is##T(&value));
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698