Title: [203377] trunk
Revision
203377
Author
cdu...@apple.com
Date
2016-07-18 15:33:32 -0700 (Mon, 18 Jul 2016)

Log Message

The 2 first parameters to addEventListener() / removeEventListener() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=158008

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

* web-platform-tests/XMLHttpRequest/interfaces-expected.txt:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

The 2 first parameters to addEventListener() / removeEventListener() should be
mandatory:
- https://dom.spec.whatwg.org/#interface-eventtarget

Firefox 46 and Chrome 50 both match the specification and throw an exception when those
parameters are omitted. However, those parameters were marked as optional in WebKit and
the calls were no-ops if those parameters were omitted. This patch aligns our behavior
with the specification and other browsers.

Test: fast/dom/eventtarget-api-parameters.html

* bindings/scripts/CodeGeneratorJS.pm:
(GetFunctionLength): Deleted.
* dom/EventTarget.idl:

LayoutTests:

* fast/dom/Window/window-legacy-event-listener-expected.txt: Removed.
* fast/dom/Window/window-legacy-event-listener.html: Removed.
* fast/dom/XMLHttpRequest-legacy-event-listener-expected.txt: Removed.
* fast/dom/XMLHttpRequest-legacy-event-listener.html: Removed.
* fast/dom/node-legacy-event-listener-expected.txt: Removed.
* fast/dom/node-legacy-event-listener.html: Removed.
Drop legacy tests that expect the addEventListener() / removeEventListener()
parameters to be optional.

* fast/dom/eventtarget-api-parameters-expected.txt: Added.
* fast/dom/eventtarget-api-parameters.html: Added.
Add layout test to check that the 2 first parameters of addEventListener()
and removeEventListener() are now mandatory. It also checks that the
second parameter is nullable.

* media/video-remote-control-playpause.html:
Drop useless call to addEventListener() without a listener as it now throws.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (203376 => 203377)


--- trunk/LayoutTests/ChangeLog	2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/ChangeLog	2016-07-18 22:33:32 UTC (rev 203377)
@@ -1,3 +1,28 @@
+2016-07-18  Chris Dumez  <cdu...@apple.com>
+
+        The 2 first parameters to addEventListener() / removeEventListener() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=158008
+
+        Reviewed by Darin Adler.
+
+        * fast/dom/Window/window-legacy-event-listener-expected.txt: Removed.
+        * fast/dom/Window/window-legacy-event-listener.html: Removed.
+        * fast/dom/XMLHttpRequest-legacy-event-listener-expected.txt: Removed.
+        * fast/dom/XMLHttpRequest-legacy-event-listener.html: Removed.
+        * fast/dom/node-legacy-event-listener-expected.txt: Removed.
+        * fast/dom/node-legacy-event-listener.html: Removed.
+        Drop legacy tests that expect the addEventListener() / removeEventListener()
+        parameters to be optional.
+
+        * fast/dom/eventtarget-api-parameters-expected.txt: Added.
+        * fast/dom/eventtarget-api-parameters.html: Added.
+        Add layout test to check that the 2 first parameters of addEventListener()
+        and removeEventListener() are now mandatory. It also checks that the
+        second parameter is nullable.
+
+        * media/video-remote-control-playpause.html:
+        Drop useless call to addEventListener() without a listener as it now throws.
+
 2016-07-18  Brent Fulgham  <bfulg...@apple.com>
 
         Unreviewed, rolling out r203373.

Deleted: trunk/LayoutTests/fast/dom/Window/window-legacy-event-listener-expected.txt (203376 => 203377)


--- trunk/LayoutTests/fast/dom/Window/window-legacy-event-listener-expected.txt	2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/fast/dom/Window/window-legacy-event-listener-expected.txt	2016-07-18 22:33:32 UTC (rev 203377)
@@ -1,13 +0,0 @@
-Test addEventListener() and removeEventListener() fail silently if arguments are missing.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS window.addEventListener("foo") is undefined
-PASS window.removeEventListener("bar") is undefined
-PASS window.addEventListener() is undefined
-PASS window.removeEventListener() is undefined
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/fast/dom/Window/window-legacy-event-listener.html (203376 => 203377)


--- trunk/LayoutTests/fast/dom/Window/window-legacy-event-listener.html	2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/fast/dom/Window/window-legacy-event-listener.html	2016-07-18 22:33:32 UTC (rev 203377)
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src=""
-</head>
-<body>
-<script>
-description("Test addEventListener() and removeEventListener() fail silently if arguments are missing.");
-
-shouldBe('window.addEventListener("foo")', 'undefined');
-shouldBe('window.removeEventListener("bar")', 'undefined');
-
-shouldBe('window.addEventListener()', 'undefined');
-shouldBe('window.removeEventListener()', 'undefined');
-</script>
-<script src=""
-</body>
-</html>

Deleted: trunk/LayoutTests/fast/dom/XMLHttpRequest-legacy-event-listener-expected.txt (203376 => 203377)


--- trunk/LayoutTests/fast/dom/XMLHttpRequest-legacy-event-listener-expected.txt	2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/fast/dom/XMLHttpRequest-legacy-event-listener-expected.txt	2016-07-18 22:33:32 UTC (rev 203377)
@@ -1,13 +0,0 @@
-Test addEventListener() and removeEventListener() fail silently if arguments are missing.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS new XMLHttpRequest().addEventListener("foo") is undefined
-PASS new XMLHttpRequest().removeEventListener("bar") is undefined
-PASS new XMLHttpRequest().addEventListener() is undefined
-PASS new XMLHttpRequest().removeEventListener() is undefined
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/fast/dom/XMLHttpRequest-legacy-event-listener.html (203376 => 203377)


--- trunk/LayoutTests/fast/dom/XMLHttpRequest-legacy-event-listener.html	2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/fast/dom/XMLHttpRequest-legacy-event-listener.html	2016-07-18 22:33:32 UTC (rev 203377)
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src=""
-</head>
-<body>
-<script>
-description("Test addEventListener() and removeEventListener() fail silently if arguments are missing.");
-
-shouldBe('new XMLHttpRequest().addEventListener("foo")', 'undefined');
-shouldBe('new XMLHttpRequest().removeEventListener("bar")', 'undefined');
-
-shouldBe('new XMLHttpRequest().addEventListener()', 'undefined');
-shouldBe('new XMLHttpRequest().removeEventListener()', 'undefined');
-</script>
-<script src=""
-</body>
-</html>

Added: trunk/LayoutTests/fast/dom/eventtarget-api-parameters-expected.txt (0 => 203377)


--- trunk/LayoutTests/fast/dom/eventtarget-api-parameters-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/eventtarget-api-parameters-expected.txt	2016-07-18 22:33:32 UTC (rev 203377)
@@ -0,0 +1,17 @@
+Tests that the 2 first parameters of addEventListener() / removeEventListener() are mandatory.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS addEventListener() threw exception TypeError: Not enough arguments.
+PASS addEventListener('load') threw exception TypeError: Not enough arguments.
+PASS removeEventListener() threw exception TypeError: Not enough arguments.
+PASS removeEventListener('load') threw exception TypeError: Not enough arguments.
+PASS addEventListener('load', null) did not throw exception.
+PASS addEventListener('load', undefined) did not throw exception.
+PASS removeEventListener('load', null) did not throw exception.
+PASS removeEventListener('load', undefined) did not throw exception.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/dom/eventtarget-api-parameters.html (0 => 203377)


--- trunk/LayoutTests/fast/dom/eventtarget-api-parameters.html	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/eventtarget-api-parameters.html	2016-07-18 22:33:32 UTC (rev 203377)
@@ -0,0 +1,21 @@
+<!DOCTYPE hml>
+<html>
+<body>
+<script src=""
+<script>
+description("Tests that the 2 first parameters of addEventListener() / removeEventListener() are mandatory.");
+
+shouldThrow("addEventListener()");
+shouldThrow("addEventListener('load')");
+shouldThrow("removeEventListener()");
+shouldThrow("removeEventListener('load')");
+
+// The second parameter should be nullable (no exception thrown).
+shouldNotThrow("addEventListener('load', null)");
+shouldNotThrow("addEventListener('load', undefined)");
+shouldNotThrow("removeEventListener('load', null)");
+shouldNotThrow("removeEventListener('load', undefined)");
+</script>
+<script src=""
+</body>
+</html>

Deleted: trunk/LayoutTests/fast/dom/node-legacy-event-listener-expected.txt (203376 => 203377)


--- trunk/LayoutTests/fast/dom/node-legacy-event-listener-expected.txt	2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/fast/dom/node-legacy-event-listener-expected.txt	2016-07-18 22:33:32 UTC (rev 203377)
@@ -1,13 +0,0 @@
-Test addEventListener() and removeEventListener() fail silently if arguments are missing.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS document.addEventListener("foo") is undefined
-PASS document.removeEventListener("bar") is undefined
-PASS document.addEventListener() is undefined
-PASS document.removeEventListener() is undefined
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/fast/dom/node-legacy-event-listener.html (203376 => 203377)


--- trunk/LayoutTests/fast/dom/node-legacy-event-listener.html	2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/fast/dom/node-legacy-event-listener.html	2016-07-18 22:33:32 UTC (rev 203377)
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src=""
-</head>
-<body>
-<script>
-description("Test addEventListener() and removeEventListener() fail silently if arguments are missing.");
-
-shouldBe('document.addEventListener("foo")', 'undefined');
-shouldBe('document.removeEventListener("bar")', 'undefined');
-
-shouldBe('document.addEventListener()', 'undefined');
-shouldBe('document.removeEventListener()', 'undefined');
-</script>
-<script src=""
-</body>
-</html>

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (203376 => 203377)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-07-18 22:33:32 UTC (rev 203377)
@@ -1,3 +1,16 @@
+2016-07-18  Chris Dumez  <cdu...@apple.com>
+
+        The 2 first parameters to addEventListener() / removeEventListener() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=158008
+
+        Reviewed by Darin Adler.
+
+        Rebaseline several W3C tests now that more checks are passing.
+
+        * web-platform-tests/XMLHttpRequest/interfaces-expected.txt:
+        * web-platform-tests/dom/interfaces-expected.txt:
+        * web-platform-tests/html/dom/interfaces-expected.txt:
+
 2016-07-18  Youenn Fablet  <you...@apple.com>
 
         [Streams API] ReadableStream should throw a RangeError in case of NaN highWaterMark

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/interfaces-expected.txt (203376 => 203377)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/interfaces-expected.txt	2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/interfaces-expected.txt	2016-07-18 22:33:32 UTC (rev 203377)
@@ -29,13 +29,9 @@
 PASS XMLHttpRequestEventTarget interface: (new XMLHttpRequest()).upload must inherit property "ontimeout" with the proper type (5) 
 PASS XMLHttpRequestEventTarget interface: (new XMLHttpRequest()).upload must inherit property "onloadend" with the proper type (6) 
 PASS EventTarget interface: (new XMLHttpRequest()).upload must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on (new XMLHttpRequest()).upload with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on (new XMLHttpRequest()).upload with too few arguments must throw TypeError 
 PASS EventTarget interface: (new XMLHttpRequest()).upload must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on (new XMLHttpRequest()).upload with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on (new XMLHttpRequest()).upload with too few arguments must throw TypeError 
 PASS EventTarget interface: (new XMLHttpRequest()).upload must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on (new XMLHttpRequest()).upload with too few arguments must throw TypeError 
 PASS XMLHttpRequest interface: existence and properties of interface object 
@@ -114,13 +110,9 @@
 PASS XMLHttpRequestEventTarget interface: new XMLHttpRequest() must inherit property "ontimeout" with the proper type (5) 
 PASS XMLHttpRequestEventTarget interface: new XMLHttpRequest() must inherit property "onloadend" with the proper type (6) 
 PASS EventTarget interface: new XMLHttpRequest() must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new XMLHttpRequest() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new XMLHttpRequest() with too few arguments must throw TypeError 
 PASS EventTarget interface: new XMLHttpRequest() must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new XMLHttpRequest() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new XMLHttpRequest() with too few arguments must throw TypeError 
 PASS EventTarget interface: new XMLHttpRequest() must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on new XMLHttpRequest() with too few arguments must throw TypeError 
 PASS FormData interface: existence and properties of interface object 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt (203376 => 203377)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt	2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt	2016-07-18 22:33:32 UTC (rev 203377)
@@ -437,13 +437,9 @@
 PASS Node interface: new Document() must inherit property "removeChild" with the proper type (45) 
 PASS Node interface: calling removeChild(Node) on new Document() with too few arguments must throw TypeError 
 PASS EventTarget interface: new Document() must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on new Document() with too few arguments must throw TypeError 
 PASS EventTarget interface: new Document() must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on new Document() with too few arguments must throw TypeError 
 PASS EventTarget interface: new Document() must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on new Document() with too few arguments must throw TypeError 
 PASS XMLDocument interface: existence and properties of interface object 
@@ -607,13 +603,9 @@
 PASS Node interface: xmlDoc must inherit property "removeChild" with the proper type (45) 
 PASS Node interface: calling removeChild(Node) on xmlDoc with too few arguments must throw TypeError 
 PASS EventTarget interface: xmlDoc must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on xmlDoc with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on xmlDoc with too few arguments must throw TypeError 
 PASS EventTarget interface: xmlDoc must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on xmlDoc with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on xmlDoc with too few arguments must throw TypeError 
 PASS EventTarget interface: xmlDoc must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on xmlDoc with too few arguments must throw TypeError 
 PASS DOMImplementation interface: existence and properties of interface object 
@@ -737,13 +729,9 @@
 PASS Node interface: document.doctype must inherit property "removeChild" with the proper type (45) 
 PASS Node interface: calling removeChild(Node) on document.doctype with too few arguments must throw TypeError 
 PASS EventTarget interface: document.doctype must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on document.doctype with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on document.doctype with too few arguments must throw TypeError 
 PASS EventTarget interface: document.doctype must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on document.doctype with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on document.doctype with too few arguments must throw TypeError 
 PASS EventTarget interface: document.doctype must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on document.doctype with too few arguments must throw TypeError 
 PASS DocumentFragment interface: existence and properties of interface object 
@@ -853,13 +841,9 @@
 PASS Node interface: document.createDocumentFragment() must inherit property "removeChild" with the proper type (45) 
 PASS Node interface: calling removeChild(Node) on document.createDocumentFragment() with too few arguments must throw TypeError 
 PASS EventTarget interface: document.createDocumentFragment() must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createDocumentFragment() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createDocumentFragment() with too few arguments must throw TypeError 
 PASS EventTarget interface: document.createDocumentFragment() must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createDocumentFragment() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createDocumentFragment() with too few arguments must throw TypeError 
 PASS EventTarget interface: document.createDocumentFragment() must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on document.createDocumentFragment() with too few arguments must throw TypeError 
 PASS ShadowRoot interface: existence and properties of interface object 
@@ -1100,13 +1084,9 @@
 PASS Node interface: element must inherit property "removeChild" with the proper type (45) 
 PASS Node interface: calling removeChild(Node) on element with too few arguments must throw TypeError 
 PASS EventTarget interface: element must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on element with too few arguments must throw TypeError 
 PASS EventTarget interface: element must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on element with too few arguments must throw TypeError 
 PASS EventTarget interface: element must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on element with too few arguments must throw TypeError 
 PASS NamedNodeMap interface: existence and properties of interface object 
@@ -1281,13 +1261,9 @@
 PASS Node interface: document.createTextNode("abc") must inherit property "removeChild" with the proper type (45) 
 PASS Node interface: calling removeChild(Node) on document.createTextNode("abc") with too few arguments must throw TypeError 
 PASS EventTarget interface: document.createTextNode("abc") must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createTextNode("abc") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createTextNode("abc") with too few arguments must throw TypeError 
 PASS EventTarget interface: document.createTextNode("abc") must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createTextNode("abc") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createTextNode("abc") with too few arguments must throw TypeError 
 PASS EventTarget interface: document.createTextNode("abc") must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on document.createTextNode("abc") with too few arguments must throw TypeError 
 PASS ProcessingInstruction interface: existence and properties of interface object 
@@ -1395,13 +1371,9 @@
 PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "removeChild" with the proper type (45) 
 PASS Node interface: calling removeChild(Node) on xmlDoc.createProcessingInstruction("abc", "def") with too few arguments must throw TypeError 
 PASS EventTarget interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on xmlDoc.createProcessingInstruction("abc", "def") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on xmlDoc.createProcessingInstruction("abc", "def") with too few arguments must throw TypeError 
 PASS EventTarget interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on xmlDoc.createProcessingInstruction("abc", "def") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on xmlDoc.createProcessingInstruction("abc", "def") with too few arguments must throw TypeError 
 PASS EventTarget interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on xmlDoc.createProcessingInstruction("abc", "def") with too few arguments must throw TypeError 
 PASS Comment interface: existence and properties of interface object 
@@ -1507,13 +1479,9 @@
 PASS Node interface: document.createComment("abc") must inherit property "removeChild" with the proper type (45) 
 PASS Node interface: calling removeChild(Node) on document.createComment("abc") with too few arguments must throw TypeError 
 PASS EventTarget interface: document.createComment("abc") must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createComment("abc") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createComment("abc") with too few arguments must throw TypeError 
 PASS EventTarget interface: document.createComment("abc") must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createComment("abc") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,[object Object],[object Object]) on document.createComment("abc") with too few arguments must throw TypeError 
 PASS EventTarget interface: document.createComment("abc") must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on document.createComment("abc") with too few arguments must throw TypeError 
 PASS Range interface: existence and properties of interface object 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (203376 => 203377)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2016-07-18 22:33:32 UTC (rev 203377)
@@ -418,13 +418,9 @@
 PASS Node interface: iframe.contentDocument must inherit property "removeChild" with the proper type (43) 
 PASS Node interface: calling removeChild(Node) on iframe.contentDocument with too few arguments must throw TypeError 
 PASS EventTarget interface: iframe.contentDocument must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on iframe.contentDocument with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on iframe.contentDocument with too few arguments must throw TypeError 
 PASS EventTarget interface: iframe.contentDocument must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on iframe.contentDocument with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on iframe.contentDocument with too few arguments must throw TypeError 
 PASS EventTarget interface: iframe.contentDocument must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on iframe.contentDocument with too few arguments must throw TypeError 
 PASS Document must be primary interface of new Document() 
@@ -724,13 +720,9 @@
 PASS Node interface: new Document() must inherit property "removeChild" with the proper type (43) 
 PASS Node interface: calling removeChild(Node) on new Document() with too few arguments must throw TypeError 
 PASS EventTarget interface: new Document() must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new Document() with too few arguments must throw TypeError 
 PASS EventTarget interface: new Document() must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new Document() with too few arguments must throw TypeError 
 PASS EventTarget interface: new Document() must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on new Document() with too few arguments must throw TypeError 
 FAIL XMLDocument interface: operation load(DOMString) assert_own_property: interface prototype object missing non-static operation expected property "load" missing
@@ -1033,13 +1025,9 @@
 PASS Node interface: document.implementation.createDocument(null, "", null) must inherit property "removeChild" with the proper type (43) 
 PASS Node interface: calling removeChild(Node) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError 
 PASS EventTarget interface: document.implementation.createDocument(null, "", null) must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError 
 PASS EventTarget interface: document.implementation.createDocument(null, "", null) must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError 
 PASS EventTarget interface: document.implementation.createDocument(null, "", null) must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError 
 FAIL MouseEvent interface: attribute region assert_true: The prototype object must have a property "region" expected true got false
@@ -1465,13 +1453,9 @@
 PASS Node interface: document.createElement("noscript") must inherit property "removeChild" with the proper type (43) 
 PASS Node interface: calling removeChild(Node) on document.createElement("noscript") with too few arguments must throw TypeError 
 PASS EventTarget interface: document.createElement("noscript") must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.createElement("noscript") with too few arguments must throw TypeError 
 PASS EventTarget interface: document.createElement("noscript") must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.createElement("noscript") with too few arguments must throw TypeError 
 PASS EventTarget interface: document.createElement("noscript") must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on document.createElement("noscript") with too few arguments must throw TypeError 
 PASS HTMLUnknownElement interface: existence and properties of interface object 
@@ -2441,13 +2425,9 @@
 FAIL MediaController interface: new MediaController() must inherit property "onratechange" with the proper type (27) assert_inherits: property "onratechange" not found in prototype chain
 FAIL MediaController interface: new MediaController() must inherit property "onvolumechange" with the proper type (28) assert_inherits: property "onvolumechange" not found in prototype chain
 PASS EventTarget interface: new MediaController() must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new MediaController() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new MediaController() with too few arguments must throw TypeError 
 PASS EventTarget interface: new MediaController() must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new MediaController() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new MediaController() with too few arguments must throw TypeError 
 PASS EventTarget interface: new MediaController() must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on new MediaController() with too few arguments must throw TypeError 
 PASS TextTrackList interface: existence and properties of interface object 
@@ -2469,13 +2449,9 @@
 PASS TextTrackList interface: document.createElement("video").textTracks must inherit property "onaddtrack" with the proper type (4) 
 PASS TextTrackList interface: document.createElement("video").textTracks must inherit property "onremovetrack" with the proper type (5) 
 PASS EventTarget interface: document.createElement("video").textTracks must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.createElement("video").textTracks with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.createElement("video").textTracks with too few arguments must throw TypeError 
 PASS EventTarget interface: document.createElement("video").textTracks must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.createElement("video").textTracks with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.createElement("video").textTracks with too few arguments must throw TypeError 
 PASS EventTarget interface: document.createElement("video").textTracks must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on document.createElement("video").textTracks with too few arguments must throw TypeError 
 PASS TextTrack interface: existence and properties of interface object 
@@ -2514,13 +2490,9 @@
 PASS TextTrack interface: calling removeCue(TextTrackCue) on document.createElement("track").track with too few arguments must throw TypeError 
 PASS TextTrack interface: document.createElement("track").track must inherit property "oncuechange" with the proper type (10) 
 PASS EventTarget interface: document.createElement("track").track must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.createElement("track").track with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.createElement("track").track with too few arguments must throw TypeError 
 PASS EventTarget interface: document.createElement("track").track must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.createElement("track").track with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.createElement("track").track with too few arguments must throw TypeError 
 PASS EventTarget interface: document.createElement("track").track must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on document.createElement("track").track with too few arguments must throw TypeError 
 PASS TextTrackCueList interface: existence and properties of interface object 
@@ -5694,13 +5666,9 @@
 PASS Window interface: window must inherit property "sessionStorage" with the proper type (123) 
 PASS Window interface: window must inherit property "localStorage" with the proper type (124) 
 PASS EventTarget interface: window must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on window with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on window with too few arguments must throw TypeError 
 PASS EventTarget interface: window must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on window with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on window with too few arguments must throw TypeError 
 PASS EventTarget interface: window must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on window with too few arguments must throw TypeError 
 PASS BarProp interface: existence and properties of interface object 
@@ -5859,13 +5827,9 @@
 PASS ApplicationCache interface: window.applicationCache must inherit property "oncached" with the proper type (16) 
 PASS ApplicationCache interface: window.applicationCache must inherit property "onobsolete" with the proper type (17) 
 PASS EventTarget interface: window.applicationCache must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on window.applicationCache with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on window.applicationCache with too few arguments must throw TypeError 
 PASS EventTarget interface: window.applicationCache must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on window.applicationCache with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on window.applicationCache with too few arguments must throw TypeError 
 PASS EventTarget interface: window.applicationCache must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on window.applicationCache with too few arguments must throw TypeError 
 PASS ErrorEvent interface: existence and properties of interface object 
@@ -6076,13 +6040,9 @@
 PASS WebSocket interface: new WebSocket("ws://foo") must inherit property "send" with the proper type (18) 
 PASS WebSocket interface: calling send(ArrayBufferView) on new WebSocket("ws://foo") with too few arguments must throw TypeError 
 PASS EventTarget interface: new WebSocket("ws://foo") must inherit property "addEventListener" with the proper type (0) 
-FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new WebSocket("ws://foo") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new WebSocket("ws://foo") with too few arguments must throw TypeError 
 PASS EventTarget interface: new WebSocket("ws://foo") must inherit property "removeEventListener" with the proper type (1) 
-FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new WebSocket("ws://foo") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new WebSocket("ws://foo") with too few arguments must throw TypeError 
 PASS EventTarget interface: new WebSocket("ws://foo") must inherit property "dispatchEvent" with the proper type (2) 
 PASS EventTarget interface: calling dispatchEvent(Event) on new WebSocket("ws://foo") with too few arguments must throw TypeError 
 PASS CloseEvent interface: existence and properties of interface object 

Modified: trunk/LayoutTests/media/video-remote-control-playpause.html (203376 => 203377)


--- trunk/LayoutTests/media/video-remote-control-playpause.html	2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/LayoutTests/media/video-remote-control-playpause.html	2016-07-18 22:33:32 UTC (rev 203377)
@@ -131,7 +131,6 @@
                     video.addEventListener('playing', playing);
                     video.addEventListener('pause', pause);
                     video.addEventListener('seeked', seeked);
-                    video.addEventListener('ended');
                     video.src = "" "content/test");
                 }
             }

Modified: trunk/Source/WebCore/ChangeLog (203376 => 203377)


--- trunk/Source/WebCore/ChangeLog	2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/Source/WebCore/ChangeLog	2016-07-18 22:33:32 UTC (rev 203377)
@@ -1,3 +1,25 @@
+2016-07-18  Chris Dumez  <cdu...@apple.com>
+
+        The 2 first parameters to addEventListener() / removeEventListener() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=158008
+
+        Reviewed by Darin Adler.
+
+        The 2 first parameters to addEventListener() / removeEventListener() should be
+        mandatory:
+        - https://dom.spec.whatwg.org/#interface-eventtarget
+
+        Firefox 46 and Chrome 50 both match the specification and throw an exception when those
+        parameters are omitted. However, those parameters were marked as optional in WebKit and
+        the calls were no-ops if those parameters were omitted. This patch aligns our behavior
+        with the specification and other browsers.
+
+        Test: fast/dom/eventtarget-api-parameters.html
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GetFunctionLength): Deleted.
+        * dom/EventTarget.idl:
+
 2016-07-18  Brent Fulgham  <bfulg...@apple.com>
 
         Unreviewed, rolling out r203373.

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (203376 => 203377)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-07-18 22:33:32 UTC (rev 203377)
@@ -1722,9 +1722,6 @@
 {
     my $function = shift;
 
-    # FIXME: EventTarget.addEventListener() / removeEventListener() currently specifies all the parameters as optional.
-    return 2 if $function->signature->name eq "addEventListener" || $function->signature->name eq "removeEventListener";
-
     my $length = 0;
     foreach my $parameter (@{$function->parameters}) {
         # Abort as soon as we find the first optional parameter as no mandatory

Modified: trunk/Source/WebCore/dom/EventTarget.idl (203376 => 203377)


--- trunk/Source/WebCore/dom/EventTarget.idl	2016-07-18 22:20:50 UTC (rev 203376)
+++ trunk/Source/WebCore/dom/EventTarget.idl	2016-07-18 22:33:32 UTC (rev 203377)
@@ -31,9 +31,8 @@
     [ImplementedAs=removeEventListenerForBindings] void removeEventListener([AtomicString] DOMString type, EventListener? listener, optional EventListenerOptions options);
 #endif
 
-    // FIXME: The 'type' and 'listener' parameters should not be optional.
-    [ObjCLegacyUnnamedParameters, ImplementedAs=addEventListenerForBindings] void addEventListener([AtomicString] optional DOMString type = "undefined", optional EventListener? listener, optional boolean useCapture = false);
-    [ObjCLegacyUnnamedParameters, ImplementedAs=removeEventListenerForBindings] void removeEventListener([AtomicString] optional DOMString type = "undefined", optional EventListener? listener, optional boolean useCapture = false);
+    [ObjCLegacyUnnamedParameters, ImplementedAs=addEventListenerForBindings] void addEventListener([AtomicString] DOMString type, EventListener? listener, optional boolean useCapture = false);
+    [ObjCLegacyUnnamedParameters, ImplementedAs=removeEventListenerForBindings] void removeEventListener([AtomicString] DOMString type, EventListener? listener, optional boolean useCapture = false);
 
     // FIXME: event should not be nullable.
     [ImplementedAs=dispatchEventForBindings, RaisesException] boolean dispatchEvent(Event? event);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to