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

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

Issue 124943003: Remove 'String::append' from some of the blink source. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removing the CustomFilterValidatedProgram.cpp from the patch(File is deleted in r164847) 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 | « no previous file | Source/core/fetch/CSSStyleSheetResource.cpp » ('j') | 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
old mode 100644
new mode 100755
index ae592d8c2fc3efd5d8410c0aec8aab344705277c..30b8a47bb97ebb7aca484e012b0200519b6483bf
--- a/Source/core/editing/markup.cpp
+++ b/Source/core/editing/markup.cpp
@@ -754,7 +754,7 @@ static void fillContainerFromString(ContainerNode* paragraph, const String& stri
Vector<String> tabList;
string.split('\t', true, tabList);
- String tabText = emptyString();
+ StringBuilder tabText;
bool first = true;
size_t numEntries = tabList.size();
for (size_t i = 0; i < numEntries; ++i) {
@@ -763,8 +763,8 @@ static void fillContainerFromString(ContainerNode* paragraph, const String& stri
// append the non-tab textual part
if (!s.isEmpty()) {
if (!tabText.isEmpty()) {
- paragraph->appendChild(createTabSpanElement(document, tabText));
- tabText = emptyString();
+ paragraph->appendChild(createTabSpanElement(document, tabText.toString()));
+ tabText.clear();
}
RefPtr<Node> textNode = document.createTextNode(stringWithRebalancedWhitespace(s, first, i + 1 == numEntries));
paragraph->appendChild(textNode.release());
@@ -775,7 +775,7 @@ static void fillContainerFromString(ContainerNode* paragraph, const String& stri
if (i + 1 != numEntries)
tabText.append('\t');
else if (!tabText.isEmpty())
- paragraph->appendChild(createTabSpanElement(document, tabText));
+ paragraph->appendChild(createTabSpanElement(document, tabText.toString()));
first = false;
}
« no previous file with comments | « no previous file | Source/core/fetch/CSSStyleSheetResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698