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

Unified Diff: Source/core/editing/markup.cpp

Issue 114103005: Use StringBuilder::appendLiteral() when possible in MarkupAccumulator (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | « Source/core/editing/MarkupAccumulator.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/markup.cpp
diff --git a/Source/core/editing/markup.cpp b/Source/core/editing/markup.cpp
index a2198a974293076c81200c779182c640c3e28e1f..c1b17648e5ee520ff73b50f00585d06133a1151d 100644
--- a/Source/core/editing/markup.cpp
+++ b/Source/core/editing/markup.cpp
@@ -186,8 +186,7 @@ void StyledMarkupAccumulator::appendStyleNodeOpenTag(StringBuilder& out, StylePr
else
out.appendLiteral("<span style=\"");
appendAttributeValue(out, style->asText(), document->isHTMLDocument());
- out.append('\"');
- out.append('>');
+ out.appendLiteral("\">");
}
const String& StyledMarkupAccumulator::styleNodeCloseTag(bool isBlock)
@@ -932,11 +931,11 @@ String createFullMarkup(const Range* range)
String urlToMarkup(const KURL& url, const String& title)
{
StringBuilder markup;
- markup.append("<a href=\"");
+ markup.appendLiteral("<a href=\"");
markup.append(url.string());
- markup.append("\">");
+ markup.appendLiteral("\">");
MarkupAccumulator::appendCharactersReplacingEntities(markup, title, 0, title.length(), EntityMaskInPCDATA);
- markup.append("</a>");
+ markup.appendLiteral("</a>");
return markup.toString();
}
« no previous file with comments | « Source/core/editing/MarkupAccumulator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698