Diff
Modified: trunk/Source/WebCore/ChangeLog (173211 => 173212)
--- trunk/Source/WebCore/ChangeLog 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/ChangeLog 2014-09-03 18:42:54 UTC (rev 173212)
@@ -1,3 +1,78 @@
+2014-09-03 Joseph Pecoraro <pecor...@apple.com>
+
+ Use StringBuilder append(char) and appendLiteral in more places
+ https://bugs.webkit.org/show_bug.cgi?id=136470
+
+ 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):
+
2014-09-03 Bear Travis <betra...@adobe.com>
[CSS Font Loading] Enable Page Caching
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp (173211 => 173212)
--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -266,9 +266,9 @@
for (size_t i = 0; i < arrayValue.size(); ++i) {
result.append(arrayValue[i].loggingString());
if (i < arrayValue.size() - 1)
- result.append(", ");
+ result.appendLiteral(", ");
}
- result.append(" }");
+ result.appendLiteral(" }");
return result.toString();
}
case IDBKey::StringType:
Modified: trunk/Source/WebCore/Modules/websockets/WebSocket.cpp (173211 => 173212)
--- trunk/Source/WebCore/Modules/websockets/WebSocket.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/Modules/websockets/WebSocket.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -97,7 +97,7 @@
if (protocol[i] < 0x20 || protocol[i] > 0x7E)
builder.append(String::format("\\u%04X", protocol[i]));
else if (protocol[i] == 0x5c)
- builder.append("\\\\");
+ builder.appendLiteral("\\\\");
else
builder.append(protocol[i]);
}
Modified: trunk/Source/WebCore/Modules/websockets/WebSocketExtensionDispatcher.cpp (173211 => 173212)
--- trunk/Source/WebCore/Modules/websockets/WebSocketExtensionDispatcher.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketExtensionDispatcher.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -69,7 +69,7 @@
StringBuilder builder;
builder.append(m_processors[0]->handshakeString());
for (size_t i = 1; i < numProcessors; ++i) {
- builder.append(", ");
+ builder.appendLiteral(", ");
builder.append(m_processors[i]->handshakeString());
}
return builder.toString();
@@ -78,14 +78,14 @@
void WebSocketExtensionDispatcher::appendAcceptedExtension(const String& extensionToken, HashMap<String, String>& extensionParameters)
{
if (!m_acceptedExtensionsBuilder.isEmpty())
- m_acceptedExtensionsBuilder.append(", ");
+ m_acceptedExtensionsBuilder.appendLiteral(", ");
m_acceptedExtensionsBuilder.append(extensionToken);
// FIXME: Should use ListHashSet to keep the order of the parameters.
for (HashMap<String, String>::const_iterator iterator = extensionParameters.begin(); iterator != extensionParameters.end(); ++iterator) {
- m_acceptedExtensionsBuilder.append("; ");
+ m_acceptedExtensionsBuilder.appendLiteral("; ");
m_acceptedExtensionsBuilder.append(iterator->key);
if (!iterator->value.isNull()) {
- m_acceptedExtensionsBuilder.append("=");
+ m_acceptedExtensionsBuilder.append('=');
m_acceptedExtensionsBuilder.append(iterator->value);
}
}
Modified: trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp (173211 => 173212)
--- trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -172,7 +172,7 @@
{
StringBuilder builder;
builder.append(m_secure ? "wss" : "ws");
- builder.append("://");
+ builder.appendLiteral("://");
builder.append(hostName(m_url, m_secure));
builder.append(resourceName(m_url));
return builder.toString();
@@ -183,9 +183,9 @@
// Keep the following consistent with clientHandshakeRequest().
StringBuilder builder;
- builder.append("GET ");
+ builder.appendLiteral("GET ");
builder.append(resourceName(m_url));
- builder.append(" HTTP/1.1\r\n");
+ builder.appendLiteral(" HTTP/1.1\r\n");
Vector<String> fields;
fields.append("Upgrade: websocket");
@@ -226,10 +226,10 @@
for (size_t i = 0; i < fields.size(); i++) {
builder.append(fields[i]);
- builder.append("\r\n");
+ builder.appendLiteral("\r\n");
}
- builder.append("\r\n");
+ builder.appendLiteral("\r\n");
return builder.toString().utf8();
}
Modified: trunk/Source/WebCore/css/CSSCalculationValue.cpp (173211 => 173212)
--- trunk/Source/WebCore/css/CSSCalculationValue.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/css/CSSCalculationValue.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -159,7 +159,7 @@
static String buildCssText(const String& _expression_)
{
StringBuilder result;
- result.append("calc");
+ result.appendLiteral("calc");
bool expressionHasSingleTerm = _expression_[0] != '(';
if (expressionHasSingleTerm)
result.append('(');
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (173211 => 173212)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -1278,7 +1278,7 @@
if (i)
result.append(' ');
result.append(getPropertyName(computedProperties[i]));
- result.append(": ", 2);
+ result.appendLiteral(": ");
result.append(getPropertyValue(computedProperties[i]));
result.append(';');
}
Modified: trunk/Source/WebCore/css/CSSMediaRule.cpp (173211 => 173212)
--- trunk/Source/WebCore/css/CSSMediaRule.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/css/CSSMediaRule.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -51,7 +51,7 @@
String CSSMediaRule::cssText() const
{
StringBuilder result;
- result.append("@media ");
+ result.appendLiteral("@media ");
if (mediaQueries()) {
result.append(mediaQueries()->mediaText());
result.append(' ');
Modified: trunk/Source/WebCore/css/CSSSelectorList.cpp (173211 => 173212)
--- trunk/Source/WebCore/css/CSSSelectorList.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/css/CSSSelectorList.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -125,7 +125,7 @@
for (const CSSSelector* s = first(); s; s = next(s)) {
if (s != first())
- result.append(", ");
+ result.appendLiteral(", ");
result.append(s->selectorText());
}
Modified: trunk/Source/WebCore/css/CSSSupportsRule.cpp (173211 => 173212)
--- trunk/Source/WebCore/css/CSSSupportsRule.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/css/CSSSupportsRule.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -50,9 +50,9 @@
{
StringBuilder result;
- result.append("@supports ");
+ result.appendLiteral("@supports ");
result.append(conditionText());
- result.append(" {\n");
+ result.appendLiteral(" {\n");
appendCssTextForItems(result);
result.append('}');
Modified: trunk/Source/WebCore/css/MediaQuery.cpp (173211 => 173212)
--- trunk/Source/WebCore/css/MediaQuery.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/css/MediaQuery.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -41,10 +41,10 @@
if (!m_ignored) {
switch (m_restrictor) {
case MediaQuery::Only:
- result.append("only ");
+ result.appendLiteral("only ");
break;
case MediaQuery::Not:
- result.append("not ");
+ result.appendLiteral("not ");
break;
case MediaQuery::None:
break;
@@ -57,17 +57,17 @@
if (m_mediaType != "all" || m_restrictor != None) {
result.append(m_mediaType);
- result.append(" and ");
+ result.appendLiteral(" and ");
}
result.append(m_expressions->at(0)->serialize());
for (size_t i = 1; i < m_expressions->size(); ++i) {
- result.append(" and ");
+ result.appendLiteral(" and ");
result.append(m_expressions->at(i)->serialize());
}
} else {
// If query is invalid, serialized text should turn into "not all".
- result.append("not all");
+ result.appendLiteral("not all");
}
return result.toString();
}
Modified: trunk/Source/WebCore/editing/MarkupAccumulator.cpp (173211 => 173212)
--- trunk/Source/WebCore/editing/MarkupAccumulator.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/editing/MarkupAccumulator.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -493,7 +493,7 @@
StringBuilder builder;
do {
builder.clear();
- builder.append("NS");
+ builder.appendLiteral("NS");
builder.appendNumber(++m_prefixLevel);
const AtomicString& name = builder.toAtomicString();
if (!namespaces.get(name.impl())) {
Modified: trunk/Source/WebCore/editing/markup.cpp (173211 => 173212)
--- trunk/Source/WebCore/editing/markup.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/editing/markup.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -858,11 +858,11 @@
String urlToMarkup(const URL& 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();
}
Modified: trunk/Source/WebCore/fileapi/FileReaderLoader.cpp (173211 => 173212)
--- trunk/Source/WebCore/fileapi/FileReaderLoader.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/fileapi/FileReaderLoader.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -326,7 +326,7 @@
void FileReaderLoader::convertToDataURL()
{
StringBuilder builder;
- builder.append("data:");
+ builder.appendLiteral("data:");
if (!m_bytesLoaded) {
m_stringResult = builder.toString();
@@ -334,7 +334,7 @@
}
builder.append(m_dataType);
- builder.append(";base64,");
+ builder.appendLiteral(";base64,");
Vector<char> out;
base64Encode(m_rawData->data(), m_bytesLoaded, out);
Modified: trunk/Source/WebCore/html/EmailInputType.cpp (173211 => 173212)
--- trunk/Source/WebCore/html/EmailInputType.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/html/EmailInputType.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -102,7 +102,7 @@
StringBuilder strippedValue;
for (unsigned i = 0; i < addresses.size(); ++i) {
if (i > 0)
- strippedValue.append(",");
+ strippedValue.append(',');
strippedValue.append(stripLeadingAndTrailingHTMLSpaces(addresses[i]));
}
return strippedValue.toString();
Modified: trunk/Source/WebCore/html/FormController.cpp (173211 => 173212)
--- trunk/Source/WebCore/html/FormController.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/html/FormController.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -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)
Modified: trunk/Source/WebCore/html/parser/XSSAuditorDelegate.cpp (173211 => 173212)
--- trunk/Source/WebCore/html/parser/XSSAuditorDelegate.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/html/parser/XSSAuditorDelegate.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -53,20 +53,20 @@
static inline String buildConsoleError(const XSSInfo& xssInfo)
{
StringBuilder message;
- message.append("The XSS Auditor ");
+ message.appendLiteral("The XSS Auditor ");
message.append(xssInfo.m_didBlockEntirePage ? "blocked access to" : "refused to execute a script in");
- message.append(" '");
+ message.appendLiteral(" '");
message.append(xssInfo.m_originalURL);
- message.append("' because ");
+ message.appendLiteral("' because ");
message.append(xssInfo.m_didBlockEntirePage ? "the source code of a script" : "its source code");
- message.append(" was found within the request.");
+ message.appendLiteral(" was found within the request.");
if (xssInfo.m_didSendCSPHeader)
- message.append(" The server sent a 'Content-Security-Policy' header requesting this behavior.");
+ message.appendLiteral(" The server sent a 'Content-Security-Policy' header requesting this behavior.");
else if (xssInfo.m_didSendXSSProtectionHeader)
- message.append(" The server sent an 'X-XSS-Protection' header requesting this behavior.");
+ message.appendLiteral(" The server sent an 'X-XSS-Protection' header requesting this behavior.");
else
- message.append(" The auditor was enabled as the server sent neither an 'X-XSS-Protection' nor 'Content-Security-Policy' header.");
+ message.appendLiteral(" The auditor was enabled as the server sent neither an 'X-XSS-Protection' nor 'Content-Security-Policy' header.");
return message.toString();
}
Modified: trunk/Source/WebCore/html/track/WebVTTParser.cpp (173211 => 173212)
--- trunk/Source/WebCore/html/track/WebVTTParser.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/html/track/WebVTTParser.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -349,7 +349,7 @@
return recoverCue(line);
}
if (!m_currentContent.isEmpty())
- m_currentContent.append("\n");
+ m_currentContent.append('\n');
m_currentContent.append(line);
return CueText;
Modified: trunk/Source/WebCore/mathml/MathMLMencloseElement.cpp (173211 => 173212)
--- trunk/Source/WebCore/mathml/MathMLMencloseElement.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/mathml/MathMLMencloseElement.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -129,15 +129,13 @@
String MathMLMencloseElement::longDivLeftPadding() const
{
StringBuilder padding;
- float fontSize = 0;
String closingBrace = ")";
TextRun run(closingBrace.impl(), closingBrace.length());
Node* node = parentNode();
if (node && node->renderer()) {
const Font& font = node->renderer()->style().font();
- fontSize = font.width(run);
- padding.append(String::number(fontSize));
- padding.append("px");
+ padding.appendNumber(font.width(run));
+ padding.appendLiteral("px");
}
return padding.toString();
}
Modified: trunk/Source/WebCore/page/PageSerializer.cpp (173211 => 173212)
--- trunk/Source/WebCore/page/PageSerializer.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/page/PageSerializer.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -136,9 +136,9 @@
MarkupAccumulator::appendElement(out, element, namespaces);
if (element.hasTagName(HTMLNames::headTag)) {
- out.append("<meta charset=\"");
+ out.appendLiteral("<meta charset=\"");
out.append(m_document.charset());
- out.append("\">");
+ out.appendLiteral("\">");
}
// FIXME: For object (plugins) tags and video tag we could replace them by an image of their current contents.
Modified: trunk/Source/WebCore/page/SecurityOrigin.cpp (173211 => 173212)
--- trunk/Source/WebCore/page/SecurityOrigin.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/page/SecurityOrigin.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -477,7 +477,7 @@
StringBuilder result;
result.reserveCapacity(m_protocol.length() + m_host.length() + 10);
result.append(m_protocol);
- result.append("://");
+ result.appendLiteral("://");
result.append(m_host);
if (m_port) {
Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (173211 => 173212)
--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -395,15 +395,15 @@
StringBuilder stringBuilder;
if (reasons & ScrollingCoordinator::ForcedOnMainThread)
- stringBuilder.append("Forced on main thread, ");
+ stringBuilder.appendLiteral("Forced on main thread, ");
if (reasons & ScrollingCoordinator::HasSlowRepaintObjects)
- stringBuilder.append("Has slow repaint objects, ");
+ stringBuilder.appendLiteral("Has slow repaint objects, ");
if (reasons & ScrollingCoordinator::HasViewportConstrainedObjectsWithoutSupportingFixedLayers)
- stringBuilder.append("Has viewport constrained objects without supporting fixed layers, ");
+ stringBuilder.appendLiteral("Has viewport constrained objects without supporting fixed layers, ");
if (reasons & ScrollingCoordinator::HasNonLayerViewportConstrainedObjects)
- stringBuilder.append("Has non-layer viewport-constrained objects, ");
+ stringBuilder.appendLiteral("Has non-layer viewport-constrained objects, ");
if (reasons & ScrollingCoordinator::IsImageDocument)
- stringBuilder.append("Is image document, ");
+ stringBuilder.appendLiteral("Is image document, ");
if (stringBuilder.length())
stringBuilder.resize(stringBuilder.length() - 2);
Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm (173211 => 173212)
--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm 2014-09-03 18:42:54 UTC (rev 173212)
@@ -517,15 +517,15 @@
StringBuilder reasonsDescription;
if (synchronousScrollingReasons & ScrollingCoordinator::ForcedOnMainThread)
- reasonsDescription.append("forced,");
+ reasonsDescription.appendLiteral("forced,");
if (synchronousScrollingReasons & ScrollingCoordinator::HasSlowRepaintObjects)
- reasonsDescription.append("slow-repaint objects,");
+ reasonsDescription.appendLiteral("slow-repaint objects,");
if (synchronousScrollingReasons & ScrollingCoordinator::HasViewportConstrainedObjectsWithoutSupportingFixedLayers)
- reasonsDescription.append("viewport-constrained objects,");
+ reasonsDescription.appendLiteral("viewport-constrained objects,");
if (synchronousScrollingReasons & ScrollingCoordinator::HasNonLayerViewportConstrainedObjects)
- reasonsDescription.append("non-layer viewport-constrained objects,");
+ reasonsDescription.appendLiteral("non-layer viewport-constrained objects,");
if (synchronousScrollingReasons & ScrollingCoordinator::IsImageDocument)
- reasonsDescription.append("image document,");
+ reasonsDescription.appendLiteral("image document,");
// Strip the trailing comma.
String reasonsDescriptionTrimmed = reasonsDescription.toString().left(reasonsDescription.length() - 1);
Modified: trunk/Source/WebCore/platform/PODInterval.h (173211 => 173212)
--- trunk/Source/WebCore/platform/PODInterval.h 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/platform/PODInterval.h 2014-09-03 18:42:54 UTC (rev 173212)
@@ -144,7 +144,7 @@
builder.append(ValueToString<UserData>::string(data()));
builder.append(", maxHigh=");
builder.append(ValueToString<T>::string(maxHigh()));
- builder.append("]");
+ builder.append(']');
return builder.toString();
}
#endif
Modified: trunk/Source/WebCore/platform/PODRedBlackTree.h (173211 => 173212)
--- trunk/Source/WebCore/platform/PODRedBlackTree.h 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/platform/PODRedBlackTree.h 2014-09-03 18:42:54 UTC (rev 173212)
@@ -792,10 +792,10 @@
{
StringBuilder builder;
for (int i = 0; i < indentation; i++)
- builder.append(" ");
- builder.append("-");
+ builder.append(' ');
+ builder.append('-');
if (node) {
- builder.append(" ");
+ builder.append(' ');
builder.append(ValueToString<T>::string(node->data()));
builder.append((node->color() == Black) ? " (black)" : " (red)");
}
Modified: trunk/Source/WebCore/platform/UUID.cpp (173211 => 173212)
--- trunk/Source/WebCore/platform/UUID.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/platform/UUID.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -46,14 +46,14 @@
StringBuilder builder;
builder.reserveCapacity(36);
appendUnsignedAsHexFixedSize(randomData[0], builder, 8, Lowercase);
- builder.append("-");
+ builder.append('-');
appendUnsignedAsHexFixedSize(randomData[1] >> 16, builder, 4, Lowercase);
- builder.append("-4");
+ builder.appendLiteral("-4");
appendUnsignedAsHexFixedSize(randomData[1] & 0x00000fff, builder, 3, Lowercase);
- builder.append("-");
+ builder.append('-');
appendUnsignedAsHexFixedSize((randomData[2] >> 30) | 0x8, builder, 1, Lowercase);
appendUnsignedAsHexFixedSize((randomData[2] >> 16) & 0x00000fff, builder, 3, Lowercase);
- builder.append("-");
+ builder.append('-');
appendUnsignedAsHexFixedSize(randomData[2] & 0x0000ffff, builder, 4, Lowercase);
appendUnsignedAsHexFixedSize(randomData[3], builder, 8, Lowercase);
return builder.toString();
Modified: trunk/Source/WebCore/platform/network/ProxyServer.cpp (173211 => 173212)
--- trunk/Source/WebCore/platform/network/ProxyServer.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/platform/network/ProxyServer.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -34,14 +34,14 @@
{
switch (proxyServer.type()) {
case ProxyServer::Direct:
- builder.append("DIRECT");
+ builder.appendLiteral("DIRECT");
return;
case ProxyServer::HTTP:
case ProxyServer::HTTPS:
- builder.append("PROXY");
+ builder.appendLiteral("PROXY");
break;
case ProxyServer::SOCKS:
- builder.append("SOCKS");
+ builder.appendLiteral("SOCKS");
break;
}
@@ -63,7 +63,7 @@
StringBuilder stringBuilder;
for (size_t i = 0; i < proxyServers.size(); ++i) {
if (i)
- stringBuilder.append("; ");
+ stringBuilder.appendLiteral("; ");
appendProxyServerString(stringBuilder, proxyServers[i]);
}
Modified: trunk/Source/WebCore/platform/text/DateTimeFormat.cpp (173211 => 173212)
--- trunk/Source/WebCore/platform/text/DateTimeFormat.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/platform/text/DateTimeFormat.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -257,9 +257,9 @@
}
if (literal.find('\'') == notFound) {
- buffer.append("'");
+ buffer.append('\'');
buffer.append(literal);
- buffer.append("'");
+ buffer.append('\'');
return;
}
@@ -268,10 +268,10 @@
buffer.append("''");
else {
String escaped = literal.substring(i);
- escaped.replace(ASCIILiteral("'"), ASCIILiteral("''"));
- buffer.append("'");
+ escaped.replace('\'', "''");
+ buffer.append('\'');
buffer.append(escaped);
- buffer.append("'");
+ buffer.append('\'');
return;
}
}
Modified: trunk/Source/WebCore/platform/text/PlatformLocale.cpp (173211 => 173212)
--- trunk/Source/WebCore/platform/text/PlatformLocale.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/platform/text/PlatformLocale.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -81,7 +81,7 @@
StringBuilder zeroPaddedStringBuilder;
zeroPaddedStringBuilder.reserveCapacity(width);
for (size_t i = string.length(); i < width; ++i)
- zeroPaddedStringBuilder.append("0");
+ zeroPaddedStringBuilder.append('0');
zeroPaddedStringBuilder.append(string);
return zeroPaddedStringBuilder.toString();
}
@@ -311,7 +311,7 @@
StringBuilder builder;
builder.reserveCapacity(input.length());
if (isNegative)
- builder.append("-");
+ builder.append('-');
for (unsigned i = startIndex; i < endIndex;) {
unsigned symbolIndex = matchedDecimalSymbolIndex(input, i);
if (symbolIndex >= DecimalSymbolsSize)
Modified: trunk/Source/WebCore/platform/text/TextStream.cpp (173211 => 173212)
--- trunk/Source/WebCore/platform/text/TextStream.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/platform/text/TextStream.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -91,13 +91,13 @@
TextStream& TextStream::operator<<(float f)
{
- m_text.append(String::numberToStringFixedWidth(f, 2));
+ m_text.appendFixedWidthNumber(f, 2);
return *this;
}
TextStream& TextStream::operator<<(double d)
{
- m_text.append(String::numberToStringFixedWidth(d, 2));
+ m_text.appendFixedWidthNumber(d, 2);
return *this;
}
Modified: trunk/Source/WebCore/rendering/RenderListMarker.cpp (173211 => 173212)
--- trunk/Source/WebCore/rendering/RenderListMarker.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/rendering/RenderListMarker.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -644,7 +644,7 @@
break;
}
if (value < 0) {
- builder.append("-0");
+ builder.appendLiteral("-0");
builder.appendNumber(-value); // -01 to -09
break;
}
Modified: trunk/Source/WebCore/testing/Internals.cpp (173211 => 173212)
--- trunk/Source/WebCore/testing/Internals.cpp 2014-09-03 17:57:25 UTC (rev 173211)
+++ trunk/Source/WebCore/testing/Internals.cpp 2014-09-03 18:42:54 UTC (rev 173212)
@@ -1213,25 +1213,25 @@
if (executable->isFunctionExecutable()) {
FunctionExecutable* funcExecutable = reinterpret_cast<FunctionExecutable*>(executable);
String inferredName = funcExecutable->inferredName().string();
- result.append("function \"");
+ result.appendLiteral("function \"");
result.append(inferredName);
- result.append("\"");
+ result.append('"');
} else if (executable->isEvalExecutable())
- result.append("eval");
+ result.appendLiteral("eval");
else {
ASSERT(executable->isProgramExecutable());
- result.append("program");
+ result.appendLiteral("program");
}
- result.append(" { ");
+ result.appendLiteral(" { ");
result.appendNumber(startLine);
- result.append(":");
+ result.append(':');
result.appendNumber(startColumn);
- result.append(" - ");
+ result.appendLiteral(" - ");
result.appendNumber(endLine);
- result.append(":");
+ result.append(':');
result.appendNumber(endColumn);
- result.append(" }");
+ result.appendLiteral(" }");
return result.toString();
}
@@ -1996,22 +1996,22 @@
Cursor cursor = document->frame()->eventHandler().currentMouseCursor();
StringBuilder result;
- result.append("type=");
+ result.appendLiteral("type=");
result.append(cursorTypeToString(cursor.type()));
- result.append(" hotSpot=");
+ result.appendLiteral(" hotSpot=");
result.appendNumber(cursor.hotSpot().x());
- result.append(",");
+ result.append(',');
result.appendNumber(cursor.hotSpot().y());
if (cursor.image()) {
FloatSize size = cursor.image()->size();
- result.append(" image=");
+ result.appendLiteral(" image=");
result.appendNumber(size.width());
- result.append("x");
+ result.append('x');
result.appendNumber(size.height());
}
#if ENABLE(MOUSE_CURSOR_SCALE)
if (cursor.imageScaleFactor() != 1) {
- result.append(" scale=");
+ result.appendLiteral(" scale=");
NumberToStringBuffer buffer;
result.append(numberToFixedPrecisionString(cursor.imageScaleFactor(), 8, buffer, true));
}