diff options
Diffstat (limited to 'Source/WebCore/svg/SVGElement.cpp')
-rw-r--r-- | Source/WebCore/svg/SVGElement.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/WebCore/svg/SVGElement.cpp b/Source/WebCore/svg/SVGElement.cpp index 4630ccb..044f439 100644 --- a/Source/WebCore/svg/SVGElement.cpp +++ b/Source/WebCore/svg/SVGElement.cpp @@ -316,12 +316,9 @@ void SVGElement::sendSVGLoadEventIfPossible(bool sendParentLoadEvents) RefPtr<Node> parent; if (sendParentLoadEvents) parent = currentTarget->parentNode(); // save the next parent to dispatch too incase dispatching the event changes the tree - if (hasLoadListener(currentTarget.get())) { - RefPtr<Event> event = Event::create(eventNames().loadEvent, false, false); - event->setTarget(currentTarget); - currentTarget->dispatchGenericEvent(event.release()); - } - currentTarget = (parent && parent->isSVGElement()) ? static_pointer_cast<SVGElement>(parent) : 0; + if (hasLoadListener(currentTarget.get())) + currentTarget->dispatchEvent(Event::create(eventNames().loadEvent, false, false)); + currentTarget = (parent && parent->isSVGElement()) ? static_pointer_cast<SVGElement>(parent) : RefPtr<SVGElement>(); } } |