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

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

Issue 1161463008: Refactoring: Have StyledMarkupAccumulator use MarkupFormatter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 6 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: Source/core/editing/MarkupFormatter.cpp
diff --git a/Source/core/editing/MarkupFormatter.cpp b/Source/core/editing/MarkupFormatter.cpp
index 66add9d955fd18f6ec83a828c7af20675c899fa3..eede58c029cb3a5ea3d99ca45a44ca8717bfdb33 100644
--- a/Source/core/editing/MarkupFormatter.cpp
+++ b/Source/core/editing/MarkupFormatter.cpp
@@ -132,6 +132,38 @@ String MarkupFormatter::resolveURLIfNeeded(const Element& element, const String&
return urlString;
}
+void MarkupFormatter::appendStartMarkup(StringBuilder& result, const Node& node, Namespaces* namespaces)
+{
+ switch (node.nodeType()) {
+ case Node::TEXT_NODE:
+ ASSERT_NOT_REACHED();
+ break;
+ case Node::COMMENT_NODE:
+ appendComment(result, toComment(node).data());
+ break;
+ case Node::DOCUMENT_NODE:
+ appendXMLDeclaration(result, toDocument(node));
+ break;
+ case Node::DOCUMENT_FRAGMENT_NODE:
+ break;
+ case Node::DOCUMENT_TYPE_NODE:
+ appendDocumentType(result, toDocumentType(node));
+ break;
+ case Node::PROCESSING_INSTRUCTION_NODE:
+ appendProcessingInstruction(result, toProcessingInstruction(node).target(), toProcessingInstruction(node).data());
+ break;
+ case Node::ELEMENT_NODE:
+ ASSERT_NOT_REACHED();
+ break;
+ case Node::CDATA_SECTION_NODE:
+ appendCDATASection(result, toCDATASection(node).data());
+ break;
+ case Node::ATTRIBUTE_NODE:
+ ASSERT_NOT_REACHED();
+ break;
+ }
+}
+
static bool elementCannotHaveEndTag(const Node& node)
{
if (!node.isHTMLElement())

Powered by Google App Engine
This is Rietveld 408576698