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

Unified Diff: Source/core/svg/SVGPaint.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/svg/SVGColor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGPaint.h
diff --git a/Source/core/svg/SVGPaint.h b/Source/core/svg/SVGPaint.h
index 5c4fcf299f91537470cf857ca59d41167e258d60..f48b4b7ba0715f7cc02a5989d497ed790b1bd5b8 100644
--- a/Source/core/svg/SVGPaint.h
+++ b/Source/core/svg/SVGPaint.h
@@ -116,20 +116,7 @@ private:
String m_uri;
};
-// This will catch anyone doing an unnecessary cast.
-SVGPaint* toSVGPaint(const SVGColor*);
-
-inline SVGPaint* toSVGPaint(CSSValue* value)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isSVGPaint());
- return static_cast<SVGPaint*>(value);
-}
-
-inline const SVGPaint* toSVGPaint(const CSSValue* value)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isSVGPaint());
- return static_cast<const SVGPaint*>(value);
-}
+DEFINE_CSS_VALUE_TYPE_CASTS(SVGPaint, isSVGPaint());
} // namespace WebCore
« no previous file with comments | « Source/core/svg/SVGColor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698