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

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: Patch for landing 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
« no previous file with comments | « Source/core/html/HTMLElement.h ('k') | Source/core/html/HTMLFormElement.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 f11dc4744effdecc44fdbb18561dcb88920e488c..0ffa161f504f4a8c16e66286b3fabc45ea1ae6d2 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", AtomicString::ConstructFromLiteral));
+ return eventString;
+}
+
} // namespace WebCore
#ifndef NDEBUG
« no previous file with comments | « Source/core/html/HTMLElement.h ('k') | Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698