Title: [271806] trunk
Revision
271806
Author
cdu...@apple.com
Date
2021-01-25 12:06:25 -0800 (Mon, 25 Jan 2021)

Log Message

Support AbortSignal in addEventListenerOptions to unsubscribe from events
https://bugs.webkit.org/show_bug.cgi?id=218753
<rdar://problem/71258012>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:
Import test coverage from WPT.

* web-platform-tests/dom/events/AddEventListenerOptions-signal.any-expected.txt: Added.
* web-platform-tests/dom/events/AddEventListenerOptions-signal.any.html: Added.
* web-platform-tests/dom/events/AddEventListenerOptions-signal.any.js: Added.
* web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker-expected.txt: Added.
* web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker.html: Added.
* web-platform-tests/dom/events/w3c-import.log:

Source/WebCore:
Support AbortSignal in addEventListenerOptions to unsubscribe from events:
- https://github.com/whatwg/dom/issues/911
- https://github.com/whatwg/dom/pull/919

Blink already added support for this.

Tests: imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.html
       imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker.html

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Headers.cmake:
* Modules/async-clipboard/Clipboard.h:
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/indexeddb/IDBRequest.h:
* Modules/mediastream/MediaDevices.h:
* Modules/mediastream/RTCPeerConnection.h:
* Modules/paymentrequest/PaymentRequest.h:
* Modules/speech/SpeechRecognition.h:
* Modules/webaudio/BaseAudioContext.h:
* Modules/webgpu/WebGPUDevice.h:
* Modules/webxr/WebXRSystem.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* animation/WebAnimation.h:
* css/MediaQueryList.cpp:
(WebCore::MediaQueryList::addListener):
(WebCore::MediaQueryList::removeListener):
* css/MediaQueryList.h:
* dom/AbortSignal.h:
* dom/AddEventListenerOptions.h: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h.
(WebCore::AddEventListenerOptions::AddEventListenerOptions):
* dom/AddEventListenerOptions.idl: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h.
* dom/EventListener.h:
* dom/EventListenerMap.cpp:
* dom/EventListenerOptions.h: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h.
(WebCore::EventListenerOptions::EventListenerOptions):
* dom/EventListenerOptions.idl: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h.
* dom/EventTarget.cpp:
(WebCore::EventTarget::addEventListener):
(WebCore::EventTarget::removeEventListenerForBindings):
(WebCore::EventTarget::removeEventListener):
(WebCore::EventTarget::setAttributeEventListener):
(WebCore::EventTarget::innerInvokeEventListeners):
* dom/EventTarget.h:
(WebCore::EventTarget::removeEventListener):
* dom/EventTarget.idl:
* dom/MessagePort.cpp:
(WebCore::MessagePort::MessagePort):
(WebCore::MessagePort::removeEventListener):
* dom/MessagePort.h:
* dom/Node.cpp:
(WebCore::tryAddEventListener):
(WebCore::tryRemoveEventListener):
(WebCore::Node::removeEventListener):
* dom/Node.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::removeEventListener):
* html/HTMLMediaElement.h:
* html/ImageDocument.cpp:
* html/track/TextTrackCue.h:
* inspector/agents/InspectorDOMAgent.cpp:
* loader/appcache/DOMApplicationCache.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::removeEventListener):
* page/DOMWindow.h:
* platform/cocoa/PlaybackSessionModelMediaElement.mm:
* platform/cocoa/VideoFullscreenModelVideoElement.mm:
* svg/SVGElement.cpp:
(WebCore::SVGElement::removeEventListener):
* svg/SVGElement.h:
* svg/SVGTRefElement.cpp:
* svg/animation/SVGSMILElement.cpp:
* testing/Internals.cpp:
* workers/service/ServiceWorkerContainer.h:

Source/WebKit:
Minor build fixes.

* WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:

Source/WebKitLegacy/mac:
Minor build fixes.

* DOM/DOMNode.mm:

Source/WTF:
Add initializeWeakPtrFactory() protection function to CanMakeWeakPtr so that a subclass
can eagerly initialize the WeakPtrFactory even if it does not subclass
WeakPtrFactory<T, WeakPtrFactoryInitialization::Eager>. MessagePort used to subclass
WeakPtrFactory<T, WeakPtrFactoryInitialization::Eager> for thread-safety reason but it
now subclasses WeakPtrFactory<T, WeakPtrFactoryInitialization::Lazy> via EventTarget.

* wtf/WeakPtr.h:
(WTF::CanMakeWeakPtr::initializeWeakPtrFactory):

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (271805 => 271806)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-01-25 20:06:25 UTC (rev 271806)
@@ -1,3 +1,20 @@
+2021-01-25  Chris Dumez  <cdu...@apple.com>
+
+        Support AbortSignal in addEventListenerOptions to unsubscribe from events
+        https://bugs.webkit.org/show_bug.cgi?id=218753
+        <rdar://problem/71258012>
+
+        Reviewed by Darin Adler.
+
+        Import test coverage from WPT.
+
+        * web-platform-tests/dom/events/AddEventListenerOptions-signal.any-expected.txt: Added.
+        * web-platform-tests/dom/events/AddEventListenerOptions-signal.any.html: Added.
+        * web-platform-tests/dom/events/AddEventListenerOptions-signal.any.js: Added.
+        * web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker-expected.txt: Added.
+        * web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker.html: Added.
+        * web-platform-tests/dom/events/w3c-import.log:
+
 2021-01-25  Sam Weinig  <wei...@apple.com>
 
         Import css/css-color tests from WPT

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any-expected.txt (0 => 271806)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any-expected.txt	2021-01-25 20:06:25 UTC (rev 271806)
@@ -0,0 +1,11 @@
+
+PASS Passing an AbortSignal to addEventListener options should allow removing a listener
+PASS Passing an AbortSignal to addEventListener does not prevent removeEventListener
+PASS Passing an AbortSignal to addEventListener works with the once flag
+PASS Removing a once listener works with a passed signal
+PASS Passing an AbortSignal to multiple listeners
+PASS Passing an AbortSignal to addEventListener works with the capture flag
+PASS Aborting from a listener does not call future listeners
+PASS Adding then aborting a listener in another listener does not call it
+PASS Aborting from a nested listener should remove it
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.html (0 => 271806)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.html	2021-01-25 20:06:25 UTC (rev 271806)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.js (0 => 271806)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.js	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.js	2021-01-25 20:06:25 UTC (rev 271806)
@@ -0,0 +1,133 @@
+'use strict';
+
+test(function() {
+  let count = 0;
+  function handler() {
+    count++;
+  }
+  const et = new EventTarget();
+  const controller = new AbortController();
+  et.addEventListener('test', handler, { signal: controller.signal });
+  et.dispatchEvent(new Event('test'));
+  assert_equals(count, 1, "Adding a signal still adds a listener");
+  et.dispatchEvent(new Event('test'));
+  assert_equals(count, 2, "The listener was not added with the once flag");
+  controller.abort();
+  et.dispatchEvent(new Event('test'));
+  assert_equals(count, 2, "Aborting on the controller removes the listener");
+  et.addEventListener('test', handler, { signal: controller.signal });
+  et.dispatchEvent(new Event('test'));
+  assert_equals(count, 2, "Passing an aborted signal never adds the handler");
+}, "Passing an AbortSignal to addEventListener options should allow removing a listener");
+
+test(function() {
+  let count = 0;
+  function handler() {
+    count++;
+  }
+  const et = new EventTarget();
+  const controller = new AbortController();
+  et.addEventListener('test', handler, { signal: controller.signal });
+  et.removeEventListener('test', handler);
+  et.dispatchEvent(new Event('test'));
+  assert_equals(count, 0, "The listener was still removed");
+}, "Passing an AbortSignal to addEventListener does not prevent removeEventListener");
+
+test(function() {
+  let count = 0;
+  function handler() {
+    count++;
+  }
+  const et = new EventTarget();
+  const controller = new AbortController();
+  et.addEventListener('test', handler, { signal: controller.signal, once: true });
+  controller.abort();
+  et.dispatchEvent(new Event('test'));
+  assert_equals(count, 0, "The listener was still removed");
+}, "Passing an AbortSignal to addEventListener works with the once flag");
+
+test(function() {
+  let count = 0;
+  function handler() {
+    count++;
+  }
+  const et = new EventTarget();
+  const controller = new AbortController();
+  et.addEventListener('test', handler, { signal: controller.signal, once: true });
+  et.removeEventListener('test', handler);
+  et.dispatchEvent(new Event('test'));
+  assert_equals(count, 0, "The listener was still removed");
+}, "Removing a once listener works with a passed signal");
+
+test(function() {
+  let count = 0;
+  function handler() {
+    count++;
+  }
+  const et = new EventTarget();
+  const controller = new AbortController();
+  et.addEventListener('first', handler, { signal: controller.signal, once: true });
+  et.addEventListener('second', handler, { signal: controller.signal, once: true });
+  controller.abort();
+  et.dispatchEvent(new Event('first'));
+  et.dispatchEvent(new Event('second'));
+  assert_equals(count, 0, "The listener was still removed");
+}, "Passing an AbortSignal to multiple listeners");
+
+test(function() {
+  let count = 0;
+  function handler() {
+    count++;
+  }
+  const et = new EventTarget();
+  const controller = new AbortController();
+  et.addEventListener('test', handler, { signal: controller.signal, capture: true });
+  controller.abort();
+  et.dispatchEvent(new Event('test'));
+  assert_equals(count, 0, "The listener was still removed");
+}, "Passing an AbortSignal to addEventListener works with the capture flag");
+
+test(function() {
+  let count = 0;
+  function handler() {
+    count++;
+  }
+  const et = new EventTarget();
+  const controller = new AbortController();
+  et.addEventListener('test', () => {
+    controller.abort();
+  }, { signal: controller.signal });
+  et.addEventListener('test', handler, { signal: controller.signal });
+  et.dispatchEvent(new Event('test'));
+  assert_equals(count, 0, "The listener was still removed");
+}, "Aborting from a listener does not call future listeners");
+
+test(function() {
+  let count = 0;
+  function handler() {
+    count++;
+  }
+  const et = new EventTarget();
+  const controller = new AbortController();
+  et.addEventListener('test', () => {
+    et.addEventListener('test', handler, { signal: controller.signal });
+    controller.abort();
+  }, { signal: controller.signal });
+  et.dispatchEvent(new Event('test'));
+  assert_equals(count, 0, "The listener was still removed");
+}, "Adding then aborting a listener in another listener does not call it");
+
+test(function() {
+  const et = new EventTarget();
+  const ac = new AbortController();
+  let count = 0;
+  et.addEventListener('foo', () => {
+    et.addEventListener('foo', () => {
+      count++;
+      if (count > 5) ac.abort();
+      et.dispatchEvent(new Event('foo'));
+    }, { signal: ac.signal });
+    et.dispatchEvent(new Event('foo'));
+  }, { once: true });
+  et.dispatchEvent(new Event('foo'));
+}, "Aborting from a nested listener should remove it");

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker-expected.txt (0 => 271806)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker-expected.txt	2021-01-25 20:06:25 UTC (rev 271806)
@@ -0,0 +1,11 @@
+
+PASS Passing an AbortSignal to addEventListener options should allow removing a listener
+PASS Passing an AbortSignal to addEventListener does not prevent removeEventListener
+PASS Passing an AbortSignal to addEventListener works with the once flag
+PASS Removing a once listener works with a passed signal
+PASS Passing an AbortSignal to multiple listeners
+PASS Passing an AbortSignal to addEventListener works with the capture flag
+PASS Aborting from a listener does not call future listeners
+PASS Adding then aborting a listener in another listener does not call it
+PASS Aborting from a nested listener should remove it
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker.html (0 => 271806)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker.html	2021-01-25 20:06:25 UTC (rev 271806)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/w3c-import.log (271805 => 271806)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/w3c-import.log	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/w3c-import.log	2021-01-25 20:06:25 UTC (rev 271806)
@@ -16,6 +16,7 @@
 List of files:
 /LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-once.html
 /LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-passive.html
+/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.js
 /LayoutTests/imported/w3c/web-platform-tests/dom/events/CustomEvent.html
 /LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-cancelBubble.html
 /LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-constants.html

Modified: trunk/Source/WTF/ChangeLog (271805 => 271806)


--- trunk/Source/WTF/ChangeLog	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WTF/ChangeLog	2021-01-25 20:06:25 UTC (rev 271806)
@@ -1,3 +1,20 @@
+2021-01-25  Chris Dumez  <cdu...@apple.com>
+
+        Support AbortSignal in addEventListenerOptions to unsubscribe from events
+        https://bugs.webkit.org/show_bug.cgi?id=218753
+        <rdar://problem/71258012>
+
+        Reviewed by Darin Adler.
+
+        Add initializeWeakPtrFactory() protection function to CanMakeWeakPtr so that a subclass
+        can eagerly initialize the WeakPtrFactory even if it does not subclass
+        WeakPtrFactory<T, WeakPtrFactoryInitialization::Eager>. MessagePort used to subclass
+        WeakPtrFactory<T, WeakPtrFactoryInitialization::Eager> for thread-safety reason but it
+        now subclasses WeakPtrFactory<T, WeakPtrFactoryInitialization::Lazy> via EventTarget.
+
+        * wtf/WeakPtr.h:
+        (WTF::CanMakeWeakPtr::initializeWeakPtrFactory):
+
 2021-01-25  Per Arne Vollan  <pvol...@apple.com>
 
         [macOS] Fix OS version check for ENABLE_SET_WEBCONTENT_PROCESS_INFORMATION_IN_NETWORK_PROCESS

Modified: trunk/Source/WTF/wtf/WeakPtr.h (271805 => 271806)


--- trunk/Source/WTF/wtf/WeakPtr.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WTF/wtf/WeakPtr.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -200,9 +200,14 @@
     CanMakeWeakPtr()
     {
         if (initializationMode == WeakPtrFactoryInitialization::Eager)
-            m_weakPtrFactory.initializeIfNeeded(static_cast<T&>(*this));
+            initializeWeakPtrFactory();
     }
 
+    void initializeWeakPtrFactory()
+    {
+        m_weakPtrFactory.initializeIfNeeded(static_cast<T&>(*this));
+    }
+
 private:
     WeakPtrFactory<T, Counter> m_weakPtrFactory;
 };

Modified: trunk/Source/WebCore/CMakeLists.txt (271805 => 271806)


--- trunk/Source/WebCore/CMakeLists.txt	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/CMakeLists.txt	2021-01-25 20:06:25 UTC (rev 271806)
@@ -785,6 +785,7 @@
     dom/AbortController.idl
     dom/AbortSignal.idl
     dom/AbstractRange.idl
+    dom/AddEventListenerOptions.idl
     dom/AnimationEvent.idl
     dom/Attr.idl
     dom/BeforeLoadEvent.idl
@@ -843,6 +844,7 @@
     dom/ErrorEvent.idl
     dom/Event.idl
     dom/EventInit.idl
+    dom/EventListenerOptions.idl
     dom/EventModifierInit.idl
     dom/EventTarget.idl
     dom/FocusEvent.idl

Modified: trunk/Source/WebCore/ChangeLog (271805 => 271806)


--- trunk/Source/WebCore/ChangeLog	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/ChangeLog	2021-01-25 20:06:25 UTC (rev 271806)
@@ -1,3 +1,89 @@
+2021-01-25  Chris Dumez  <cdu...@apple.com>
+
+        Support AbortSignal in addEventListenerOptions to unsubscribe from events
+        https://bugs.webkit.org/show_bug.cgi?id=218753
+        <rdar://problem/71258012>
+
+        Reviewed by Darin Adler.
+
+        Support AbortSignal in addEventListenerOptions to unsubscribe from events:
+        - https://github.com/whatwg/dom/issues/911
+        - https://github.com/whatwg/dom/pull/919
+
+        Blink already added support for this.
+
+        Tests: imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.html
+               imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker.html
+
+        * CMakeLists.txt:
+        * DerivedSources-input.xcfilelist:
+        * DerivedSources-output.xcfilelist:
+        * DerivedSources.make:
+        * Headers.cmake:
+        * Modules/async-clipboard/Clipboard.h:
+        * Modules/encryptedmedia/MediaKeySession.h:
+        * Modules/indexeddb/IDBRequest.h:
+        * Modules/mediastream/MediaDevices.h:
+        * Modules/mediastream/RTCPeerConnection.h:
+        * Modules/paymentrequest/PaymentRequest.h:
+        * Modules/speech/SpeechRecognition.h:
+        * Modules/webaudio/BaseAudioContext.h:
+        * Modules/webgpu/WebGPUDevice.h:
+        * Modules/webxr/WebXRSystem.h:
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * animation/WebAnimation.h:
+        * css/MediaQueryList.cpp:
+        (WebCore::MediaQueryList::addListener):
+        (WebCore::MediaQueryList::removeListener):
+        * css/MediaQueryList.h:
+        * dom/AbortSignal.h:
+        * dom/AddEventListenerOptions.h: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h.
+        (WebCore::AddEventListenerOptions::AddEventListenerOptions):
+        * dom/AddEventListenerOptions.idl: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h.
+        * dom/EventListener.h:
+        * dom/EventListenerMap.cpp:
+        * dom/EventListenerOptions.h: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h.
+        (WebCore::EventListenerOptions::EventListenerOptions):
+        * dom/EventListenerOptions.idl: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h.
+        * dom/EventTarget.cpp:
+        (WebCore::EventTarget::addEventListener):
+        (WebCore::EventTarget::removeEventListenerForBindings):
+        (WebCore::EventTarget::removeEventListener):
+        (WebCore::EventTarget::setAttributeEventListener):
+        (WebCore::EventTarget::innerInvokeEventListeners):
+        * dom/EventTarget.h:
+        (WebCore::EventTarget::removeEventListener):
+        * dom/EventTarget.idl:
+        * dom/MessagePort.cpp:
+        (WebCore::MessagePort::MessagePort):
+        (WebCore::MessagePort::removeEventListener):
+        * dom/MessagePort.h:
+        * dom/Node.cpp:
+        (WebCore::tryAddEventListener):
+        (WebCore::tryRemoveEventListener):
+        (WebCore::Node::removeEventListener):
+        * dom/Node.h:
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::removeEventListener):
+        * html/HTMLMediaElement.h:
+        * html/ImageDocument.cpp:
+        * html/track/TextTrackCue.h:
+        * inspector/agents/InspectorDOMAgent.cpp:
+        * loader/appcache/DOMApplicationCache.h:
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::removeEventListener):
+        * page/DOMWindow.h:
+        * platform/cocoa/PlaybackSessionModelMediaElement.mm:
+        * platform/cocoa/VideoFullscreenModelVideoElement.mm:
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::removeEventListener):
+        * svg/SVGElement.h:
+        * svg/SVGTRefElement.cpp:
+        * svg/animation/SVGSMILElement.cpp:
+        * testing/Internals.cpp:
+        * workers/service/ServiceWorkerContainer.h:
+
 2021-01-25  John Wilander  <wilan...@apple.com>
 
         PCM: Use different well-known locations for triggering and reporting attribution

Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (271805 => 271806)


--- trunk/Source/WebCore/DerivedSources-input.xcfilelist	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist	2021-01-25 20:06:25 UTC (rev 271806)
@@ -700,6 +700,7 @@
 $(PROJECT_DIR)/dom/AbortController.idl
 $(PROJECT_DIR)/dom/AbortSignal.idl
 $(PROJECT_DIR)/dom/AbstractRange.idl
+$(PROJECT_DIR)/dom/AddEventListenerOptions.idl
 $(PROJECT_DIR)/dom/AnimationEvent.idl
 $(PROJECT_DIR)/dom/Attr.idl
 $(PROJECT_DIR)/dom/BeforeLoadEvent.idl
@@ -760,6 +761,7 @@
 $(PROJECT_DIR)/dom/Event.idl
 $(PROJECT_DIR)/dom/EventInit.idl
 $(PROJECT_DIR)/dom/EventListener.idl
+$(PROJECT_DIR)/dom/EventListenerOptions.idl
 $(PROJECT_DIR)/dom/EventModifierInit.idl
 $(PROJECT_DIR)/dom/EventNames.in
 $(PROJECT_DIR)/dom/EventTarget.idl

Modified: trunk/Source/WebCore/DerivedSources-output.xcfilelist (271805 => 271806)


--- trunk/Source/WebCore/DerivedSources-output.xcfilelist	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/DerivedSources-output.xcfilelist	2021-01-25 20:06:25 UTC (rev 271806)
@@ -52,6 +52,8 @@
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSAbstractWorker.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSAccessibilityRole.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSAccessibilityRole.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSAddEventListenerOptions.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSAddEventListenerOptions.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSAddressErrors.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSAddressErrors.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSAesCbcCfbParams.cpp
@@ -743,6 +745,8 @@
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEvent.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEventInit.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEventInit.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEventListenerOptions.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEventListenerOptions.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEventModifierInit.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEventModifierInit.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEventSource.cpp

Modified: trunk/Source/WebCore/DerivedSources.make (271805 => 271806)


--- trunk/Source/WebCore/DerivedSources.make	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/DerivedSources.make	2021-01-25 20:06:25 UTC (rev 271806)
@@ -659,6 +659,7 @@
     $(WebCore)/dom/AbortController.idl \
     $(WebCore)/dom/AbortSignal.idl \
     $(WebCore)/dom/AbstractRange.idl \
+    $(WebCore)/dom/AddEventListenerOptions.idl \
     $(WebCore)/dom/AnimationEvent.idl \
     $(WebCore)/dom/Attr.idl \
     $(WebCore)/dom/BeforeLoadEvent.idl \
@@ -717,6 +718,7 @@
     $(WebCore)/dom/Event.idl \
     $(WebCore)/dom/EventInit.idl \
     $(WebCore)/dom/EventListener.idl \
+    $(WebCore)/dom/EventListenerOptions.idl \
     $(WebCore)/dom/EventModifierInit.idl \
     $(WebCore)/dom/EventTarget.idl \
     $(WebCore)/dom/FocusEvent.idl \

Modified: trunk/Source/WebCore/Headers.cmake (271805 => 271806)


--- trunk/Source/WebCore/Headers.cmake	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/Headers.cmake	2021-01-25 20:06:25 UTC (rev 271806)
@@ -396,9 +396,11 @@
     display/css/DisplayReplacedBox.h
     display/css/DisplayStyle.h
 
+    dom/AbortSignal.h
     dom/AbstractRange.h
     dom/ActiveDOMCallback.h
     dom/ActiveDOMObject.h
+    dom/AddEventListenerOptions.h
     dom/Attr.h
     dom/Attribute.h
     dom/BoundaryPoint.h
@@ -444,6 +446,7 @@
     dom/EventInit.h
     dom/EventListener.h
     dom/EventListenerMap.h
+    dom/EventListenerOptions.h
     dom/EventModifierInit.h
     dom/EventNames.h
     dom/EventQueue.h

Modified: trunk/Source/WebCore/Modules/async-clipboard/Clipboard.h (271805 => 271806)


--- trunk/Source/WebCore/Modules/async-clipboard/Clipboard.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/Modules/async-clipboard/Clipboard.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -40,7 +40,7 @@
 class Pasteboard;
 class PasteboardCustomData;
 
-class Clipboard final : public RefCounted<Clipboard>, public EventTargetWithInlineData, public CanMakeWeakPtr<Clipboard> {
+class Clipboard final : public RefCounted<Clipboard>, public EventTargetWithInlineData {
     WTF_MAKE_ISO_ALLOCATED(Clipboard);
 public:
     static Ref<Clipboard> create(Navigator&);

Modified: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h (271805 => 271806)


--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -67,6 +67,8 @@
     static Ref<MediaKeySession> create(Document&, WeakPtr<MediaKeys>&&, MediaKeySessionType, bool useDistinctiveIdentifier, Ref<CDM>&&, Ref<CDMInstanceSession>&&);
     virtual ~MediaKeySession();
 
+    using CDMInstanceSessionClient::weakPtrFactory;
+    using WeakValueType = CDMInstanceSessionClient::WeakValueType;
     using RefCounted<MediaKeySession>::ref;
     using RefCounted<MediaKeySession>::deref;
 

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h (271805 => 271806)


--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -61,7 +61,7 @@
 class IDBConnectionToServer;
 }
 
-class IDBRequest : public EventTargetWithInlineData, public IDBActiveDOMObject, public ThreadSafeRefCounted<IDBRequest>, public CanMakeWeakPtr<IDBRequest> {
+class IDBRequest : public EventTargetWithInlineData, public IDBActiveDOMObject, public ThreadSafeRefCounted<IDBRequest> {
     WTF_MAKE_ISO_ALLOCATED(IDBRequest);
 public:
     enum class NullResultType {

Modified: trunk/Source/WebCore/Modules/mediastream/MediaDevices.h (271805 => 271806)


--- trunk/Source/WebCore/Modules/mediastream/MediaDevices.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDevices.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -55,7 +55,7 @@
 
 template<typename IDLType> class DOMPromiseDeferred;
 
-class MediaDevices final : public RefCounted<MediaDevices>, public ActiveDOMObject, public EventTargetWithInlineData, public CanMakeWeakPtr<MediaDevices> {
+class MediaDevices final : public RefCounted<MediaDevices>, public ActiveDOMObject, public EventTargetWithInlineData {
     WTF_MAKE_ISO_ALLOCATED(MediaDevices);
 public:
     static Ref<MediaDevices> create(Document&);

Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h (271805 => 271806)


--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -79,7 +79,6 @@
     : public RefCounted<RTCPeerConnection>
     , public EventTargetWithInlineData
     , public ActiveDOMObject
-    , public CanMakeWeakPtr<RTCPeerConnection>
 #if !RELEASE_LOG_DISABLED
     , private LoggerHelper
 #endif

Modified: trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.h (271805 => 271806)


--- trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -51,7 +51,7 @@
 struct PaymentMethodData;
 template<typename IDLType> class DOMPromiseDeferred;
 
-class PaymentRequest final : public ActiveDOMObject, public CanMakeWeakPtr<PaymentRequest>, public EventTargetWithInlineData, public RefCounted<PaymentRequest> {
+class PaymentRequest final : public ActiveDOMObject, public EventTargetWithInlineData, public RefCounted<PaymentRequest> {
     WTF_MAKE_ISO_ALLOCATED(PaymentRequest);
 public:
     using AbortPromise = DOMPromiseDeferred<void>;

Modified: trunk/Source/WebCore/Modules/speech/SpeechRecognition.h (271805 => 271806)


--- trunk/Source/WebCore/Modules/speech/SpeechRecognition.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/Modules/speech/SpeechRecognition.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -41,6 +41,9 @@
 public:
     static Ref<SpeechRecognition> create(Document&);
 
+    using SpeechRecognitionConnectionClient::weakPtrFactory;
+    using WeakValueType = SpeechRecognitionConnectionClient::WeakValueType;
+
     const String& lang() const { return m_lang; }
     void setLang(String&& lang) { m_lang = WTFMove(lang); }
 

Modified: trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.h (271805 => 271806)


--- trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -95,7 +95,6 @@
     : public ActiveDOMObject
     , public ThreadSafeRefCounted<BaseAudioContext>
     , public EventTargetWithInlineData
-    , public CanMakeWeakPtr<BaseAudioContext>
 #if !RELEASE_LOG_DISABLED
     , public LoggerHelper
 #endif

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.h (271805 => 271806)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -77,7 +77,7 @@
 using ErrorIDLUnion = IDLUnion<IDLInterface<GPUOutOfMemoryError>, IDLInterface<GPUValidationError>>;
 using ErrorPromise = DOMPromiseDeferred<IDLNullable<ErrorIDLUnion>>;
 
-class WebGPUDevice : public RefCounted<WebGPUDevice>, public EventTargetWithInlineData, public CanMakeWeakPtr<WebGPUDevice> {
+class WebGPUDevice : public RefCounted<WebGPUDevice>, public EventTargetWithInlineData {
     WTF_MAKE_ISO_ALLOCATED(WebGPUDevice);
 public:
     virtual ~WebGPUDevice();

Modified: trunk/Source/WebCore/Modules/webxr/WebXRSystem.h (271805 => 271806)


--- trunk/Source/WebCore/Modules/webxr/WebXRSystem.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/Modules/webxr/WebXRSystem.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -53,7 +53,7 @@
 class WebXRSession;
 struct XRSessionInit;
 
-class WebXRSystem final : public RefCounted<WebXRSystem>, public EventTargetWithInlineData, public ActiveDOMObject, public CanMakeWeakPtr<WebXRSystem> {
+class WebXRSystem final : public RefCounted<WebXRSystem>, public EventTargetWithInlineData, public ActiveDOMObject {
     WTF_MAKE_ISO_ALLOCATED(WebXRSystem);
 public:
     using IsSessionSupportedPromise = DOMPromiseDeferred<IDLBoolean>;

Modified: trunk/Source/WebCore/Sources.txt (271805 => 271806)


--- trunk/Source/WebCore/Sources.txt	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/Sources.txt	2021-01-25 20:06:25 UTC (rev 271806)
@@ -2722,6 +2722,7 @@
 JSAbstractRange.cpp
 JSAbstractWorker.cpp
 JSAddressErrors.cpp
+JSAddEventListenerOptions.cpp
 JSAesCbcCfbParams.cpp
 JSAesCtrParams.cpp
 JSAesGcmParams.cpp
@@ -2961,6 +2962,7 @@
 JSErrorEvent.cpp
 JSEvent.cpp
 JSEventInit.cpp
+JSEventListenerOptions.cpp
 JSEventModifierInit.cpp
 JSEventSource.cpp
 JSEventTarget.cpp

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (271805 => 271806)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-01-25 20:06:25 UTC (rev 271806)
@@ -302,6 +302,7 @@
 		0F4966AB1DB40C4300A274BB /* JSDOMPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4966A51DB40C4300A274BB /* JSDOMPoint.h */; };
 		0F4966AD1DB40C4300A274BB /* JSDOMPointInit.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4966A71DB40C4300A274BB /* JSDOMPointInit.h */; };
 		0F4966AF1DB40C4300A274BB /* JSDOMPointReadOnly.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4966A91DB40C4300A274BB /* JSDOMPointReadOnly.h */; };
+		0F53FB84213B7A6400C40D34 /* RenderLayerScrollableArea.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F53FB84213B786400C40D34 /* RenderLayerScrollableArea.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0F54DCE61881051D003EEDBB /* TextAutoSizing.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F54DCE41881051D003EEDBB /* TextAutoSizing.h */; };
 		0F54DD081881D5F5003EEDBB /* Touch.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F54DD051881D5F5003EEDBB /* Touch.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0F54DD091881D5F5003EEDBB /* TouchEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F54DD061881D5F5003EEDBB /* TouchEvent.h */; };
@@ -1262,6 +1263,8 @@
 		46B9519A207D635400A7D2DD /* RemoteFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 46B95192207D632E00A7D2DD /* RemoteFrame.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		46B95BF52231CFD60053A504 /* DeviceOrientationAndMotionAccessController.h in Headers */ = {isa = PBXBuildFile; fileRef = 46B95BF42231CFB80053A504 /* DeviceOrientationAndMotionAccessController.h */; };
 		46BCBBC22085008F00710638 /* JSRemoteDOMWindowBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BCBBC02085007F00710638 /* JSRemoteDOMWindowBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		46BD05C525BB6E5900225F30 /* AddEventListenerOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BD05C225BB6E4E00225F30 /* AddEventListenerOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		46BD05C625BB6E6C00225F30 /* EventListenerOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BD05C325BB6E4E00225F30 /* EventListenerOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		46C0962123D78DD600657C09 /* HTTPCookieAcceptPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C0962023D78DD600657C09 /* HTTPCookieAcceptPolicy.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		46C376622085177D00C73829 /* JSRemoteDOMWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C376612085176D00C73829 /* JSRemoteDOMWindow.h */; };
 		46C696CB1E7205F700597937 /* CPUMonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C696C91E7205E400597937 /* CPUMonitor.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -2399,7 +2402,7 @@
 		7CC9722E1F93E3360004D4CF /* SettingsBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CC660991F93057800D500E9 /* SettingsBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		7CCEBFC01DD8F6AB002C40B8 /* SVGLengthValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CE58D531DD7B09300128552 /* SVGLengthValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		7CD0E2B81F80A4820016A4CE /* AbortController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CD0E2B51F80A4820016A4CE /* AbortController.h */; };
-		7CD0E2BF1F80A56E0016A4CE /* AbortSignal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CD0E2BC1F80A56E0016A4CE /* AbortSignal.h */; };
+		7CD0E2BF1F80A56E0016A4CE /* AbortSignal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CD0E2BC1F80A56E0016A4CE /* AbortSignal.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		7CD1E69324ABF6240089C419 /* ColorSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CD1E69124ABF6240089C419 /* ColorSerialization.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		7CD494CD1A86EB1D000A87EC /* RenderAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CD494CB1A86EB1D000A87EC /* RenderAttachment.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		7CD58DFB1F9565A500112791 /* Settings.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CEB57E91F95651500097AEC /* Settings.h */; };
@@ -4087,7 +4090,6 @@
 		BCEA4876097D93020094C9E4 /* RenderImage.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA4837097D93020094C9E4 /* RenderImage.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BCEA4878097D93020094C9E4 /* RenderInline.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA4839097D93020094C9E4 /* RenderInline.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BCEA487A097D93020094C9E4 /* RenderLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA483B097D93020094C9E4 /* RenderLayer.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		0F53FB84213B7A6400C40D34 /* RenderLayerScrollableArea.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F53FB84213B786400C40D34 /* RenderLayerScrollableArea.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BCEA4880097D93020094C9E4 /* RenderObject.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA4841097D93020094C9E4 /* RenderObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BCEA4887097D93020094C9E4 /* RenderThemeMac.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA4848097D93020094C9E4 /* RenderThemeMac.h */; };
 		BCEA488A097D93020094C9E4 /* RenderTheme.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA484B097D93020094C9E4 /* RenderTheme.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -5089,6 +5091,7 @@
 		E425A49A18292B840020CFCF /* CollectionIndexCache.h in Headers */ = {isa = PBXBuildFile; fileRef = E425A49918292B840020CFCF /* CollectionIndexCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E4295FA412B0614E00D1ACE0 /* ResourceLoadPriority.h in Headers */ = {isa = PBXBuildFile; fileRef = E4295FA312B0614E00D1ACE0 /* ResourceLoadPriority.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E42E76DC1C7AF77600E3614D /* StyleUpdate.h in Headers */ = {isa = PBXBuildFile; fileRef = E42E76DB1C7AF77600E3614D /* StyleUpdate.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		E42EE3A717576E5500EEE8CF /* FontGenericFamilies.h in Headers */ = {isa = PBXBuildFile; fileRef = E44EE3A717576E5500EEE8CF /* FontGenericFamilies.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E43105BB16750F1600DB2FB8 /* NodeTraversal.h in Headers */ = {isa = PBXBuildFile; fileRef = E43105BA16750F1600DB2FB8 /* NodeTraversal.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E43A023B17EB370A004CDD25 /* RenderElement.h in Headers */ = {isa = PBXBuildFile; fileRef = E43A023A17EB370A004CDD25 /* RenderElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E43AF8E71AC5B7EC00CA717E /* CacheValidation.h in Headers */ = {isa = PBXBuildFile; fileRef = E43AF8E51AC5B7DD00CA717E /* CacheValidation.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -5112,7 +5115,6 @@
 		E446143C0CD689CC00FADA75 /* JSHTMLSourceElement.h in Headers */ = {isa = PBXBuildFile; fileRef = E4B423720CBFB6E000AF2ECE /* JSHTMLSourceElement.h */; };
 		E44614520CD68A3500FADA75 /* RenderVideo.h in Headers */ = {isa = PBXBuildFile; fileRef = E4B41E340CBFB60900AF2ECE /* RenderVideo.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E44B4BB4141650D7002B1D8B /* SelectorChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = E44B4BB2141650D7002B1D8B /* SelectorChecker.h */; };
-		E42EE3A717576E5500EEE8CF /* FontGenericFamilies.h in Headers */ = {isa = PBXBuildFile; fileRef = E44EE3A717576E5500EEE8CF /* FontGenericFamilies.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E44FA1851BCA6B5A0091B6EF /* ComposedTreeIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = E44FA1841BCA6B5A0091B6EF /* ComposedTreeIterator.h */; };
 		E451C6312394027900993190 /* LayoutUnits.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F73918C2106CEDD006AF262 /* LayoutUnits.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E451C6322394031A00993190 /* MarginTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FE7AA2621C37B6300296DCD /* MarginTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -8188,6 +8190,10 @@
 		46BCBBC02085007F00710638 /* JSRemoteDOMWindowBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRemoteDOMWindowBase.h; sourceTree = "<group>"; };
 		46BCBBC12085008000710638 /* JSRemoteDOMWindowBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRemoteDOMWindowBase.cpp; sourceTree = "<group>"; };
 		46BCBBC3208500A700710638 /* RemoteDOMWindow.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RemoteDOMWindow.idl; sourceTree = "<group>"; };
+		46BD05C025BB6E4D00225F30 /* EventListenerOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = EventListenerOptions.idl; sourceTree = "<group>"; };
+		46BD05C225BB6E4E00225F30 /* AddEventListenerOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AddEventListenerOptions.h; sourceTree = "<group>"; };
+		46BD05C325BB6E4E00225F30 /* EventListenerOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EventListenerOptions.h; sourceTree = "<group>"; };
+		46BD05C425BB6E4F00225F30 /* AddEventListenerOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AddEventListenerOptions.idl; sourceTree = "<group>"; };
 		46C0962023D78DD600657C09 /* HTTPCookieAcceptPolicy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTTPCookieAcceptPolicy.h; sourceTree = "<group>"; };
 		46C3765F2085176C00C73829 /* JSRemoteDOMWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRemoteDOMWindow.cpp; sourceTree = "<group>"; };
 		46C376612085176D00C73829 /* JSRemoteDOMWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRemoteDOMWindow.h; sourceTree = "<group>"; };
@@ -9758,8 +9764,8 @@
 		6E5388E12458AE1D0076AE03 /* WebGLColorBufferFloat.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGLColorBufferFloat.idl; sourceTree = "<group>"; };
 		6E576BC324EB509C0094D4AA /* JSHTMLCanvasElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLCanvasElementCustom.cpp; sourceTree = "<group>"; };
 		6E67D2A81280E8BD008758F7 /* ExtensionsGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionsGL.h; sourceTree = "<group>"; };
-		6E7CA30A25B4D28A004A913E /* JSWebGLMultiDraw.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSWebGLMultiDraw.h; path = JSWebGLMultiDraw.h; sourceTree = "<group>"; };
-		6E7CA30B25B4D328004A913E /* JSWebGLMultiDraw.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGLMultiDraw.cpp; path = JSWebGLMultiDraw.cpp; sourceTree = "<group>"; };
+		6E7CA30A25B4D28A004A913E /* JSWebGLMultiDraw.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSWebGLMultiDraw.h; sourceTree = "<group>"; };
+		6E7CA30B25B4D328004A913E /* JSWebGLMultiDraw.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLMultiDraw.cpp; sourceTree = "<group>"; };
 		6E84E9DE17668BAD00815B68 /* RasterShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RasterShape.cpp; sourceTree = "<group>"; };
 		6E84E9DF17668BAD00815B68 /* RasterShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RasterShape.h; sourceTree = "<group>"; };
 		6E8ACDE923345CAF0024AAF5 /* WebGLCompressedTextureETC.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGLCompressedTextureETC.cpp; sourceTree = "<group>"; };
@@ -29901,6 +29907,8 @@
 				7C5222981E1DAE16002CB8F7 /* ActiveDOMCallback.h */,
 				E1C4DE6D0EA75C650023CCD6 /* ActiveDOMObject.cpp */,
 				E1C4DE680EA75C1E0023CCD6 /* ActiveDOMObject.h */,
+				46BD05C225BB6E4E00225F30 /* AddEventListenerOptions.h */,
+				46BD05C425BB6E4F00225F30 /* AddEventListenerOptions.idl */,
 				E3AE6CD12252F27000C70B50 /* AllDescendantsCollection.cpp */,
 				83BB5C871D5D6F3A005A71F4 /* AllDescendantsCollection.h */,
 				319847FE1A1D816700A13318 /* AnimationEvent.cpp */,
@@ -30113,6 +30121,8 @@
 				85AFA7410AAF298400E84305 /* EventListener.idl */,
 				AD4495F1141FC08900541EDF /* EventListenerMap.cpp */,
 				AD4495F2141FC08900541EDF /* EventListenerMap.h */,
+				46BD05C325BB6E4E00225F30 /* EventListenerOptions.h */,
+				46BD05C025BB6E4D00225F30 /* EventListenerOptions.idl */,
 				9B91DCCC2383792D000EEE0F /* EventLoop.cpp */,
 				9B0ABCA123679AB300B45085 /* EventLoop.h */,
 				83FE7CA31DA9F1650037237C /* EventModifierInit.h */,
@@ -31065,6 +31075,7 @@
 				E1C4DE690EA75C1E0023CCD6 /* ActiveDOMObject.h in Headers */,
 				724EE5501DC80D7F00A91FFB /* ActivityState.h in Headers */,
 				724EE5511DC80D8400A91FFB /* ActivityStateChangeObserver.h in Headers */,
+				46BD05C525BB6E5900225F30 /* AddEventListenerOptions.h in Headers */,
 				A1677E0E213E02A000A08C34 /* AddressErrors.h in Headers */,
 				BCF7E491137CD7C7001DDAE7 /* AdjustViewSizeOrNot.h in Headers */,
 				84D0C4061115F1EA0018AA34 /* AffineTransform.h in Headers */,
@@ -32006,6 +32017,7 @@
 				970B728A144FFAC600F00A37 /* EventInterfaces.h in Headers */,
 				935FBC4509BA00B900E230B1 /* EventListener.h in Headers */,
 				AD4495F4141FC08900541EDF /* EventListenerMap.h in Headers */,
+				46BD05C625BB6E6C00225F30 /* EventListenerOptions.h in Headers */,
 				46F02A1A23737F8300106A64 /* EventLoop.h in Headers */,
 				83FE7CA81DA9F1B60037237C /* EventModifierInit.h in Headers */,
 				939885C408B7E3D100E707C4 /* EventNames.h in Headers */,

Modified: trunk/Source/WebCore/animation/WebAnimation.h (271805 => 271806)


--- trunk/Source/WebCore/animation/WebAnimation.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/animation/WebAnimation.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -49,7 +49,7 @@
 
 template<typename IDLType> class DOMPromiseProxyWithResolveCallback;
 
-class WebAnimation : public RefCounted<WebAnimation>, public CanMakeWeakPtr<WebAnimation>, public EventTargetWithInlineData, public ActiveDOMObject {
+class WebAnimation : public RefCounted<WebAnimation>, public EventTargetWithInlineData, public ActiveDOMObject {
     WTF_MAKE_ISO_ALLOCATED(WebAnimation);
 public:
     static Ref<WebAnimation> create(Document&, AnimationEffect*);

Modified: trunk/Source/WebCore/css/MediaQueryList.cpp (271805 => 271806)


--- trunk/Source/WebCore/css/MediaQueryList.cpp	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/css/MediaQueryList.cpp	2021-01-25 20:06:25 UTC (rev 271806)
@@ -20,6 +20,7 @@
 #include "config.h"
 #include "MediaQueryList.h"
 
+#include "AddEventListenerOptions.h"
 #include "EventNames.h"
 #include <wtf/IsoMallocInlines.h>
 
@@ -66,7 +67,7 @@
     if (!listener)
         return;
 
-    addEventListener(eventNames().changeEvent, listener.releaseNonNull());
+    addEventListener(eventNames().changeEvent, listener.releaseNonNull(), { });
 }
 
 void MediaQueryList::removeListener(RefPtr<EventListener>&& listener)
@@ -74,7 +75,7 @@
     if (!listener)
         return;
 
-    removeEventListener(eventNames().changeEvent, *listener);
+    removeEventListener(eventNames().changeEvent, *listener, { });
 }
 
 void MediaQueryList::evaluate(MediaQueryEvaluator& evaluator, bool& notificationNeeded)

Modified: trunk/Source/WebCore/css/MediaQueryList.h (271805 => 271806)


--- trunk/Source/WebCore/css/MediaQueryList.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/css/MediaQueryList.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -32,7 +32,7 @@
 // retrieve the current value of the given media query and to add/remove listeners that
 // will be called whenever the value of the query changes.
 
-class MediaQueryList final : public RefCounted<MediaQueryList>, public EventTargetWithInlineData, public CanMakeWeakPtr<MediaQueryList>, public ActiveDOMObject {
+class MediaQueryList final : public RefCounted<MediaQueryList>, public EventTargetWithInlineData, public ActiveDOMObject {
     WTF_MAKE_ISO_ALLOCATED(MediaQueryList);
 public:
     static Ref<MediaQueryList> create(Document&, MediaQueryMatcher&, Ref<MediaQuerySet>&&, bool matches);

Modified: trunk/Source/WebCore/dom/AbortSignal.h (271805 => 271806)


--- trunk/Source/WebCore/dom/AbortSignal.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/dom/AbortSignal.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -38,8 +38,8 @@
 class AbortAlgorithm;
 class ScriptExecutionContext;
 
-class AbortSignal final : public RefCounted<AbortSignal>, public EventTargetWithInlineData, public CanMakeWeakPtr<AbortSignal>, private ContextDestructionObserver {
-    WTF_MAKE_ISO_ALLOCATED(AbortSignal);
+class AbortSignal final : public RefCounted<AbortSignal>, public EventTargetWithInlineData, private ContextDestructionObserver {
+    WTF_MAKE_ISO_ALLOCATED_EXPORT(AbortSignal, WEBCORE_EXPORT);
 public:
     static Ref<AbortSignal> create(ScriptExecutionContext&);
 

Copied: trunk/Source/WebCore/dom/AddEventListenerOptions.h (from rev 271805, trunk/Source/WebCore/loader/appcache/DOMApplicationCache.h) (0 => 271806)


--- trunk/Source/WebCore/dom/AddEventListenerOptions.h	                        (rev 0)
+++ trunk/Source/WebCore/dom/AddEventListenerOptions.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2016-2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "AbortSignal.h"
+#include "EventListenerOptions.h"
+#include <wtf/Optional.h>
+
+namespace WebCore {
+
+struct AddEventListenerOptions : EventListenerOptions {
+    AddEventListenerOptions(bool capture = false, Optional<bool> passive = WTF::nullopt, bool _once_ = false, RefPtr<AbortSignal>&& signal = nullptr)
+        : EventListenerOptions(capture)
+        , passive(passive)
+        , once(once)
+        , signal(WTFMove(signal))
+    {
+    }
+
+    Optional<bool> passive;
+    bool once { false };
+    RefPtr<AbortSignal> signal;
+};
+
+} // namespace WebCore

Copied: trunk/Source/WebCore/dom/AddEventListenerOptions.idl (from rev 271805, trunk/Source/WebCore/loader/appcache/DOMApplicationCache.h) (0 => 271806)


--- trunk/Source/WebCore/dom/AddEventListenerOptions.idl	                        (rev 0)
+++ trunk/Source/WebCore/dom/AddEventListenerOptions.idl	2021-01-25 20:06:25 UTC (rev 271806)
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2016-2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+dictionary AddEventListenerOptions : EventListenerOptions {
+    boolean passive;
+    boolean _once_ = false;
+    AbortSignal signal;
+};

Modified: trunk/Source/WebCore/dom/EventListener.h (271805 => 271806)


--- trunk/Source/WebCore/dom/EventListener.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/dom/EventListener.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -21,6 +21,7 @@
 #pragma once
 
 #include <wtf/RefCounted.h>
+#include <wtf/WeakPtr.h>
 
 namespace JSC {
 class JSObject;
@@ -33,7 +34,7 @@
 class Event;
 class EventTarget;
 
-class EventListener : public RefCounted<EventListener> {
+class EventListener : public RefCounted<EventListener>, public CanMakeWeakPtr<EventListener> {
 public:
     enum Type {
         JSEventListenerType, 

Modified: trunk/Source/WebCore/dom/EventListenerMap.cpp (271805 => 271806)


--- trunk/Source/WebCore/dom/EventListenerMap.cpp	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/dom/EventListenerMap.cpp	2021-01-25 20:06:25 UTC (rev 271806)
@@ -33,6 +33,7 @@
 #include "config.h"
 #include "EventListenerMap.h"
 
+#include "AddEventListenerOptions.h"
 #include "Event.h"
 #include "EventTarget.h"
 #include <wtf/MainThread.h>

Copied: trunk/Source/WebCore/dom/EventListenerOptions.h (from rev 271805, trunk/Source/WebCore/loader/appcache/DOMApplicationCache.h) (0 => 271806)


--- trunk/Source/WebCore/dom/EventListenerOptions.h	                        (rev 0)
+++ trunk/Source/WebCore/dom/EventListenerOptions.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2016-2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+struct EventListenerOptions {
+    EventListenerOptions(bool capture = false)
+        : capture(capture)
+    { }
+
+    bool capture { false };
+};
+
+} // namespace WebCore

Copied: trunk/Source/WebCore/dom/EventListenerOptions.idl (from rev 271805, trunk/Source/WebCore/loader/appcache/DOMApplicationCache.h) (0 => 271806)


--- trunk/Source/WebCore/dom/EventListenerOptions.idl	                        (rev 0)
+++ trunk/Source/WebCore/dom/EventListenerOptions.idl	2021-01-25 20:06:25 UTC (rev 271806)
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2016-2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+dictionary EventListenerOptions {
+    boolean capture = false;
+};

Modified: trunk/Source/WebCore/dom/EventTarget.cpp (271805 => 271806)


--- trunk/Source/WebCore/dom/EventTarget.cpp	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/dom/EventTarget.cpp	2021-01-25 20:06:25 UTC (rev 271806)
@@ -32,6 +32,7 @@
 #include "config.h"
 #include "EventTarget.h"
 
+#include "AddEventListenerOptions.h"
 #include "DOMWrapperWorld.h"
 #include "EventNames.h"
 #include "EventTargetConcrete.h"
@@ -81,6 +82,9 @@
     listener->checkValidityForEventTarget(*this);
 #endif
 
+    if (options.signal && options.signal->aborted())
+        return false;
+
     auto passive = options.passive;
 
     if (!passive.hasValue() && Quirks::shouldMakeEventListenerPassive(*this, eventType, listener.get()))
@@ -87,13 +91,19 @@
         passive = true;
 
     bool listenerCreatedFromScript = listener->type() == EventListener::JSEventListenerType && !listener->wasCreatedFromMarkup();
-    auto listenerRef = listener.copyRef();
 
-    if (!ensureEventTargetData().eventListenerMap.add(eventType, WTFMove(listener), { options.capture, passive.valueOr(false), options.once }))
+    if (!ensureEventTargetData().eventListenerMap.add(eventType, listener.copyRef(), { options.capture, passive.valueOr(false), options.once }))
         return false;
 
+    if (options.signal) {
+        options.signal->addAlgorithm([weakThis = makeWeakPtr(*this), eventType, listener = makeWeakPtr(listener.get()), capture = options.capture] {
+            if (weakThis && listener)
+                weakThis->removeEventListener(eventType, *listener, capture);
+        });
+    }
+
     if (listenerCreatedFromScript)
-        InspectorInstrumentation::didAddEventListener(*this, eventType, listenerRef.get(), options.capture);
+        InspectorInstrumentation::didAddEventListener(*this, eventType, listener.get(), options.capture);
 
     if (eventNames().isWheelEventType(eventType))
         invalidateEventListenerRegions();
@@ -116,12 +126,12 @@
     WTF::visit(visitor, variant);
 }
 
-void EventTarget::removeEventListenerForBindings(const AtomString& eventType, RefPtr<EventListener>&& listener, ListenerOptionsOrBoolean&& variant)
+void EventTarget::removeEventListenerForBindings(const AtomString& eventType, RefPtr<EventListener>&& listener, EventListenerOptionsOrBoolean&& variant)
 {
     if (!listener)
         return;
 
-    auto visitor = WTF::makeVisitor([&](const ListenerOptions& options) {
+    auto visitor = WTF::makeVisitor([&](const EventListenerOptions& options) {
         removeEventListener(eventType, *listener, options);
     }, [&](bool capture) {
         removeEventListener(eventType, *listener, capture);
@@ -130,7 +140,7 @@
     WTF::visit(visitor, variant);
 }
 
-bool EventTarget::removeEventListener(const AtomString& eventType, EventListener& listener, const ListenerOptions& options)
+bool EventTarget::removeEventListener(const AtomString& eventType, EventListener& listener, const EventListenerOptions& options)
 {
     auto* data = ""
     if (!data)
@@ -170,7 +180,7 @@
 
         return true;
     }
-    return addEventListener(eventType, listener.releaseNonNull());
+    return addEventListener(eventType, listener.releaseNonNull(), { });
 }
 
 EventListener* EventTarget::attributeEventListener(const AtomString& eventType, DOMWrapperWorld& isolatedWorld)
@@ -319,7 +329,7 @@
 
         // Do this before invocation to avoid reentrancy issues.
         if (registeredListener->isOnce())
-            removeEventListener(event.type(), registeredListener->callback(), ListenerOptions(registeredListener->useCapture()));
+            removeEventListener(event.type(), registeredListener->callback(), registeredListener->useCapture());
 
         if (registeredListener->isPassive())
             event.setInPassiveListener(true);

Modified: trunk/Source/WebCore/dom/EventTarget.h (271805 => 271806)


--- trunk/Source/WebCore/dom/EventTarget.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/dom/EventTarget.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -31,6 +31,7 @@
 #pragma once
 
 #include "EventListenerMap.h"
+#include "EventListenerOptions.h"
 #include "EventTargetInterfaces.h"
 #include "ExceptionOr.h"
 #include "ScriptWrappable.h"
@@ -38,9 +39,11 @@
 #include <wtf/Forward.h>
 #include <wtf/IsoMalloc.h>
 #include <wtf/Variant.h>
+#include <wtf/WeakPtr.h>
 
 namespace WebCore {
 
+struct AddEventListenerOptions;
 class DOMWrapperWorld;
 
 struct EventTargetData {
@@ -51,7 +54,7 @@
     bool isFiringEventListeners { false };
 };
 
-class EventTarget : public ScriptWrappable {
+class EventTarget : public ScriptWrappable, public CanMakeWeakPtr<EventTarget> {
     WTF_MAKE_ISO_ALLOCATED(EventTarget);
 public:
     static Ref<EventTarget> create(ScriptExecutionContext&);
@@ -62,40 +65,21 @@
     virtual EventTargetInterface eventTargetInterface() const = 0;
     virtual ScriptExecutionContext* scriptExecutionContext() const = 0;
 
-    virtual bool isNode() const;
-    virtual bool isPaymentRequest() const;
+    WEBCORE_EXPORT virtual bool isNode() const;
+    WEBCORE_EXPORT virtual bool isPaymentRequest() const;
 
-    struct ListenerOptions {
-        ListenerOptions(bool capture = false)
-            : capture(capture)
-        { }
-
-        bool capture { false };
-    };
-
-    struct AddEventListenerOptions : ListenerOptions {
-        AddEventListenerOptions(bool capture = false, Optional<bool> passive = WTF::nullopt, bool _once_ = false)
-            : ListenerOptions(capture)
-            , passive(passive)
-            , once(once)
-        { }
-
-        Optional<bool> passive;
-        bool once { false };
-    };
-
     using AddEventListenerOptionsOrBoolean = Variant<AddEventListenerOptions, bool>;
     WEBCORE_EXPORT void addEventListenerForBindings(const AtomString& eventType, RefPtr<EventListener>&&, AddEventListenerOptionsOrBoolean&&);
-    using ListenerOptionsOrBoolean = Variant<ListenerOptions, bool>;
-    WEBCORE_EXPORT void removeEventListenerForBindings(const AtomString& eventType, RefPtr<EventListener>&&, ListenerOptionsOrBoolean&&);
+    using EventListenerOptionsOrBoolean = Variant<EventListenerOptions, bool>;
+    WEBCORE_EXPORT void removeEventListenerForBindings(const AtomString& eventType, RefPtr<EventListener>&&, EventListenerOptionsOrBoolean&&);
     WEBCORE_EXPORT ExceptionOr<bool> dispatchEventForBindings(Event&);
 
-    WEBCORE_EXPORT virtual bool addEventListener(const AtomString& eventType, Ref<EventListener>&&, const AddEventListenerOptions& = { });
-    virtual bool removeEventListener(const AtomString& eventType, EventListener&, const ListenerOptions& = { });
+    WEBCORE_EXPORT virtual bool addEventListener(const AtomString& eventType, Ref<EventListener>&&, const AddEventListenerOptions&);
+    WEBCORE_EXPORT virtual bool removeEventListener(const AtomString& eventType, EventListener&, const EventListenerOptions& = { });
 
-    virtual void removeAllEventListeners();
-    virtual void dispatchEvent(Event&);
-    virtual void uncaughtExceptionInEventHandler();
+    WEBCORE_EXPORT virtual void removeAllEventListeners();
+    WEBCORE_EXPORT virtual void dispatchEvent(Event&);
+    WEBCORE_EXPORT virtual void uncaughtExceptionInEventHandler();
 
     // Used for legacy "onevent" attributes.
     bool setAttributeEventListener(const AtomString& eventType, RefPtr<EventListener>&&, DOMWrapperWorld&);

Modified: trunk/Source/WebCore/dom/EventTarget.idl (271805 => 271806)


--- trunk/Source/WebCore/dom/EventTarget.idl	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/dom/EventTarget.idl	2021-01-25 20:06:25 UTC (rev 271806)
@@ -32,12 +32,3 @@
     [ImplementedAs=removeEventListenerForBindings] undefined removeEventListener([AtomString] DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = false);
     [ImplementedAs=dispatchEventForBindings, MayThrowException] boolean dispatchEvent(Event event);
 };
-
-dictionary EventListenerOptions {
-    boolean capture = false;
-};
-
-dictionary AddEventListenerOptions : EventListenerOptions {
-    boolean passive;
-    boolean _once_ = false;
-};

Modified: trunk/Source/WebCore/dom/MessagePort.cpp (271805 => 271806)


--- trunk/Source/WebCore/dom/MessagePort.cpp	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/dom/MessagePort.cpp	2021-01-25 20:06:25 UTC (rev 271806)
@@ -104,6 +104,9 @@
     Locker<Lock> locker(allMessagePortsLock);
     allMessagePorts().set(m_identifier, this);
 
+    // Make sure the WeakPtrFactory gets initialized eagerly on the thread the MessagePort gets constructed on for thread-safety reasons.
+    initializeWeakPtrFactory();
+
     m_scriptExecutionContext->createdMessagePort(*this);
     suspendIfNeeded();
 
@@ -419,7 +422,7 @@
     return EventTargetWithInlineData::addEventListener(eventType, WTFMove(listener), options);
 }
 
-bool MessagePort::removeEventListener(const AtomString& eventType, EventListener& listener, const ListenerOptions& options)
+bool MessagePort::removeEventListener(const AtomString& eventType, EventListener& listener, const EventListenerOptions& options)
 {
     auto result = EventTargetWithInlineData::removeEventListener(eventType, listener, options);
 

Modified: trunk/Source/WebCore/dom/MessagePort.h (271805 => 271806)


--- trunk/Source/WebCore/dom/MessagePort.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/dom/MessagePort.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -45,7 +45,7 @@
 
 class Frame;
 
-class MessagePort final : public ActiveDOMObject, public EventTargetWithInlineData, public CanMakeWeakPtr<MessagePort, WeakPtrFactoryInitialization::Eager> {
+class MessagePort final : public ActiveDOMObject, public EventTargetWithInlineData {
     WTF_MAKE_NONCOPYABLE(MessagePort);
     WTF_MAKE_ISO_ALLOCATED(MessagePort);
 public:
@@ -99,7 +99,7 @@
     explicit MessagePort(ScriptExecutionContext&, const MessagePortIdentifier& local, const MessagePortIdentifier& remote);
 
     bool addEventListener(const AtomString& eventType, Ref<EventListener>&&, const AddEventListenerOptions&) final;
-    bool removeEventListener(const AtomString& eventType, EventListener&, const ListenerOptions&) final;
+    bool removeEventListener(const AtomString& eventType, EventListener&, const EventListenerOptions&) final;
 
     // ActiveDOMObject
     const char* activeDOMObjectName() const final;

Modified: trunk/Source/WebCore/dom/Node.cpp (271805 => 271806)


--- trunk/Source/WebCore/dom/Node.cpp	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/dom/Node.cpp	2021-01-25 20:06:25 UTC (rev 271806)
@@ -2128,7 +2128,7 @@
         downcast<Element>(*this).didMoveToNewDocument(oldDocument, newDocument);
 }
 
-static inline bool tryAddEventListener(Node* targetNode, const AtomString& eventType, Ref<EventListener>&& listener, const EventTarget::AddEventListenerOptions& options)
+static inline bool tryAddEventListener(Node* targetNode, const AtomString& eventType, Ref<EventListener>&& listener, const AddEventListenerOptions& options)
 {
     if (!targetNode->EventTarget::addEventListener(eventType, listener.copyRef(), options))
         return false;
@@ -2164,7 +2164,7 @@
     return tryAddEventListener(this, eventType, WTFMove(listener), options);
 }
 
-static inline bool tryRemoveEventListener(Node* targetNode, const AtomString& eventType, EventListener& listener, const EventTarget::ListenerOptions& options)
+static inline bool tryRemoveEventListener(Node* targetNode, const AtomString& eventType, EventListener& listener, const EventListenerOptions& options)
 {
     if (!targetNode->EventTarget::removeEventListener(eventType, listener, options))
         return false;
@@ -2196,7 +2196,7 @@
     return true;
 }
 
-bool Node::removeEventListener(const AtomString& eventType, EventListener& listener, const ListenerOptions& options)
+bool Node::removeEventListener(const AtomString& eventType, EventListener& listener, const EventListenerOptions& options)
 {
     return tryRemoveEventListener(this, eventType, listener, options);
 }

Modified: trunk/Source/WebCore/dom/Node.h (271805 => 271806)


--- trunk/Source/WebCore/dom/Node.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/dom/Node.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -69,7 +69,7 @@
 
 using NodeOrString = Variant<RefPtr<Node>, String>;
 
-class Node : public CanMakeWeakPtr<Node>, public EventTarget {
+class Node : public EventTarget {
     WTF_MAKE_ISO_ALLOCATED(Node);
 
     friend class Document;
@@ -447,7 +447,7 @@
     ScriptExecutionContext* scriptExecutionContext() const final; // Implemented in Document.h
 
     WEBCORE_EXPORT bool addEventListener(const AtomString& eventType, Ref<EventListener>&&, const AddEventListenerOptions&) override;
-    bool removeEventListener(const AtomString& eventType, EventListener&, const ListenerOptions&) override;
+    bool removeEventListener(const AtomString& eventType, EventListener&, const EventListenerOptions&) override;
 
     using EventTarget::dispatchEvent;
     void dispatchEvent(Event&) override;

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (271805 => 271806)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2021-01-25 20:06:25 UTC (rev 271806)
@@ -5795,7 +5795,7 @@
     return true;
 }
 
-bool HTMLMediaElement::removeEventListener(const AtomString& eventType, EventListener& listener, const ListenerOptions& options)
+bool HTMLMediaElement::removeEventListener(const AtomString& eventType, EventListener& listener, const EventListenerOptions& options)
 {
 #if ENABLE(LEGACY_ENCRYPTED_MEDIA) && ENABLE(ENCRYPTED_MEDIA)
     if (eventType == eventNames().webkitneedkeyEvent)

Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (271805 => 271806)


--- trunk/Source/WebCore/html/HTMLMediaElement.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -402,7 +402,7 @@
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
     void webkitShowPlaybackTargetPicker();
     bool addEventListener(const AtomString& eventType, Ref<EventListener>&&, const AddEventListenerOptions&) override;
-    bool removeEventListener(const AtomString& eventType, EventListener&, const ListenerOptions&) override;
+    bool removeEventListener(const AtomString& eventType, EventListener&, const EventListenerOptions&) override;
 
     void wirelessRoutesAvailableDidChange() override;
     void setWirelessPlaybackTarget(Ref<MediaPlaybackTarget>&&) override;

Modified: trunk/Source/WebCore/html/ImageDocument.cpp (271805 => 271806)


--- trunk/Source/WebCore/html/ImageDocument.cpp	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/html/ImageDocument.cpp	2021-01-25 20:06:25 UTC (rev 271806)
@@ -25,6 +25,7 @@
 #include "config.h"
 #include "ImageDocument.h"
 
+#include "AddEventListenerOptions.h"
 #include "CachedImage.h"
 #include "Chrome.h"
 #include "ChromeClient.h"

Modified: trunk/Source/WebCore/html/track/TextTrackCue.h (271805 => 271806)


--- trunk/Source/WebCore/html/track/TextTrackCue.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/html/track/TextTrackCue.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -62,7 +62,7 @@
     WeakPtr<TextTrackCue> m_cue;
 };
 
-class TextTrackCue : public RefCounted<TextTrackCue>, public EventTargetWithInlineData, public CanMakeWeakPtr<TextTrackCue> {
+class TextTrackCue : public RefCounted<TextTrackCue>, public EventTargetWithInlineData {
     WTF_MAKE_ISO_ALLOCATED(TextTrackCue);
 public:
     static const AtomString& cueShadowPseudoId();

Modified: trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp (271805 => 271806)


--- trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp	2021-01-25 20:06:25 UTC (rev 271806)
@@ -33,6 +33,7 @@
 
 #include "AXObjectCache.h"
 #include "AccessibilityNodeObject.h"
+#include "AddEventListenerOptions.h"
 #include "Attr.h"
 #include "CSSComputedStyleDeclaration.h"
 #include "CSSParser.h"

Modified: trunk/Source/WebCore/loader/appcache/DOMApplicationCache.h (271805 => 271806)


--- trunk/Source/WebCore/loader/appcache/DOMApplicationCache.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/loader/appcache/DOMApplicationCache.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -34,7 +34,7 @@
 class ApplicationCacheHost;
 class Frame;
 
-class DOMApplicationCache final : public RefCounted<DOMApplicationCache>, public EventTargetWithInlineData, public DOMWindowProperty, public CanMakeWeakPtr<DOMApplicationCache> {
+class DOMApplicationCache final : public RefCounted<DOMApplicationCache>, public EventTargetWithInlineData, public DOMWindowProperty {
     WTF_MAKE_ISO_ALLOCATED(DOMApplicationCache);
 public:
     static Ref<DOMApplicationCache> create(DOMWindow& window) { return adoptRef(*new DOMApplicationCache(window)); }

Modified: trunk/Source/WebCore/page/DOMWindow.cpp (271805 => 271806)


--- trunk/Source/WebCore/page/DOMWindow.cpp	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/page/DOMWindow.cpp	2021-01-25 20:06:25 UTC (rev 271806)
@@ -2145,7 +2145,7 @@
 #endif
 }
 
-bool DOMWindow::removeEventListener(const AtomString& eventType, EventListener& listener, const ListenerOptions& options)
+bool DOMWindow::removeEventListener(const AtomString& eventType, EventListener& listener, const EventListenerOptions& options)
 {
     if (!EventTarget::removeEventListener(eventType, listener, options.capture))
         return false;

Modified: trunk/Source/WebCore/page/DOMWindow.h (271805 => 271806)


--- trunk/Source/WebCore/page/DOMWindow.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/page/DOMWindow.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -111,7 +111,6 @@
 // FIXME: Rename DOMWindow to LocalWindow and AbstractDOMWindow to DOMWindow.
 class DOMWindow final
     : public AbstractDOMWindow
-    , public CanMakeWeakPtr<DOMWindow>
     , public ContextDestructionObserver
     , public Base64Utilities
     , public Supplementable<DOMWindow> {
@@ -314,7 +313,7 @@
     // Events
     // EventTarget API
     bool addEventListener(const AtomString& eventType, Ref<EventListener>&&, const AddEventListenerOptions&) final;
-    bool removeEventListener(const AtomString& eventType, EventListener&, const ListenerOptions&) final;
+    bool removeEventListener(const AtomString& eventType, EventListener&, const EventListenerOptions&) final;
     void removeAllEventListeners() final;
 
     using EventTarget::dispatchEvent;

Modified: trunk/Source/WebCore/platform/cocoa/PlaybackSessionModelMediaElement.mm (271805 => 271806)


--- trunk/Source/WebCore/platform/cocoa/PlaybackSessionModelMediaElement.mm	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/platform/cocoa/PlaybackSessionModelMediaElement.mm	2021-01-25 20:06:25 UTC (rev 271806)
@@ -28,6 +28,7 @@
 
 #if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
 
+#import "AddEventListenerOptions.h"
 #import "AudioTrackList.h"
 #import "Event.h"
 #import "EventListener.h"

Modified: trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm (271805 => 271806)


--- trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm	2021-01-25 20:06:25 UTC (rev 271806)
@@ -28,6 +28,7 @@
 
 #if ENABLE(VIDEO_PRESENTATION_MODE)
 
+#import "AddEventListenerOptions.h"
 #import "DOMWindow.h"
 #import "Event.h"
 #import "EventListener.h"

Modified: trunk/Source/WebCore/svg/SVGElement.cpp (271805 => 271806)


--- trunk/Source/WebCore/svg/SVGElement.cpp	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/svg/SVGElement.cpp	2021-01-25 20:06:25 UTC (rev 271806)
@@ -381,7 +381,7 @@
     return true;
 }
 
-bool SVGElement::removeEventListener(const AtomString& eventType, EventListener& listener, const ListenerOptions& options)
+bool SVGElement::removeEventListener(const AtomString& eventType, EventListener& listener, const EventListenerOptions& options)
 {
     if (containingShadowRoot())
         return Node::removeEventListener(eventType, listener, options);

Modified: trunk/Source/WebCore/svg/SVGElement.h (271805 => 271806)


--- trunk/Source/WebCore/svg/SVGElement.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/svg/SVGElement.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -112,7 +112,7 @@
     virtual bool haveLoadedRequiredResources();
 
     bool addEventListener(const AtomString& eventType, Ref<EventListener>&&, const AddEventListenerOptions&) override;
-    bool removeEventListener(const AtomString& eventType, EventListener&, const ListenerOptions&) override;
+    bool removeEventListener(const AtomString& eventType, EventListener&, const EventListenerOptions&) override;
 
     bool hasTagName(const SVGQualifiedName& name) const { return hasLocalName(name.localName()); }
 

Modified: trunk/Source/WebCore/svg/SVGTRefElement.cpp (271805 => 271806)


--- trunk/Source/WebCore/svg/SVGTRefElement.cpp	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/svg/SVGTRefElement.cpp	2021-01-25 20:06:25 UTC (rev 271806)
@@ -23,6 +23,7 @@
 #include "config.h"
 #include "SVGTRefElement.h"
 
+#include "AddEventListenerOptions.h"
 #include "EventListener.h"
 #include "EventNames.h"
 #include "MutationEvent.h"

Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (271805 => 271806)


--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp	2021-01-25 20:06:25 UTC (rev 271806)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "SVGSMILElement.h"
 
+#include "AddEventListenerOptions.h"
 #include "CSSPropertyNames.h"
 #include "Document.h"
 #include "Event.h"

Modified: trunk/Source/WebCore/testing/Internals.cpp (271805 => 271806)


--- trunk/Source/WebCore/testing/Internals.cpp	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/testing/Internals.cpp	2021-01-25 20:06:25 UTC (rev 271806)
@@ -29,6 +29,7 @@
 
 #include "AXObjectCache.h"
 #include "ActivityState.h"
+#include "AddEventListenerOptions.h"
 #include "AnimationTimeline.h"
 #include "ApplicationCacheStorage.h"
 #include "AudioSession.h"

Modified: trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h (271805 => 271806)


--- trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -28,6 +28,7 @@
 #if ENABLE(SERVICE_WORKER)
 
 #include "ActiveDOMObject.h"
+#include "AddEventListenerOptions.h"
 #include "EventTarget.h"
 #include "IDLTypes.h"
 #include "JSDOMPromiseDeferred.h"

Modified: trunk/Source/WebKit/ChangeLog (271805 => 271806)


--- trunk/Source/WebKit/ChangeLog	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebKit/ChangeLog	2021-01-25 20:06:25 UTC (rev 271806)
@@ -1,3 +1,15 @@
+2021-01-25  Chris Dumez  <cdu...@apple.com>
+
+        Support AbortSignal in addEventListenerOptions to unsubscribe from events
+        https://bugs.webkit.org/show_bug.cgi?id=218753
+        <rdar://problem/71258012>
+
+        Reviewed by Darin Adler.
+
+        Minor build fixes.
+
+        * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
+
 2021-01-25  Wenson Hsieh  <wenson_hs...@apple.com>
 
         [GPU Process] Web process should be terminated if DisplayListReaderHandle advances past 0

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/GObjectEventListener.h (271805 => 271806)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/GObjectEventListener.h	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/GObjectEventListener.h	2021-01-25 20:06:25 UTC (rev 271806)
@@ -18,6 +18,7 @@
 
 #pragma once
 
+#include <WebCore/AddEventListenerOptions.h>
 #include <WebCore/EventListener.h>
 #include <WebCore/EventTarget.h>
 #include <wtf/RefPtr.h>

Modified: trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginAnnotation.mm (271805 => 271806)


--- trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginAnnotation.mm	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPluginAnnotation.mm	2021-01-25 20:06:25 UTC (rev 271806)
@@ -34,6 +34,7 @@
 #import "PDFPluginChoiceAnnotation.h"
 #import "PDFPluginTextAnnotation.h"
 #import <Quartz/Quartz.h>
+#import <WebCore/AddEventListenerOptions.h>
 #import <WebCore/CSSPrimitiveValue.h>
 #import <WebCore/CSSPropertyNames.h>
 #import <WebCore/ColorMac.h>

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (271805 => 271806)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2021-01-25 20:06:25 UTC (rev 271806)
@@ -1,3 +1,15 @@
+2021-01-25  Chris Dumez  <cdu...@apple.com>
+
+        Support AbortSignal in addEventListenerOptions to unsubscribe from events
+        https://bugs.webkit.org/show_bug.cgi?id=218753
+        <rdar://problem/71258012>
+
+        Reviewed by Darin Adler.
+
+        Minor build fixes.
+
+        * DOM/DOMNode.mm:
+
 2021-01-21  Devin Rousso  <drou...@apple.com>
 
         [Apple Pay] use the first item in `shippingOptions` even when it's not `selected`

Modified: trunk/Source/WebKitLegacy/mac/DOM/DOMNode.mm (271805 => 271806)


--- trunk/Source/WebKitLegacy/mac/DOM/DOMNode.mm	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebKitLegacy/mac/DOM/DOMNode.mm	2021-01-25 20:06:25 UTC (rev 271806)
@@ -33,6 +33,7 @@
 #import "DOMNodeListInternal.h"
 #import "ExceptionHandlers.h"
 #import "ObjCEventListener.h"
+#import <WebCore/AddEventListenerOptions.h>
 #import <WebCore/DOMImplementation.h>
 #import <WebCore/Element.h>
 #import <WebCore/JSExecState.h>

Modified: trunk/Source/WebKitLegacy/win/DOMCoreClasses.cpp (271805 => 271806)


--- trunk/Source/WebKitLegacy/win/DOMCoreClasses.cpp	2021-01-25 19:58:49 UTC (rev 271805)
+++ trunk/Source/WebKitLegacy/win/DOMCoreClasses.cpp	2021-01-25 20:06:25 UTC (rev 271806)
@@ -30,6 +30,7 @@
 #include "DOMEventsClasses.h"
 #include "DOMHTMLClasses.h"
 #include "WebKitGraphics.h"
+#include <WebCore/AddEventListenerOptions.h>
 #include <WebCore/Attr.h>
 #include <WebCore/BString.h>
 #include <WebCore/COMPtr.h>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to