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

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

Issue 148673002: Use more const references in MarkupAccumulator and its subclasses (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Bring back the ASSERT Created 6 years, 11 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
« no previous file with comments | « Source/core/editing/HTMLInterchange.cpp ('k') | Source/core/editing/MarkupAccumulator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/MarkupAccumulator.h
diff --git a/Source/core/editing/MarkupAccumulator.h b/Source/core/editing/MarkupAccumulator.h
index 21788fd7fa364080e73e3a50a27b865377ac022d..f14d6ed725e3042305a4b9f4e3b2459638a1dcac 100644
--- a/Source/core/editing/MarkupAccumulator.h
+++ b/Source/core/editing/MarkupAccumulator.h
@@ -64,7 +64,7 @@ public:
MarkupAccumulator(Vector<Node*>*, EAbsoluteURLs, const Range* = 0);
virtual ~MarkupAccumulator();
- String serializeNodes(Node* targetNode, EChildrenOnly, Vector<QualifiedName>* tagNamesToSkip = 0);
+ String serializeNodes(Node& targetNode, EChildrenOnly, Vector<QualifiedName>* tagNamesToSkip = 0);
static void appendComment(StringBuilder&, const String&);
@@ -72,38 +72,38 @@ public:
protected:
void appendString(const String&);
- void appendStartTag(Node*, Namespaces* = 0);
- virtual void appendEndTag(Node*);
+ void appendStartTag(Node&, Namespaces* = 0);
+ virtual void appendEndTag(const Node&);
static size_t totalLength(const Vector<String>&);
size_t length() const { return m_markup.length(); }
void concatenateMarkup(StringBuilder&);
void appendAttributeValue(StringBuilder&, const String&, bool);
- virtual void appendCustomAttributes(StringBuilder&, Element*, Namespaces*);
- bool shouldAddNamespaceElement(const Element*);
+ virtual void appendCustomAttributes(StringBuilder&, const Element&, Namespaces*);
+ bool shouldAddNamespaceElement(const Element&);
bool shouldAddNamespaceAttribute(const Attribute&, Namespaces&);
void appendNamespace(StringBuilder&, const AtomicString& prefix, const AtomicString& namespaceURI, Namespaces&);
- EntityMask entityMaskForText(Text*) const;
- virtual void appendText(StringBuilder&, Text*);
- void appendXMLDeclaration(StringBuilder&, const Document*);
- void appendDocumentType(StringBuilder&, const DocumentType*);
+ EntityMask entityMaskForText(const Text&) const;
+ virtual void appendText(StringBuilder&, Text&);
+ void appendXMLDeclaration(StringBuilder&, const Document&);
+ void appendDocumentType(StringBuilder&, const DocumentType&);
void appendProcessingInstruction(StringBuilder&, const String& target, const String& data);
- virtual void appendElement(StringBuilder&, Element*, Namespaces*);
- void appendOpenTag(StringBuilder&, Element*, Namespaces*);
- void appendCloseTag(StringBuilder&, Element*);
- void appendAttribute(StringBuilder&, Element*, const Attribute&, Namespaces*);
+ virtual void appendElement(StringBuilder&, Element&, Namespaces*);
+ void appendOpenTag(StringBuilder&, const Element&, Namespaces*);
+ void appendCloseTag(StringBuilder&, const Element&);
+ void appendAttribute(StringBuilder&, const Element&, const Attribute&, Namespaces*);
void appendCDATASection(StringBuilder&, const String&);
- void appendStartMarkup(StringBuilder&, const Node*, Namespaces*);
- bool shouldSelfClose(const Node*);
- bool elementCannotHaveEndTag(const Node*);
- void appendEndMarkup(StringBuilder&, const Node*);
+ void appendStartMarkup(StringBuilder&, Node&, Namespaces*);
+ bool shouldSelfClose(const Node&);
+ bool elementCannotHaveEndTag(const Node&);
+ void appendEndMarkup(StringBuilder&, const Node&);
Vector<Node*>* const m_nodes;
const Range* const m_range;
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);
+ String resolveURLIfNeeded(const Element&, const String&) const;
+ void appendQuotedURLAttributeValue(StringBuilder&, const Element&, const Attribute&);
+ void serializeNodesWithNamespaces(Node& targetNode, EChildrenOnly, const Namespaces*, Vector<QualifiedName>* tagNamesToSkip);
StringBuilder m_markup;
const EAbsoluteURLs m_resolveURLsMethod;
« no previous file with comments | « Source/core/editing/HTMLInterchange.cpp ('k') | Source/core/editing/MarkupAccumulator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698