Title: [159237] trunk/Source/WebCore
- Revision
- 159237
- Author
- [email protected]
- Date
- 2013-11-13 14:19:33 -0800 (Wed, 13 Nov 2013)
Log Message
Generate casting helpers for SVGPaint and SVGColor.
<https://webkit.org/b/124285>
Use CSS_VALUE_TYPE_CASTS to generate type casting helpers for the
SVGPaint and SVGColor classes.
Reviewed by Anders Carlsson.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (159236 => 159237)
--- trunk/Source/WebCore/ChangeLog 2013-11-13 22:17:54 UTC (rev 159236)
+++ trunk/Source/WebCore/ChangeLog 2013-11-13 22:19:33 UTC (rev 159237)
@@ -1,3 +1,13 @@
+2013-11-13 Andreas Kling <[email protected]>
+
+ Generate casting helpers for SVGPaint and SVGColor.
+ <https://webkit.org/b/124285>
+
+ Use CSS_VALUE_TYPE_CASTS to generate type casting helpers for the
+ SVGPaint and SVGColor classes.
+
+ Reviewed by Anders Carlsson.
+
2013-11-13 Benjamin Poulain <[email protected]>
Update ResourceHandleCF to use the didReceiveBuffer() callback
Modified: trunk/Source/WebCore/svg/SVGColor.h (159236 => 159237)
--- trunk/Source/WebCore/svg/SVGColor.h 2013-11-13 22:17:54 UTC (rev 159236)
+++ trunk/Source/WebCore/svg/SVGColor.h 2013-11-13 22:19:33 UTC (rev 159237)
@@ -93,21 +93,8 @@
SVGColorType m_colorType;
};
-// This will catch anyone doing an unnecessary cast.
-SVGColor* toSVGColor(const SVGColor*);
+CSS_VALUE_TYPE_CASTS(SVGColor, isSVGColor());
-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);
-}
-
} // namespace WebCore
#endif // ENABLE(SVG)
Modified: trunk/Source/WebCore/svg/SVGPaint.h (159236 => 159237)
--- trunk/Source/WebCore/svg/SVGPaint.h 2013-11-13 22:17:54 UTC (rev 159236)
+++ trunk/Source/WebCore/svg/SVGPaint.h 2013-11-13 22:19:33 UTC (rev 159237)
@@ -115,21 +115,8 @@
String m_uri;
};
-// This will catch anyone doing an unnecessary cast.
-SVGPaint* toSVGPaint(const SVGColor*);
+CSS_VALUE_TYPE_CASTS(SVGPaint, isSVGPaint());
-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);
-}
-
} // namespace WebCore
#endif // ENABLE(SVG)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes