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

Unified Diff: Source/core/svg/SVGParserUtilities.cpp

Issue 132233016: [SVG] SVGAnimatedPointList migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: set NeedsRebaseline Created 6 years, 11 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/SVGParserUtilities.h ('k') | Source/core/svg/SVGPathElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGParserUtilities.cpp
diff --git a/Source/core/svg/SVGParserUtilities.cpp b/Source/core/svg/SVGParserUtilities.cpp
index 262ef622f91ae42975f0ee97eff67734ffdba35e..7bedbb4b7d1da73748cc6ad1c88766c394c6d40c 100644
--- a/Source/core/svg/SVGParserUtilities.cpp
+++ b/Source/core/svg/SVGParserUtilities.cpp
@@ -238,78 +238,6 @@ bool parseNumberOptionalNumber(const String& string, float& x, float& y)
}
template<typename CharType>
-static bool genericParseRect(const CharType*& ptr, const CharType* end, FloatRect& rect)
-{
- skipOptionalSVGSpaces(ptr, end);
-
- float x = 0;
- float y = 0;
- float width = 0;
- float height = 0;
- bool valid = parseNumber(ptr, end, x) && parseNumber(ptr, end, y) && parseNumber(ptr, end, width) && parseNumber(ptr, end, height, false);
- rect = FloatRect(x, y, width, height);
- return valid;
-}
-
-bool parseRect(const String& string, FloatRect& rect)
-{
- if (string.isEmpty())
- return false;
- if (string.is8Bit()) {
- const LChar* ptr = string.characters8();
- const LChar* end = ptr + string.length();
- return genericParseRect(ptr, end, rect);
- }
- const UChar* ptr = string.characters16();
- const UChar* end = ptr + string.length();
- return genericParseRect(ptr, end, rect);
-}
-
-template<typename CharType>
-static bool genericParsePointsList(SVGPointList& pointsList, const CharType*& ptr, const CharType* end)
-{
- skipOptionalSVGSpaces(ptr, end);
-
- bool delimParsed = false;
- while (ptr < end) {
- delimParsed = false;
- float xPos = 0.0f;
- if (!parseNumber(ptr, end, xPos))
- return false;
-
- float yPos = 0.0f;
- if (!parseNumber(ptr, end, yPos, false))
- return false;
-
- skipOptionalSVGSpaces(ptr, end);
-
- if (ptr < end && *ptr == ',') {
- delimParsed = true;
- ptr++;
- }
- skipOptionalSVGSpaces(ptr, end);
-
- pointsList.append(FloatPoint(xPos, yPos));
- }
- return ptr == end && !delimParsed;
-}
-
-// FIXME: Why is the out parameter first?
-bool pointsListFromSVGData(SVGPointList& pointsList, const String& points)
-{
- if (points.isEmpty())
- return true;
- if (points.is8Bit()) {
- const LChar* ptr = points.characters8();
- const LChar* end = ptr + points.length();
- return genericParsePointsList(pointsList, ptr, end);
- }
- const UChar* ptr = points.characters16();
- const UChar* end = ptr + points.length();
- return genericParsePointsList(pointsList, ptr, end);
-}
-
-template<typename CharType>
static bool parseGlyphName(const CharType*& ptr, const CharType* end, HashSet<String>& values)
{
skipOptionalSVGSpaces(ptr, end);
« no previous file with comments | « Source/core/svg/SVGParserUtilities.h ('k') | Source/core/svg/SVGPathElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698