| Index: Source/core/events/Event.cpp
|
| diff --git a/Source/core/events/Event.cpp b/Source/core/events/Event.cpp
|
| index e0a95408c02806e4cb6b5fb50cf09442f6f68f51..aa1ea8381d8cef1748e936c3656055763cf679ea 100644
|
| --- a/Source/core/events/Event.cpp
|
| +++ b/Source/core/events/Event.cpp
|
| @@ -26,6 +26,7 @@
|
| #include "core/dom/StaticNodeList.h"
|
| #include "core/events/EventTarget.h"
|
| #include "core/frame/UseCounter.h"
|
| +#include "core/svg/SVGElement.h"
|
| #include "wtf/CurrentTime.h"
|
|
|
| namespace WebCore {
|
| @@ -233,6 +234,18 @@ PassRefPtrWillBeRawPtr<NodeList> Event::path() const
|
| return StaticNodeList::createEmpty();
|
| }
|
|
|
| +EventTarget* Event::currentTarget() const
|
| +{
|
| + if (!m_currentTarget)
|
| + return 0;
|
| + Node* node = m_currentTarget->toNode();
|
| + if (node && node->isSVGElement()) {
|
| + if (SVGElement* svgElement = toSVGElement(node)->correspondingElement())
|
| + return svgElement;
|
| + }
|
| + return m_currentTarget;
|
| +}
|
| +
|
| void Event::trace(Visitor* visitor)
|
| {
|
| visitor->trace(m_target);
|
|
|