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

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

Issue 1922093003: Add AddEventListenerOptions addEventListenerOptions interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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 d931b496bd20ef11cbcad99442b624d6c6ef83d8..cf330b8967d225e7343bbce660b853932986b189 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -1782,7 +1782,7 @@ void Node::didMoveToNewDocument(Document& oldDocument)
}
}
-bool Node::addEventListenerInternal(const AtomicString& eventType, EventListener* listener, const EventListenerOptions& options)
+bool Node::addEventListenerInternal(const AtomicString& eventType, EventListener* listener, const AddEventListenerOptions& options)
{
if (!EventTarget::addEventListenerInternal(eventType, listener, options))
return false;
@@ -1794,17 +1794,12 @@ bool Node::addEventListenerInternal(const AtomicString& eventType, EventListener
return true;
}
-bool Node::removeEventListenerInternal(const AtomicString& eventType, EventListener* listener, const EventListenerOptions& options)
+void Node::removedEventListener(const AtomicString& eventType, const RegisteredEventListener& registeredListener)
bokan 2016/04/26 19:54:59 Could you do this for all the other removeEventLis
{
- if (!EventTarget::removeEventListenerInternal(eventType, listener, options))
- return false;
-
// 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()

Powered by Google App Engine
This is Rietveld 408576698