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

Unified Diff: Source/core/css/StylePropertySerializer.cpp

Issue 482753002: Use StringBuilder::appendLiteral() / StringBuilder::append(char) when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | « Source/core/css/MediaQuerySetTest.cpp ('k') | Source/core/css/parser/BisonCSSParserTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/StylePropertySerializer.cpp
diff --git a/Source/core/css/StylePropertySerializer.cpp b/Source/core/css/StylePropertySerializer.cpp
index 294dc6484d67e605dafc83297e558cb759f069b2..f56e75907a27fd91bf341f60685841a8afbda156 100644
--- a/Source/core/css/StylePropertySerializer.cpp
+++ b/Source/core/css/StylePropertySerializer.cpp
@@ -715,12 +715,12 @@ static void appendBackgroundRepeatValue(StringBuilder& builder, const CSSValue&
if (repeatXValueId == repeatYValueId) {
builder.append(repeatX.cssText());
} else if (repeatXValueId == CSSValueNoRepeat && repeatYValueId == CSSValueRepeat) {
- builder.append("repeat-y");
+ builder.appendLiteral("repeat-y");
} else if (repeatXValueId == CSSValueRepeat && repeatYValueId == CSSValueNoRepeat) {
- builder.append("repeat-x");
+ builder.appendLiteral("repeat-x");
} else {
builder.append(repeatX.cssText());
- builder.append(" ");
+ builder.appendLiteral(" ");
builder.append(repeatY.cssText());
}
}
@@ -762,7 +762,7 @@ String StylePropertySerializer::backgroundRepeatPropertyValue() const
StringBuilder builder;
for (size_t i = 0; i < shorthandLength; ++i) {
if (i)
- builder.append(", ");
+ builder.appendLiteral(", ");
appendBackgroundRepeatValue(builder,
*repeatXList->item(i % repeatXList->length()),
*repeatYList->item(i % repeatYList->length()));
« no previous file with comments | « Source/core/css/MediaQuerySetTest.cpp ('k') | Source/core/css/parser/BisonCSSParserTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698