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

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

Issue 23549032: Add toSVGLengthType() and toSVGLengthMode() fuctions, and use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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 | « no previous file | Source/core/svg/SVGLength.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | Source/core/svg/SVGLength.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698