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

Unified Diff: Source/core/svg/SVGColor.h

Issue 27183005: Use DEFINE_CSS_VALUE_TYPE_CASTS() for SVGColor, SVGPaint, and TextCloneCSSValue (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/CSSValue.cpp ('k') | Source/core/svg/SVGPaint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGColor.h
diff --git a/Source/core/svg/SVGColor.h b/Source/core/svg/SVGColor.h
index acdfbebe0e526364f96b1bae11b59693344bcfb4..756868829998bc7b4a032b474143f2bda2bd8c30 100644
--- a/Source/core/svg/SVGColor.h
+++ b/Source/core/svg/SVGColor.h
@@ -93,21 +93,7 @@ private:
SVGColorType m_colorType;
};
-// This will catch anyone doing an unnecessary cast.
-SVGColor* toSVGColor(const SVGColor*);
-
-inline SVGColor* toSVGColor(CSSValue* value)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isSVGColor());
- return static_cast<SVGColor*>(value);
-}
-
-inline const SVGColor* toSVGColor(const CSSValue* value)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isSVGColor());
- return static_cast<const SVGColor*>(value);
-}
-
+DEFINE_CSS_VALUE_TYPE_CASTS(SVGColor, isSVGColor());
} // namespace WebCore
« no previous file with comments | « Source/core/css/CSSValue.cpp ('k') | Source/core/svg/SVGPaint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698