Use StringBuilder append(char) and appendLiteral in more places
https://bugs.webkit.org/show_bug.cgi?id=136470
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-09-03
Reviewed by Andreas Kling.
* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::loggingString):
* Modules/websockets/WebSocket.cpp:
(WebCore::encodeProtocolString):
* Modules/websockets/WebSocketExtensionDispatcher.cpp:
(WebCore::WebSocketExtensionDispatcher::createHeaderValue):
(WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::clientLocation):
(WebCore::WebSocketHandshake::clientHandshakeMessage):
* css/CSSCalculationValue.cpp:
(WebCore::buildCssText):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::cssText):
* css/CSSMediaRule.cpp:
(WebCore::CSSMediaRule::cssText):
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::selectorsText):
* css/CSSSupportsRule.cpp:
(WebCore::CSSSupportsRule::cssText):
* css/MediaQuery.cpp:
(WebCore::MediaQuery::serialize):
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::generateUniquePrefix):
* editing/markup.cpp:
(WebCore::urlToMarkup):
* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::convertToDataURL):
* html/EmailInputType.cpp:
(WebCore::EmailInputType::sanitizeValue):
* html/FormController.cpp:
(WebCore::recordFormStructure):
* html/parser/XSSAuditorDelegate.cpp:
(WebCore::buildConsoleError):
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::collectCueText):
* mathml/MathMLMencloseElement.cpp:
(WebCore::MathMLMencloseElement::longDivLeftPadding):
* page/PageSerializer.cpp:
(WebCore::SerializerMarkupAccumulator::appendElement):
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::toRawString):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::logThreadedScrollingMode):
* platform/PODInterval.h:
(WebCore::PODInterval::toString):
* platform/PODRedBlackTree.h:
(WebCore::PODRedBlackTree::dumpFromNode):
* platform/UUID.cpp:
(WebCore::createCanonicalUUIDString):
* platform/network/ProxyServer.cpp:
(WebCore::appendProxyServerString):
(WebCore::toString):
* platform/text/DateTimeFormat.cpp:
(WebCore::DateTimeFormat::quoteAndAppendLiteral):
* platform/text/PlatformLocale.cpp:
(WebCore::DateTimeStringBuilder::zeroPadString):
(WebCore::Locale::convertFromLocalizedNumber):
* platform/text/TextStream.cpp:
(WebCore::TextStream::operator<<):
* rendering/RenderListMarker.cpp:
(WebCore::listMarkerText):
* testing/Internals.cpp:
(WebCore::Internals::parserMetaData):
(WebCore::Internals::getCurrentCursorInfo):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/html/FormController.cpp b/Source/WebCore/html/FormController.cpp
index 45100d1..b7df2d4 100644
--- a/Source/WebCore/html/FormController.cpp
+++ b/Source/WebCore/html/FormController.cpp
@@ -302,7 +302,7 @@
// 2 is enough to distinguish forms in webkit.org/b/91209#c0
const size_t namedControlsToBeRecorded = 2;
const Vector<FormAssociatedElement*>& controls = form.associatedElements();
- builder.append(" [");
+ builder.appendLiteral(" [");
for (size_t i = 0, namedControls = 0; i < controls.size() && namedControls < namedControlsToBeRecorded; ++i) {
if (!controls[i]->isFormControlElementWithState())
continue;
@@ -314,9 +314,9 @@
continue;
namedControls++;
builder.append(name);
- builder.append(" ");
+ builder.append(' ');
}
- builder.append("]");
+ builder.append(']');
}
static inline String formSignature(const HTMLFormElement& form)