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

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

Issue 321023002: Avoid branching in createAttributeEventListener (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove leftover line Created 6 years, 6 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
Index: Source/core/html/HTMLElement.cpp
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
index f11dc4744effdecc44fdbb18561dcb88920e488c..a312109ac41fe6d142551c916c1c0e792fbedc0e 100644
--- a/Source/core/html/HTMLElement.cpp
+++ b/Source/core/html/HTMLElement.cpp
@@ -314,7 +314,7 @@ void HTMLElement::parseAttribute(const QualifiedName& name, const AtomicString&
} else {
const AtomicString& eventName = eventNameForAttributeName(name);
if (!eventName.isNull())
- setAttributeEventListener(eventName, createAttributeEventListener(this, name, value));
+ setAttributeEventListener(eventName, createAttributeEventListener(this, name, value, eventParameterName()));
}
}
@@ -950,6 +950,12 @@ void HTMLElement::handleKeypressEvent(KeyboardEvent* event)
}
}
+const AtomicString& HTMLElement::eventParameterName()
+{
+ DEFINE_STATIC_LOCAL(const AtomicString, eventString, ("event"));
haraken 2014/06/10 15:05:32 Use DEFINE_STATIC_LOCAL(const AtomicString, eventS
+ return eventString;
+}
+
} // namespace WebCore
#ifndef NDEBUG

Powered by Google App Engine
This is Rietveld 408576698