Commit 7889eacc authored by kouhei@chromium.org's avatar kouhei@chromium.org

SVG: Remove JSC specific workaround in SVGElement::removeEventListener

The workaround seems specific to JSC, and thus not needed in Blink.

BUG=None

Review URL: https://codereview.chromium.org/293983020

git-svn-id: svn://svn.chromium.org/blink/trunk@175778 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 0e91897c
......@@ -843,22 +843,7 @@ bool SVGElement::removeEventListener(const AtomicString& eventType, EventListene
SVGElement* shadowTreeElement = *it;
ASSERT(shadowTreeElement);
if (shadowTreeElement->Node::removeEventListener(eventType, listener, useCapture))
continue;
// This case can only be hit for event listeners created from markup
ASSERT(listener->wasCreatedFromMarkup());
// If the event listener 'listener' has been created from markup and has been fired before
// then JSLazyEventListener::parseCode() has been called and m_jsFunction of that listener
// has been created (read: it's not 0 anymore). During shadow tree creation, the event
// listener DOM attribute has been cloned, and another event listener has been setup in
// the shadow tree. If that event listener has not been used yet, m_jsFunction is still 0,
// and tryRemoveEventListener() above will fail. Work around that very seldom problem.
EventTargetData* data = shadowTreeElement->eventTargetData();
ASSERT(data);
data->eventListenerMap.removeFirstEventListenerCreatedFromMarkup(eventType);
shadowTreeElement->Node::removeEventListener(eventType, listener, useCapture);
}
return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment