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

Unified Diff: Source/core/css/CSSValue.h

Issue 30963002: DEFINE_CSS_VALUE_TYPE_CASTS starts to use DEFINE_TYPE_CASTS (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/css/CSSUnicodeRangeValue.h ('k') | Source/core/css/CSSValueList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSValue.h
diff --git a/Source/core/css/CSSValue.h b/Source/core/css/CSSValue.h
index 6dd574c15fa73d6303fc707b1b7d59e7c65fa10e..eac1c2304c52e06cd9a0f03a2b85d716abd04570 100644
--- a/Source/core/css/CSSValue.h
+++ b/Source/core/css/CSSValue.h
@@ -242,19 +242,8 @@ inline bool compareCSSValuePtr(const RefPtr<CSSValueType>& first, const RefPtr<C
return first ? second && first->equals(*second) : !second;
}
-#define DEFINE_CSS_VALUE_TYPE_CASTS(ValueTypeName) \
-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&)
+#define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \
+ DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, value.predicate)
} // namespace WebCore
« no previous file with comments | « Source/core/css/CSSUnicodeRangeValue.h ('k') | Source/core/css/CSSValueList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698