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

Unified Diff: third_party/WebKit/Source/platform/graphics/Color.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/platform/graphics/Color.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Color.cpp b/third_party/WebKit/Source/platform/graphics/Color.cpp
index aefac181936d30089ca11d4d0cc5cde04c203ad2..15506ea9067002c0c8c563e09b1d9904b19a9fe3 100644
--- a/third_party/WebKit/Source/platform/graphics/Color.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Color.cpp
@@ -198,19 +198,19 @@ String Color::serializedAsCSSComponentValue() const
result.reserveCapacity(32);
bool colorHasAlpha = hasAlpha();
if (colorHasAlpha)
- result.appendLiteral("rgba(");
+ result.append("rgba(");
else
- result.appendLiteral("rgb(");
+ result.append("rgb(");
result.appendNumber(static_cast<unsigned char>(red()));
- result.appendLiteral(", ");
+ result.append(", ");
result.appendNumber(static_cast<unsigned char>(green()));
- result.appendLiteral(", ");
+ result.append(", ");
result.appendNumber(static_cast<unsigned char>(blue()));
if (colorHasAlpha) {
- result.appendLiteral(", ");
+ result.append(", ");
NumberToStringBuffer buffer;
const char* alphaString = numberToFixedPrecisionString(alpha() / 255.0f, 6, buffer, true);
@@ -236,13 +236,13 @@ String Color::serialized() const
StringBuilder result;
result.reserveCapacity(28);
- result.appendLiteral("rgba(");
+ result.append("rgba(");
result.appendNumber(red());
- result.appendLiteral(", ");
+ result.append(", ");
result.appendNumber(green());
- result.appendLiteral(", ");
+ result.append(", ");
result.appendNumber(blue());
- result.appendLiteral(", ");
+ result.append(", ");
if (!alpha())
result.append('0');

Powered by Google App Engine
This is Rietveld 408576698