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

Unified Diff: Source/core/xml/XPathParser.cpp

Issue 108543003: Consistently use AtomicString for namespaceURI / prefix (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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/xml/XPathParser.cpp
diff --git a/Source/core/xml/XPathParser.cpp b/Source/core/xml/XPathParser.cpp
index 22578d452ec4f3077b37ea77ce07ad571fe2be03..3c6579f14273711343d9b1845d206285890a6993 100644
--- a/Source/core/xml/XPathParser.cpp
+++ b/Source/core/xml/XPathParser.cpp
@@ -447,7 +447,7 @@ int Parser::lex(void* data)
return tok.type;
}
-bool Parser::expandQName(const String& qName, String& localName, String& namespaceURI)
+bool Parser::expandQName(const String& qName, AtomicString& localName, AtomicString& namespaceURI)
{
size_t colon = qName.find(':');
if (colon != kNotFound) {
@@ -456,9 +456,10 @@ bool Parser::expandQName(const String& qName, String& localName, String& namespa
namespaceURI = m_resolver->lookupNamespaceURI(qName.left(colon));
if (namespaceURI.isNull())
return false;
- localName = qName.substring(colon + 1);
- } else
- localName = qName;
+ localName = AtomicString(qName.substring(colon + 1));
+ } else {
+ localName = AtomicString(qName);
+ }
return true;
}

Powered by Google App Engine
This is Rietveld 408576698