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

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

Issue 750353008: Remove the tagNamesToSkip argument on MarkupAccumulator::serializeNodes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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/MarkupAccumulator.h ('k') | Source/core/editing/markup.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/MarkupAccumulator.cpp
diff --git a/Source/core/editing/MarkupAccumulator.cpp b/Source/core/editing/MarkupAccumulator.cpp
index 3dc18a67513850b1b8e2c2fb2a96ce34716d4996..018521e5947e24c00360b14aa4a20d7b78a07042 100644
--- a/Source/core/editing/MarkupAccumulator.cpp
+++ b/Source/core/editing/MarkupAccumulator.cpp
@@ -109,7 +109,7 @@ MarkupAccumulator::~MarkupAccumulator()
{
}
-String MarkupAccumulator::serializeNodes(Node& targetNode, EChildrenOnly childrenOnly, Vector<QualifiedName>* tagNamesToSkip)
+String MarkupAccumulator::serializeNodes(Node& targetNode, EChildrenOnly childrenOnly)
{
Namespaces* namespaces = nullptr;
Namespaces namespaceHash;
@@ -119,19 +119,12 @@ String MarkupAccumulator::serializeNodes(Node& targetNode, EChildrenOnly childre
namespaces = &namespaceHash;
}
- serializeNodesWithNamespaces(targetNode, childrenOnly, namespaces, tagNamesToSkip);
+ serializeNodesWithNamespaces(targetNode, childrenOnly, namespaces);
return m_markup.toString();
}
-void MarkupAccumulator::serializeNodesWithNamespaces(Node& targetNode, EChildrenOnly childrenOnly, const Namespaces* namespaces, Vector<QualifiedName>* tagNamesToSkip)
+void MarkupAccumulator::serializeNodesWithNamespaces(Node& targetNode, EChildrenOnly childrenOnly, const Namespaces* namespaces)
{
- if (tagNamesToSkip && targetNode.isElementNode()) {
- for (const auto& tag : *tagNamesToSkip) {
- if (toElement(targetNode).hasTagName(tag))
- return;
- }
- }
-
Namespaces namespaceHash;
if (namespaces)
namespaceHash = *namespaces;
@@ -142,7 +135,7 @@ void MarkupAccumulator::serializeNodesWithNamespaces(Node& targetNode, EChildren
if (!(serializeAsHTMLDocument(targetNode) && elementCannotHaveEndTag(targetNode))) {
Node* current = isHTMLTemplateElement(targetNode) ? toHTMLTemplateElement(targetNode).content()->firstChild() : targetNode.firstChild();
for ( ; current; current = current->nextSibling())
- serializeNodesWithNamespaces(*current, IncludeNode, &namespaceHash, tagNamesToSkip);
+ serializeNodesWithNamespaces(*current, IncludeNode, &namespaceHash);
}
if (!childrenOnly && targetNode.isElementNode())
« no previous file with comments | « Source/core/editing/MarkupAccumulator.h ('k') | Source/core/editing/markup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698