Chromium Code Reviews| Index: Source/core/svg/SVGElement.cpp |
| diff --git a/Source/core/svg/SVGElement.cpp b/Source/core/svg/SVGElement.cpp |
| index 6e840b75e4a5f90e0f44eee00700bcb6d222bf13..b46a0551e8811c7e03b0c96e5edd0b6705d20960 100644 |
| --- a/Source/core/svg/SVGElement.cpp |
| +++ b/Source/core/svg/SVGElement.cpp |
| @@ -847,22 +847,8 @@ 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); |
| + bool removeSuccess = shadowTreeElement->Node::removeEventListener(eventType, listener, useCapture); |
| + ASSERT_UNUSED(removeSuccess, removeSuccess); |
|
kouhei (in TOK)
2014/05/23 09:35:30
The failing tests manually remove certain eventhan
|
| } |
| return true; |