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

Unified Diff: Source/core/html/HTMLElement.cpp

Issue 102103002: Have HashMap<KeyType, AtomicString>::get() return a const reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use AtomicString::ConstructFromLiteral 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
« no previous file with comments | « Source/core/html/HTMLElement.h ('k') | Source/core/html/forms/FormController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLElement.cpp
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
index 180a074eab2a9f5771fe0b475e8aba8b9b8728a1..1bc9d2563d5711caaf0988eb2f3477c15feedf01 100644
--- a/Source/core/html/HTMLElement.cpp
+++ b/Source/core/html/HTMLElement.cpp
@@ -205,10 +205,10 @@ void HTMLElement::collectStyleForPresentationAttribute(const QualifiedName& name
Element::collectStyleForPresentationAttribute(name, value, style);
}
-AtomicString HTMLElement::eventNameForAttributeName(const QualifiedName& attrName) const
+const AtomicString& HTMLElement::eventNameForAttributeName(const QualifiedName& attrName) const
{
if (!attrName.namespaceURI().isNull())
- return AtomicString();
+ return nullAtom;
typedef HashMap<AtomicString, AtomicString> StringToStringMap;
DEFINE_STATIC_LOCAL(StringToStringMap, attributeNameToEventNameMap, ());
@@ -320,7 +320,7 @@ void HTMLElement::parseAttribute(const QualifiedName& name, const AtomicString&
setTabIndexExplicitly(max(static_cast<int>(std::numeric_limits<short>::min()), min(tabindex, static_cast<int>(std::numeric_limits<short>::max()))));
}
} else {
- AtomicString eventName = eventNameForAttributeName(name);
+ const AtomicString& eventName = eventNameForAttributeName(name);
if (!eventName.isNull())
setAttributeEventListener(eventName, createAttributeEventListener(this, name, value));
}
« no previous file with comments | « Source/core/html/HTMLElement.h ('k') | Source/core/html/forms/FormController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698