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

Unified Diff: third_party/WebKit/Source/core/svg/SVGViewSpec.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/SVGViewSpec.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGViewSpec.cpp b/third_party/WebKit/Source/core/svg/SVGViewSpec.cpp
index 353a8663158afe39d57410f8823e627f37e779aa..6bfbb2fa8a60f40cec8744ce9ad35491776b5b76 100644
--- a/third_party/WebKit/Source/core/svg/SVGViewSpec.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGViewSpec.cpp
@@ -25,7 +25,7 @@
#include "core/dom/ExceptionCode.h"
#include "core/svg/SVGAnimatedTransformList.h"
#include "core/svg/SVGParserUtilities.h"
-#include "platform/text/ParserUtilities.h"
+#include "platform/ParsingUtilities.h"
namespace blink {
@@ -132,17 +132,10 @@ void SVGViewSpec::setZoomAndPan(unsigned short, ExceptionState& exceptionState)
exceptionState.throwDOMException(NoModificationAllowedError, ExceptionMessages::readOnly());
}
-static const LChar svgViewSpec[] = {'s', 'v', 'g', 'V', 'i', 'e', 'w'};
-static const LChar viewBoxSpec[] = {'v', 'i', 'e', 'w', 'B', 'o', 'x'};
-static const LChar preserveAspectRatioSpec[] = {'p', 'r', 'e', 's', 'e', 'r', 'v', 'e', 'A', 's', 'p', 'e', 'c', 't', 'R', 'a', 't', 'i', 'o'};
-static const LChar transformSpec[] = {'t', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm'};
-static const LChar zoomAndPanSpec[] = {'z', 'o', 'o', 'm', 'A', 'n', 'd', 'P', 'a', 'n'};
-static const LChar viewTargetSpec[] = {'v', 'i', 'e', 'w', 'T', 'a', 'r', 'g', 'e', 't'};
-
template<typename CharType>
bool SVGViewSpec::parseViewSpecInternal(const CharType* ptr, const CharType* end)
{
- if (!skipString(ptr, end, svgViewSpec, WTF_ARRAY_LENGTH(svgViewSpec)))
+ if (!skipToken(ptr, end, "svgView"))
return false;
if (ptr >= end || *ptr != '(')
@@ -151,7 +144,7 @@ bool SVGViewSpec::parseViewSpecInternal(const CharType* ptr, const CharType* end
while (ptr < end && *ptr != ')') {
if (*ptr == 'v') {
- if (skipString(ptr, end, viewBoxSpec, WTF_ARRAY_LENGTH(viewBoxSpec))) {
+ if (skipToken(ptr, end, "viewBox")) {
if (ptr >= end || *ptr != '(')
return false;
ptr++;
@@ -165,7 +158,7 @@ bool SVGViewSpec::parseViewSpecInternal(const CharType* ptr, const CharType* end
if (ptr >= end || *ptr != ')')
return false;
ptr++;
- } else if (skipString(ptr, end, viewTargetSpec, WTF_ARRAY_LENGTH(viewTargetSpec))) {
+ } else if (skipToken(ptr, end, "viewTarget")) {
if (ptr >= end || *ptr != '(')
return false;
const CharType* viewTargetStart = ++ptr;
@@ -178,7 +171,7 @@ bool SVGViewSpec::parseViewSpecInternal(const CharType* ptr, const CharType* end
} else
return false;
} else if (*ptr == 'z') {
- if (!skipString(ptr, end, zoomAndPanSpec, WTF_ARRAY_LENGTH(zoomAndPanSpec)))
+ if (!skipToken(ptr, end, "zoomAndPan"))
return false;
if (ptr >= end || *ptr != '(')
return false;
@@ -189,7 +182,7 @@ bool SVGViewSpec::parseViewSpecInternal(const CharType* ptr, const CharType* end
return false;
ptr++;
} else if (*ptr == 'p') {
- if (!skipString(ptr, end, preserveAspectRatioSpec, WTF_ARRAY_LENGTH(preserveAspectRatioSpec)))
+ if (!skipToken(ptr, end, "preserveAspectRatio"))
return false;
if (ptr >= end || *ptr != '(')
return false;
@@ -200,7 +193,7 @@ bool SVGViewSpec::parseViewSpecInternal(const CharType* ptr, const CharType* end
return false;
ptr++;
} else if (*ptr == 't') {
- if (!skipString(ptr, end, transformSpec, WTF_ARRAY_LENGTH(transformSpec)))
+ if (!skipToken(ptr, end, "transform"))
return false;
if (ptr >= end || *ptr != '(')
return false;
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGTransformList.cpp ('k') | third_party/WebKit/Source/core/svg/SVGZoomAndPan.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698