diff options
author | martijn@martijnc.be <martijn@martijnc.be@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2014-02-05 20:43:05 +0000 |
---|---|---|
committer | martijn@martijnc.be <martijn@martijnc.be@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2014-02-05 20:43:05 +0000 |
commit | ef2c53b9081e632282a90f749489bedbe28ab2d5 (patch) | |
tree | f0c0316bf99b9e7cf88bc4e6d7a2febfb9650ce0 /third_party/WebKit/Source | |
parent | 34a54464bd08131ef43c60047157be3a93367e8d (diff) | |
download | chromium_src-ef2c53b9081e632282a90f749489bedbe28ab2d5.zip chromium_src-ef2c53b9081e632282a90f749489bedbe28ab2d5.tar.gz chromium_src-ef2c53b9081e632282a90f749489bedbe28ab2d5.tar.bz2 |
Cleanup usage of String::append
Cleanup usage of String::append in some parts of the Blink source.
BUG=268281
Review URL: https://codereview.chromium.org/145033003
git-svn-id: svn://svn.chromium.org/blink/trunk@166539 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/Source')
4 files changed, 3 insertions, 20 deletions
diff --git a/third_party/WebKit/Source/core/css/CSSOMUtils.cpp b/third_party/WebKit/Source/core/css/CSSOMUtils.cpp index 36545dd..1e7882f 100644 --- a/third_party/WebKit/Source/core/css/CSSOMUtils.cpp +++ b/third_party/WebKit/Source/core/css/CSSOMUtils.cpp @@ -49,13 +49,6 @@ void serializeCharacterAsCodePoint(UChar32 c, StringBuilder& appendTo) appendTo.append(' '); } -void serializeIdentifier(const String& identifier, String& appendTo) -{ - StringBuilder addend; - serializeIdentifier(identifier, addend); - appendTo.append(addend.toString()); -} - void serializeIdentifier(const String& identifier, StringBuilder& appendTo) { bool isFirst = true; @@ -85,13 +78,6 @@ void serializeIdentifier(const String& identifier, StringBuilder& appendTo) } } -void serializeString(const String& string, String& appendTo) -{ - StringBuilder addend; - serializeString(string, addend); - appendTo.append(addend.toString()); -} - void serializeString(const String& string, StringBuilder& appendTo) { appendTo.append('\"'); diff --git a/third_party/WebKit/Source/core/css/CSSOMUtils.h b/third_party/WebKit/Source/core/css/CSSOMUtils.h index dd021ab..813396b 100644 --- a/third_party/WebKit/Source/core/css/CSSOMUtils.h +++ b/third_party/WebKit/Source/core/css/CSSOMUtils.h @@ -43,9 +43,7 @@ namespace WebCore { // Common serializing methods. See: http://dev.w3.org/csswg/cssom/#common-serializing-idioms void serializeCharacter(UChar32, StringBuilder& appendTo); void serializeCharacterAsCodePoint(UChar32, StringBuilder& appendTo); -void serializeIdentifier(const String& identifier, String& appendTo); void serializeIdentifier(const String& identifier, StringBuilder& appendTo); -void serializeString(const String&, String& appendTo); void serializeString(const String&, StringBuilder& appendTo); } // namespace WebCore diff --git a/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp b/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp index abd8f14..9904cbc 100644 --- a/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp +++ b/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp @@ -100,8 +100,7 @@ TEST(ImageResourceTest, CancelOnDetach) blink::WebURLResponse response; response.initialize(); response.setMIMEType("text/html"); - WTF::String localPath = blink::Platform::current()->unitTestSupport()->webKitRootDir(); - localPath.append("/Source/web/tests/data/cancelTest.html"); + WTF::String localPath = String(blink::Platform::current()->unitTestSupport()->webKitRootDir()) + "/Source/web/tests/data/cancelTest.html"; blink::Platform::current()->unitTestSupport()->registerMockedURL(testURL, response, localPath); // Create enough of a mocked world to get a functioning ResourceLoader. diff --git a/third_party/WebKit/Source/core/inspector/InspectorStyleTextEditor.cpp b/third_party/WebKit/Source/core/inspector/InspectorStyleTextEditor.cpp index 2fdebc4..af66f69 100644 --- a/third_party/WebKit/Source/core/inspector/InspectorStyleTextEditor.cpp +++ b/third_party/WebKit/Source/core/inspector/InspectorStyleTextEditor.cpp @@ -93,11 +93,11 @@ void InspectorStyleTextEditor::insertProperty(unsigned index, const String& prop textToSet.insert(formatLineFeed, formattingPrependOffset); } if (!isHTMLLineBreak(m_styleText[propertyStart])) - textToSet.append(formatLineFeed); + textToSet = textToSet + formatLineFeed; } else { String fullPrefix = formatLineFeed + formatPropertyPrefix; long fullPrefixLength = fullPrefix.length(); - textToSet.append(fullPrefix); + textToSet = textToSet + fullPrefix; if (insertFirstInSource && (propertyStart < fullPrefixLength || m_styleText.substring(propertyStart - fullPrefixLength, fullPrefixLength) != fullPrefix)) textToSet.insert(fullPrefix, formattingPrependOffset); } |