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

Unified Diff: Source/core/editing/MarkupAccumulator.h

Issue 184273003: Allow overriding the serialization rules in MarkupAccumulator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased onto split out CLs. Created 6 years, 9 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/MarkupAccumulator.h
diff --git a/Source/core/editing/MarkupAccumulator.h b/Source/core/editing/MarkupAccumulator.h
index 33803369e9397b67729491b7a2d3a0f73e6cba0b..595bf49775a3c1218696de146e07d8a6756fb54c 100644
--- a/Source/core/editing/MarkupAccumulator.h
+++ b/Source/core/editing/MarkupAccumulator.h
@@ -57,11 +57,16 @@ enum EntityMask {
EntityMaskInHTMLAttributeValue = EntityAmp | EntityQuot | EntityNbsp,
};
+enum SerializationType {
+ AsOwnerDocument,
+ ForcedXML
+};
+
class MarkupAccumulator {
WTF_MAKE_NONCOPYABLE(MarkupAccumulator);
public:
- MarkupAccumulator(Vector<Node*>*, EAbsoluteURLs, const Range* = 0);
+ MarkupAccumulator(Vector<Node*>*, EAbsoluteURLs, const Range* = 0, SerializationType = AsOwnerDocument);
virtual ~MarkupAccumulator();
String serializeNodes(Node& targetNode, EChildrenOnly, Vector<QualifiedName>* tagNamesToSkip = 0);
@@ -104,9 +109,11 @@ private:
String resolveURLIfNeeded(const Element&, const String&) const;
void appendQuotedURLAttributeValue(StringBuilder&, const Element&, const Attribute&);
void serializeNodesWithNamespaces(Node& targetNode, EChildrenOnly, const Namespaces*, Vector<QualifiedName>* tagNamesToSkip);
+ bool serializeAsHTMLDocument(const Node&) const;
StringBuilder m_markup;
const EAbsoluteURLs m_resolveURLsMethod;
+ SerializationType m_serializationType;
};
}
« no previous file with comments | « LayoutTests/svg/custom/xlink-prefix-in-attributes-expected.txt ('k') | Source/core/editing/MarkupAccumulator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698