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

Unified Diff: third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp

Issue 2017053003: Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 years, 7 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
Index: third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp b/third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp
index 42c412bb66716df31b2f2b136c7abb286202b233..ca41e143210a2c52ab59d4a965f4a1a4d8641f41 100644
--- a/third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp
@@ -149,7 +149,7 @@ String WebFrameSerializerImpl::preActionBeforeSerializeOpenTag(
result.append(WebFrameSerializer::generateMarkOfTheWebDeclaration(param->url));
} else if (isHTMLBaseElement(*element)) {
// Comment the BASE tag when serializing dom.
- result.appendLiteral("<!--");
+ result.append("<!--");
}
} else {
// Write XML declaration.
@@ -161,13 +161,13 @@ String WebFrameSerializerImpl::preActionBeforeSerializeOpenTag(
xmlEncoding = param->document->encodingName();
if (xmlEncoding.isEmpty())
xmlEncoding = UTF8Encoding().name();
- result.appendLiteral("<?xml version=\"");
+ result.append("<?xml version=\"");
result.append(param->document->xmlVersion());
- result.appendLiteral("\" encoding=\"");
+ result.append("\" encoding=\"");
result.append(xmlEncoding);
if (param->document->xmlStandalone())
- result.appendLiteral("\" standalone=\"yes");
- result.appendLiteral("\"?>\n");
+ result.append("\" standalone=\"yes");
+ result.append("\"?>\n");
}
// Add doc type declaration if original document has it.
if (!param->haveSeenDocType) {
@@ -237,7 +237,7 @@ String WebFrameSerializerImpl::postActionAfterSerializeEndTag(
return result.toString();
// Comment the BASE tag when serializing DOM.
if (isHTMLBaseElement(*element)) {
- result.appendLiteral("-->");
+ result.append("-->");
// Append a new base tag declaration.
result.append(WebFrameSerializer::generateBaseTagDeclaration(
param->document->baseTarget()));
@@ -284,7 +284,7 @@ void WebFrameSerializerImpl::appendAttribute(
const String& attrValue) {
result.append(' ');
result.append(attrName);
- result.appendLiteral("=\"");
+ result.append("=\"");
if (isHTMLDocument)
result.append(m_htmlEntities.convertEntitiesInString(attrValue));
else
@@ -381,7 +381,7 @@ void WebFrameSerializerImpl::endTagToString(
return;
// Write end tag when element has child/children.
if (element->hasChildren() || param->haveAddedContentsBeforeEnd) {
- result.appendLiteral("</");
+ result.append("</");
result.append(element->nodeName().lower());
result.append('>');
} else {
@@ -391,13 +391,13 @@ void WebFrameSerializerImpl::endTagToString(
// FIXME: This code is horribly wrong. WebFrameSerializerImpl must die.
if (!element->isHTMLElement() || !toHTMLElement(element)->ieForbidsInsertHTML()) {
// We need to write end tag when it is required.
- result.appendLiteral("</");
+ result.append("</");
result.append(element->nodeName().lower());
result.append('>');
}
} else {
// For xml base document.
- result.appendLiteral(" />");
+ result.append(" />");
}
}
// Do post action for end tag.
« no previous file with comments | « third_party/WebKit/Source/web/WebAXObject.cpp ('k') | third_party/WebKit/Source/web/tests/FrameSerializerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698