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

Unified Diff: third_party/WebKit/Source/core/svg/SVGTransformList.cpp

Issue 2176623003: Remove platform/text/ParserUtilities.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove from blink_platform.gypi Created 4 years, 5 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
Index: third_party/WebKit/Source/core/svg/SVGTransformList.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGTransformList.cpp b/third_party/WebKit/Source/core/svg/SVGTransformList.cpp
index 32ac2b1a4f673f252a44fa02c7f1afacb3b3c1c1..a1c17fc2763364034e777ffb89318dad6edec5d1 100644
--- a/third_party/WebKit/Source/core/svg/SVGTransformList.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGTransformList.cpp
@@ -26,7 +26,7 @@
#include "core/SVGNames.h"
#include "core/svg/SVGParserUtilities.h"
#include "core/svg/SVGTransformDistance.h"
-#include "platform/text/ParserUtilities.h"
+#include "platform/ParsingUtilities.h"
#include "wtf/text/StringBuilder.h"
#include "wtf/text/WTFString.h"
@@ -64,13 +64,6 @@ bool SVGTransformList::concatenate(AffineTransform& result) const
namespace {
-const LChar skewXDesc[] = {'s', 'k', 'e', 'w', 'X'};
-const LChar skewYDesc[] = {'s', 'k', 'e', 'w', 'Y'};
-const LChar scaleDesc[] = {'s', 'c', 'a', 'l', 'e'};
-const LChar translateDesc[] = {'t', 'r', 'a', 'n', 's', 'l', 'a', 't', 'e'};
-const LChar rotateDesc[] = {'r', 'o', 't', 'a', 't', 'e'};
-const LChar matrixDesc[] = {'m', 'a', 't', 'r', 'i', 'x'};
-
template<typename CharType>
SVGTransformType parseAndSkipTransformType(const CharType*& ptr, const CharType* end)
{
@@ -78,20 +71,20 @@ SVGTransformType parseAndSkipTransformType(const CharType*& ptr, const CharType*
return SVG_TRANSFORM_UNKNOWN;
if (*ptr == 's') {
- if (skipString(ptr, end, skewXDesc, WTF_ARRAY_LENGTH(skewXDesc)))
+ if (skipToken(ptr, end, "skewX"))
return SVG_TRANSFORM_SKEWX;
- if (skipString(ptr, end, skewYDesc, WTF_ARRAY_LENGTH(skewYDesc)))
+ if (skipToken(ptr, end, "skewY"))
return SVG_TRANSFORM_SKEWY;
- if (skipString(ptr, end, scaleDesc, WTF_ARRAY_LENGTH(scaleDesc)))
+ if (skipToken(ptr, end, "scale"))
return SVG_TRANSFORM_SCALE;
return SVG_TRANSFORM_UNKNOWN;
}
- if (skipString(ptr, end, translateDesc, WTF_ARRAY_LENGTH(translateDesc)))
+ if (skipToken(ptr, end, "translate"))
return SVG_TRANSFORM_TRANSLATE;
- if (skipString(ptr, end, rotateDesc, WTF_ARRAY_LENGTH(rotateDesc)))
+ if (skipToken(ptr, end, "rotate"))
return SVG_TRANSFORM_ROTATE;
- if (skipString(ptr, end, matrixDesc, WTF_ARRAY_LENGTH(matrixDesc)))
+ if (skipToken(ptr, end, "matrix"))
return SVG_TRANSFORM_MATRIX;
return SVG_TRANSFORM_UNKNOWN;
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.cpp ('k') | third_party/WebKit/Source/core/svg/SVGViewSpec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698