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

Unified Diff: third_party/WebKit/Source/core/css/CSSBasicShapeValues.cpp

Issue 2017053003: Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 years, 7 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/css/CSSBasicShapeValues.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSBasicShapeValues.cpp b/third_party/WebKit/Source/core/css/CSSBasicShapeValues.cpp
index 3644286073bb336c8c30434032f374f1ea2292c0..7b42e9b69e47c20fd29e2f4c18ad28bcfec3a7c1 100644
--- a/third_party/WebKit/Source/core/css/CSSBasicShapeValues.cpp
+++ b/third_party/WebKit/Source/core/css/CSSBasicShapeValues.cpp
@@ -43,17 +43,17 @@ static String buildCircleString(const String& radius, const String& centerX, con
char at[] = "at";
char separator[] = " ";
StringBuilder result;
- result.appendLiteral("circle(");
+ result.append("circle(");
if (!radius.isNull())
result.append(radius);
if (!centerX.isNull() || !centerY.isNull()) {
if (!radius.isNull())
- result.appendLiteral(separator);
+ result.append(separator);
result.append(at);
- result.appendLiteral(separator);
+ result.append(separator);
result.append(centerX);
- result.appendLiteral(separator);
+ result.append(separator);
result.append(centerY);
}
result.append(')');
@@ -136,7 +136,7 @@ static String buildEllipseString(const String& radiusX, const String& radiusY, c
char at[] = "at";
char separator[] = " ";
StringBuilder result;
- result.appendLiteral("ellipse(");
+ result.append("ellipse(");
bool needsSeparator = false;
if (!radiusX.isNull()) {
result.append(radiusX);
@@ -144,18 +144,18 @@ static String buildEllipseString(const String& radiusX, const String& radiusY, c
}
if (!radiusY.isNull()) {
if (needsSeparator)
- result.appendLiteral(separator);
+ result.append(separator);
result.append(radiusY);
needsSeparator = true;
}
if (!centerX.isNull() || !centerY.isNull()) {
if (needsSeparator)
- result.appendLiteral(separator);
- result.appendLiteral(at);
- result.appendLiteral(separator);
+ result.append(separator);
+ result.append(at);
+ result.append(separator);
result.append(centerX);
- result.appendLiteral(separator);
+ result.append(separator);
result.append(centerY);
}
result.append(')');
@@ -225,13 +225,13 @@ static String buildPolygonString(const WindRule& windRule, const Vector<String>&
result.reserveCapacity(length);
if (windRule == RULE_EVENODD)
- result.appendLiteral(evenOddOpening);
+ result.append(evenOddOpening);
else
- result.appendLiteral(nonZeroOpening);
+ result.append(nonZeroOpening);
for (size_t i = 0; i < points.size(); i += 2) {
if (i)
- result.appendLiteral(commaSeparator);
+ result.append(commaSeparator);
result.append(points[i]);
result.append(' ');
result.append(points[i + 1]);
@@ -290,21 +290,21 @@ static String buildInsetString(const String& top, const String& right, const Str
char separator[] = " ";
char cornersSeparator[] = "round";
StringBuilder result;
- result.appendLiteral(opening);
+ result.append(opening);
result.append(top);
bool showLeftArg = !left.isNull() && left != right;
bool showBottomArg = !bottom.isNull() && (bottom != top || showLeftArg);
bool showRightArg = !right.isNull() && (right != top || showBottomArg);
if (showRightArg) {
- result.appendLiteral(separator);
+ result.append(separator);
result.append(right);
}
if (showBottomArg) {
- result.appendLiteral(separator);
+ result.append(separator);
result.append(bottom);
}
if (showLeftArg) {
- result.appendLiteral(separator);
+ result.append(separator);
result.append(left);
}
@@ -316,19 +316,19 @@ static String buildInsetString(const String& top, const String& right, const Str
areDefaultCornerRadii &= buildInsetRadii(verticalRadii, topLeftRadiusHeight, topRightRadiusHeight, bottomRightRadiusHeight, bottomLeftRadiusHeight);
if (!areDefaultCornerRadii) {
- result.appendLiteral(separator);
- result.appendLiteral(cornersSeparator);
+ result.append(separator);
+ result.append(cornersSeparator);
for (size_t i = 0; i < horizontalRadii.size(); ++i) {
- result.appendLiteral(separator);
+ result.append(separator);
result.append(horizontalRadii[i]);
}
if (horizontalRadii != verticalRadii) {
- result.appendLiteral(separator);
- result.appendLiteral("/");
+ result.append(separator);
+ result.append("/");
for (size_t i = 0; i < verticalRadii.size(); ++i) {
- result.appendLiteral(separator);
+ result.append(separator);
result.append(verticalRadii[i]);
}
}

Powered by Google App Engine
This is Rietveld 408576698