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

Unified Diff: Source/core/svg/SVGElement.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/svg/SVGElement.h ('k') | Source/core/svg/SVGSVGElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGElement.cpp
diff --git a/Source/core/svg/SVGElement.cpp b/Source/core/svg/SVGElement.cpp
index a567999d9cafb910faacd4b635e881214b46b36a..a2c5200b10824f0c7a86130c795d1b8da726059f 100644
--- a/Source/core/svg/SVGElement.cpp
+++ b/Source/core/svg/SVGElement.cpp
@@ -675,7 +675,7 @@ void SVGElement::parseAttribute(const QualifiedName& name, const AtomicString& v
// standard events
const AtomicString& eventName = HTMLElement::eventNameForAttributeName(name);
if (!eventName.isNull())
- setAttributeEventListener(eventName, createAttributeEventListener(this, name, value));
+ setAttributeEventListener(eventName, createAttributeEventListener(this, name, value, eventParameterName()));
else
Element::parseAttribute(name, value);
}
@@ -1176,4 +1176,10 @@ void SVGElement::trace(Visitor* visitor)
Element::trace(visitor);
}
+const AtomicString& SVGElement::eventParameterName()
+{
+ DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::ConstructFromLiteral));
+ return evtString;
+}
+
}
« no previous file with comments | « Source/core/svg/SVGElement.h ('k') | Source/core/svg/SVGSVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698