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

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

Issue 1655153002: Rename local limit variable in SVG transform argument parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DeMorganize Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d8bd71e031023f67ea98f9d89c7e441691fbffbb..96efe3af0475d7b8f9d506138853a6133dbff9cf 100644
--- a/third_party/WebKit/Source/core/svg/SVGTransformList.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGTransformList.cpp
@@ -122,13 +122,13 @@ SVGParseStatus parseTransformArgumentsForType(
{
const size_t required = requiredValuesForType[type];
const size_t optional = optionalValuesForType[type];
- const size_t maxPossibleParams = required + optional;
- ASSERT(maxPossibleParams <= kMaxTransformArguments);
+ const size_t requiredWithOptional = required + optional;
+ ASSERT(requiredWithOptional <= kMaxTransformArguments);
ASSERT(arguments.isEmpty());
bool trailingDelimiter = false;
- while (arguments.size() < maxPossibleParams) {
+ while (arguments.size() < requiredWithOptional) {
float argumentValue = 0;
if (!parseNumber(ptr, end, argumentValue, AllowLeadingWhitespace))
break;
@@ -136,7 +136,7 @@ SVGParseStatus parseTransformArgumentsForType(
arguments.append(argumentValue);
trailingDelimiter = false;
- if (arguments.size() == maxPossibleParams)
+ if (arguments.size() == requiredWithOptional)
break;
if (skipOptionalSVGSpaces(ptr, end) && *ptr == ',') {
@@ -145,7 +145,7 @@ SVGParseStatus parseTransformArgumentsForType(
}
}
- if (!(arguments.size() == required || arguments.size() == maxPossibleParams))
+ if (arguments.size() != required && arguments.size() != requiredWithOptional)
return SVGParseStatus::ExpectedNumber;
if (trailingDelimiter)
return SVGParseStatus::TrailingGarbage;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698