Index: Source/core/css/CSSValue.h |
diff --git a/Source/core/css/CSSValue.h b/Source/core/css/CSSValue.h |
index a92bc86a5b532c845ed46447042e49ce06f66424..20711c10fa677cdeab991fab63da72a2e670d9a7 100644 |
--- a/Source/core/css/CSSValue.h |
+++ b/Source/core/css/CSSValue.h |
@@ -237,6 +237,20 @@ inline bool compareCSSValuePtr(const RefPtr<CSSValueType>& first, const RefPtr<C |
return first ? second && first->equals(*second) : !second; |
} |
+#define CSS_VALUE_TYPE_CASTS(ValueTypeName) \ |
tkent
2013/09/24 00:08:34
I think DEFINE_CSS_VALUE_TYPE_CASTS is better. It
|
+inline const CSS##ValueTypeName* toCSS##ValueTypeName(const CSSValue* value) \ |
+{ \ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!value || value->is##ValueTypeName()); \ |
+ return static_cast<const CSS##ValueTypeName*>(value); \ |
+} \ |
+inline CSS##ValueTypeName* toCSS##ValueTypeName(CSSValue* value) \ |
+{ \ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!value || value->is##ValueTypeName()); \ |
+ return static_cast<CSS##ValueTypeName*>(value); \ |
+} \ |
+void toCSS##ValueTypeName(const CSS##ValueTypeName*); \ |
+void toCSS##ValueTypeName(const CSS##ValueTypeName&); |
tkent
2013/09/24 00:08:34
Please omit the last ':'. I'd like to use this li
|
+ |
} // namespace WebCore |
#endif // CSSValue_h |