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

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

Issue 147593008: Remove Element.nodeNamePreservingCase (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add static helper 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/dom/Element.cpp ('k') | no next file » | 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 5949967302c9cc5125345238e865461aa62d8f4d..044e9ee3854ddeff91ec6e669ac94f926968841f 100644
--- a/Source/core/editing/MarkupAccumulator.cpp
+++ b/Source/core/editing/MarkupAccumulator.cpp
@@ -390,10 +390,15 @@ void MarkupAccumulator::appendElement(StringBuilder& result, Element& element, N
appendCloseTag(result, element);
}
+static String nodeNamePreservingCase(const Element& element)
+{
+ return element.tagQName().toString();
+}
+
void MarkupAccumulator::appendOpenTag(StringBuilder& result, const Element& element, Namespaces* namespaces)
{
result.append('<');
- result.append(element.nodeNamePreservingCase());
+ result.append(nodeNamePreservingCase(element));
if (!element.document().isHTMLDocument() && namespaces && shouldAddNamespaceElement(element))
appendNamespace(result, element.prefix(), element.namespaceURI(), *namespaces);
}
@@ -526,7 +531,7 @@ void MarkupAccumulator::appendEndMarkup(StringBuilder& result, const Node& node)
return;
result.appendLiteral("</");
- result.append(toElement(node).nodeNamePreservingCase());
+ result.append(nodeNamePreservingCase(toElement(node)));
result.append('>');
}
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698