Chromium Code Reviews| Index: Source/core/svg/SVGLength.h |
| diff --git a/Source/core/svg/SVGLength.h b/Source/core/svg/SVGLength.h |
| index 1bc530ed197bb6f924eff26a2c0dc3066ce1fd75..b549f087edf271064f867d738b114aeedcbedb74 100644 |
| --- a/Source/core/svg/SVGLength.h |
| +++ b/Source/core/svg/SVGLength.h |
| @@ -168,6 +168,17 @@ struct SVGPropertyTraits<SVGLength> { |
| static String toString(const SVGLength& type) { return type.valueAsString(); } |
| }; |
| +inline SVGLengthMode toSVGLengthMode(unsigned short mode) |
|
tkent
2013/09/12 22:40:34
We must need this type conversion only in SVGLengt
|
| +{ |
| + ASSERT_WITH_SECURITY_IMPLICATION(!mode || mode > LengthModeOther); |
|
tkent
2013/09/12 22:40:34
I don't think this has security implication. Also,
|
| + return static_cast<SVGLengthMode>(mode); |
| +} |
| + |
| +inline SVGLengthType toSVGLengthType(unsigned short type) |
|
tkent
2013/09/12 22:40:34
Same comments.
|
| +{ |
| + ASSERT_WITH_SECURITY_IMPLICATION(!type || (type == LengthTypeUnknown || type > LengthTypePC)); |
| + return static_cast<SVGLengthType>(type); |
| +} |
| } // namespace WebCore |