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

Unified Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.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/frame/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index e7f6e39f79a1896598b0361f5c9b25a80d2386fc..276fc33b8088a50ae2fa58087e70353aae212047 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -1289,7 +1289,7 @@ CustomElementsRegistry* LocalDOMWindow::customElements() const
return m_customElements.get();
}
-bool LocalDOMWindow::addEventListenerInternal(const AtomicString& eventType, EventListener* listener, const EventListenerOptions& options)
+bool LocalDOMWindow::addEventListenerInternal(const AtomicString& eventType, EventListener* listener, const AddEventListenerOptions& options)
{
if (!EventTarget::addEventListenerInternal(eventType, listener, options))
return false;
@@ -1322,13 +1322,11 @@ bool LocalDOMWindow::addEventListenerInternal(const AtomicString& eventType, Eve
return true;
}
-bool LocalDOMWindow::removeEventListenerInternal(const AtomicString& eventType, EventListener* listener, const EventListenerOptions& options)
+void LocalDOMWindow::removedEventListener(const AtomicString& eventType, const RegisteredEventListener& registeredListener)
{
- if (!EventTarget::removeEventListenerInternal(eventType, listener, options))
- return false;
if (frame() && frame()->host())
- frame()->host()->eventHandlerRegistry().didRemoveEventHandler(*this, eventType, options);
+ frame()->host()->eventHandlerRegistry().didRemoveEventHandler(*this, eventType, registeredListener.options());
notifyRemoveEventListener(this, eventType);
@@ -1337,8 +1335,6 @@ bool LocalDOMWindow::removeEventListenerInternal(const AtomicString& eventType,
} else if (eventType == EventTypeNames::beforeunload && allowsBeforeUnloadListeners(this)) {
removeBeforeUnloadEventListener(this);
}
-
- return true;
}
void LocalDOMWindow::dispatchLoadEvent()

Powered by Google App Engine
This is Rietveld 408576698