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

Unified Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 1942723004: Change EventTarget callback APIs for add/RemoveEventListenerInternal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win32 signed/unsigned issue Created 4 years, 7 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 | « third_party/WebKit/Source/core/dom/Node.h ('k') | third_party/WebKit/Source/core/events/EventListenerMap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index 745f6e9373c0754ca1763df206cfa933c39e8593..12a9088b9788441bf3166a28510a8601bf52ee61 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -1872,29 +1872,21 @@ void Node::didMoveToNewDocument(Document& oldDocument)
}
}
-bool Node::addEventListenerInternal(const AtomicString& eventType, EventListener* listener, const EventListenerOptions& options)
+void Node::addedEventListener(const AtomicString& eventType, RegisteredEventListener& registeredListener)
{
- if (!EventTarget::addEventListenerInternal(eventType, listener, options))
- return false;
-
+ EventTarget::addedEventListener(eventType, registeredListener);
document().addListenerTypeIfNeeded(eventType);
if (FrameHost* frameHost = document().frameHost())
- frameHost->eventHandlerRegistry().didAddEventHandler(*this, eventType, options);
-
- return true;
+ frameHost->eventHandlerRegistry().didAddEventHandler(*this, eventType, registeredListener.options());
}
-bool Node::removeEventListenerInternal(const AtomicString& eventType, EventListener* listener, const EventListenerOptions& options)
+void Node::removedEventListener(const AtomicString& eventType, const RegisteredEventListener& registeredListener)
{
- if (!EventTarget::removeEventListenerInternal(eventType, listener, options))
- return false;
-
+ EventTarget::removedEventListener(eventType, registeredListener);
// FIXME: Notify Document that the listener has vanished. We need to keep track of a number of
// listeners for each type, not just a bool - see https://bugs.webkit.org/show_bug.cgi?id=33861
if (FrameHost* frameHost = document().frameHost())
- frameHost->eventHandlerRegistry().didRemoveEventHandler(*this, eventType, options);
-
- return true;
+ frameHost->eventHandlerRegistry().didRemoveEventHandler(*this, eventType, registeredListener.options());
}
void Node::removeAllEventListeners()
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | third_party/WebKit/Source/core/events/EventListenerMap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698