Title: [279406] trunk
Revision
279406
Author
[email protected]
Date
2021-06-30 03:18:26 -0700 (Wed, 30 Jun 2021)

Log Message

Implement support for <dialog> element close event
https://bugs.webkit.org/show_bug.cgi?id=227493

Reviewed by Antti Koivisto.

With this change, the m_isOpen flag of HTMLDialogElement is only changed on attribute change, so attribute changes can
be detected more easily to fire this new "close" event.

Test: web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close.html
Adjusted existing test expectations for new `close` event.

LayoutTests/imported/w3c:

* web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt:
* web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt:
* web-platform-tests/html/dom/idlharness.https-expected.txt:
* web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt:

Source/WebCore:

* dom/GlobalEventHandlers.idl:
* html/HTMLAttributeNames.in:
* html/HTMLDialogElement.cpp:
(WebCore::dialogCloseEventSender):
(WebCore::HTMLDialogElement::~HTMLDialogElement):
(WebCore::HTMLDialogElement::show):
(WebCore::HTMLDialogElement::showModal):
(WebCore::HTMLDialogElement::close):
(WebCore::HTMLDialogElement::dispatchPendingEvent):
(WebCore::HTMLDialogElement::parseAttribute):
(WebCore::HTMLDialogElement::setOpen):
(WebCore::HTMLDialogElement::toggleOpen): Deleted.
* html/HTMLDialogElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::createEventHandlerNameMap):

LayoutTests:

* platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
* platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
* platform/ios-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
* platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
* platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (279405 => 279406)


--- trunk/LayoutTests/ChangeLog	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/ChangeLog	2021-06-30 10:18:26 UTC (rev 279406)
@@ -1,3 +1,26 @@
+2021-06-30  Tim Nguyen  <[email protected]>
+
+        Implement support for <dialog> element close event
+        https://bugs.webkit.org/show_bug.cgi?id=227493
+
+        Reviewed by Antti Koivisto.
+
+        With this change, the m_isOpen flag of HTMLDialogElement is only changed on attribute change, so attribute changes can
+        be detected more easily to fire this new "close" event.
+
+        Test: web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close.html
+        Adjusted existing test expectations for new `close` event.
+
+        * platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
+        * platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
+        * platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
+        * platform/ios-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
+        * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
+        * platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
+        * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
+        * platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
+        * platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
+
 2021-06-30  Youenn Fablet  <[email protected]>
 
         [Cocoa] Migrate WebRTC UDP socket handling to NW API

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (279405 => 279406)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-06-30 10:18:26 UTC (rev 279406)
@@ -1,3 +1,25 @@
+2021-06-30  Tim Nguyen  <[email protected]>
+
+        Implement support for <dialog> element close event
+        https://bugs.webkit.org/show_bug.cgi?id=227493
+
+        Reviewed by Antti Koivisto.
+
+        With this change, the m_isOpen flag of HTMLDialogElement is only changed on attribute change, so attribute changes can
+        be detected more easily to fire this new "close" event.
+
+        Test: web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close.html
+        Adjusted existing test expectations for new `close` event.
+
+        * web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt:
+        * web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt:
+        * web-platform-tests/html/dom/idlharness.https-expected.txt:
+        * web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt:
+        * web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events-expected.txt:
+        * web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt:
+        * web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt:
+
 2021-06-30  Youenn Fablet  <[email protected]>
 
         [Cocoa] Migrate WebRTC UDP socket handling to NW API

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt (279405 => 279406)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -23,7 +23,7 @@
 PASS A SecurityError exception must be thrown when window.oncanplaythrough is accessed from a different origin.
 PASS A SecurityError exception must be thrown when window.onchange is accessed from a different origin.
 PASS A SecurityError exception must be thrown when window.onclick is accessed from a different origin.
-FAIL A SecurityError exception must be thrown when window.onclose is accessed from a different origin. assert_true: window.onclose should exist. expected true got false
+PASS A SecurityError exception must be thrown when window.onclose is accessed from a different origin.
 PASS A SecurityError exception must be thrown when window.oncontextmenu is accessed from a different origin.
 PASS A SecurityError exception must be thrown when window.oncuechange is accessed from a different origin.
 PASS A SecurityError exception must be thrown when window.ondblclick is accessed from a different origin.

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt (279405 => 279406)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -85,7 +85,7 @@
 PASS Window attribute: oncanplaythrough
 PASS Window attribute: onchange
 PASS Window attribute: onclick
-FAIL Window attribute: onclose assert_true: onclose in window expected true got false
+PASS Window attribute: onclose
 PASS Window attribute: oncontextmenu
 PASS Window attribute: oncuechange
 PASS Window attribute: ondblclick

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (279405 => 279406)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -134,7 +134,7 @@
 PASS HTMLElement interface: attribute oncanplaythrough
 PASS HTMLElement interface: attribute onchange
 PASS HTMLElement interface: attribute onclick
-FAIL HTMLElement interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS HTMLElement interface: attribute onclose
 PASS HTMLElement interface: attribute oncontextmenu
 PASS HTMLElement interface: attribute oncuechange
 PASS HTMLElement interface: attribute ondblclick
@@ -224,7 +224,7 @@
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplaythrough" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onchange" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onclick" with the proper type
-FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS HTMLElement interface: document.createElement("noscript") must inherit property "onclose" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncontextmenu" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncuechange" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "ondblclick" with the proper type
@@ -4193,7 +4193,7 @@
 PASS Window interface: attribute oncanplaythrough
 PASS Window interface: attribute onchange
 PASS Window interface: attribute onclick
-FAIL Window interface: attribute onclose assert_own_property: The global object must have a property "onclose" expected property "onclose" missing
+PASS Window interface: attribute onclose
 PASS Window interface: attribute oncontextmenu
 PASS Window interface: attribute oncuechange
 PASS Window interface: attribute ondblclick
@@ -4337,7 +4337,7 @@
 PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
 PASS Window interface: window must inherit property "onchange" with the proper type
 PASS Window interface: window must inherit property "onclick" with the proper type
-FAIL Window interface: window must inherit property "onclose" with the proper type assert_own_property: expected property "onclose" missing
+PASS Window interface: window must inherit property "onclose" with the proper type
 PASS Window interface: window must inherit property "oncontextmenu" with the proper type
 PASS Window interface: window must inherit property "oncuechange" with the proper type
 PASS Window interface: window must inherit property "ondblclick" with the proper type
@@ -5038,7 +5038,7 @@
 PASS SVGElement interface: attribute oncanplaythrough
 PASS SVGElement interface: attribute onchange
 PASS SVGElement interface: attribute onclick
-FAIL SVGElement interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS SVGElement interface: attribute onclose
 PASS SVGElement interface: attribute oncontextmenu
 PASS SVGElement interface: attribute oncuechange
 PASS SVGElement interface: attribute ondblclick
@@ -5180,7 +5180,7 @@
 PASS Document interface: attribute oncanplaythrough
 PASS Document interface: attribute onchange
 PASS Document interface: attribute onclick
-FAIL Document interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS Document interface: attribute onclose
 PASS Document interface: attribute oncontextmenu
 PASS Document interface: attribute oncuechange
 PASS Document interface: attribute ondblclick
@@ -5301,7 +5301,7 @@
 PASS Document interface: iframe.contentDocument must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "onchange" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "onclick" with the proper type
-FAIL Document interface: iframe.contentDocument must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS Document interface: iframe.contentDocument must inherit property "onclose" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncontextmenu" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncuechange" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "ondblclick" with the proper type
@@ -5422,7 +5422,7 @@
 PASS Document interface: new Document() must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: new Document() must inherit property "onchange" with the proper type
 PASS Document interface: new Document() must inherit property "onclick" with the proper type
-FAIL Document interface: new Document() must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS Document interface: new Document() must inherit property "onclose" with the proper type
 PASS Document interface: new Document() must inherit property "oncontextmenu" with the proper type
 PASS Document interface: new Document() must inherit property "oncuechange" with the proper type
 PASS Document interface: new Document() must inherit property "ondblclick" with the proper type
@@ -5543,7 +5543,7 @@
 PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onchange" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onclick" with the proper type
-FAIL Document interface: documentWithHandlers must inherit property "onclose" with the proper type assert_inherits: property "onclose" found on object expected in prototype chain
+PASS Document interface: documentWithHandlers must inherit property "onclose" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncontextmenu" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncuechange" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "ondblclick" with the proper type

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt (279405 => 279406)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -1,7 +1,5 @@
 
-Harness Error (TIMEOUT), message = null
-
-TIMEOUT close() fires a close event Test timed out
+PASS close() fires a close event
 PASS close() on a <dialog> that doesn't have an open attribute aborts the steps
 PASS close() removes the open attribute and set the returnValue to the first argument
 PASS close() without argument removes the open attribute and there's no returnValue

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events-expected.txt (279405 => 279406)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -39,10 +39,10 @@
 PASS onclick: the content attribute must be compiled into a function as the corresponding property
 PASS onclick: the content attribute must execute when an event is dispatched
 PASS onclick: dispatching an Event at a <meta> element must trigger element.onclick
-FAIL onclose: must be on the appropriate locations for GlobalEventHandlers assert_true: Window has an own property named "onclose" expected true got false
-FAIL onclose: the default value must be null assert_equals: The default value of the property is null for a Window instance expected (object) null but got (undefined) undefined
-FAIL onclose: the content attribute must be compiled into a function as the corresponding property assert_equals: The onclose property must be a function expected "function" but got "undefined"
-FAIL onclose: the content attribute must execute when an event is dispatched assert_true: Dispatching an event must run the code expected true got undefined
+PASS onclose: must be on the appropriate locations for GlobalEventHandlers
+PASS onclose: the default value must be null
+PASS onclose: the content attribute must be compiled into a function as the corresponding property
+PASS onclose: the content attribute must execute when an event is dispatched
 PASS onclose: dispatching an Event at a <meta> element must trigger element.onclose
 PASS oncontextmenu: must be on the appropriate locations for GlobalEventHandlers
 PASS oncontextmenu: the default value must be null

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt (279405 => 279406)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -28,7 +28,7 @@
 PASS not shadowed canplaythrough (document.body)
 PASS not shadowed change (document.body)
 PASS not shadowed click (document.body)
-FAIL not shadowed close (document.body) assert_equals: alternative body should reflect expected (object) null but got (undefined) undefined
+PASS not shadowed close (document.body)
 PASS not shadowed contextmenu (document.body)
 PASS not shadowed cuechange (document.body)
 PASS not shadowed dblclick (document.body)
@@ -135,7 +135,7 @@
 PASS not shadowed canplaythrough (document.createElement("body"))
 PASS not shadowed change (document.createElement("body"))
 PASS not shadowed click (document.createElement("body"))
-FAIL not shadowed close (document.createElement("body")) assert_equals: body should reflect expected (object) null but got (undefined) undefined
+PASS not shadowed close (document.createElement("body"))
 PASS not shadowed contextmenu (document.createElement("body"))
 PASS not shadowed cuechange (document.createElement("body"))
 PASS not shadowed dblclick (document.createElement("body"))
@@ -242,7 +242,7 @@
 PASS not shadowed canplaythrough (window)
 PASS not shadowed change (window)
 PASS not shadowed click (window)
-FAIL not shadowed close (window) assert_equals: body should reflect expected (object) null but got (undefined) undefined
+PASS not shadowed close (window)
 PASS not shadowed contextmenu (window)
 PASS not shadowed cuechange (window)
 PASS not shadowed dblclick (window)

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt (279405 => 279406)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -50,7 +50,7 @@
 PASS canplaythrough is unaffected on a windowless body
 PASS change is unaffected on a windowless body
 PASS click is unaffected on a windowless body
-FAIL close is unaffected on a windowless body assert_equals: expected (object) null but got (undefined) undefined
+PASS close is unaffected on a windowless body
 PASS contextmenu is unaffected on a windowless body
 PASS cuechange is unaffected on a windowless body
 PASS dblclick is unaffected on a windowless body
@@ -157,7 +157,7 @@
 PASS canplaythrough is unaffected on a windowless frameset
 PASS change is unaffected on a windowless frameset
 PASS click is unaffected on a windowless frameset
-FAIL close is unaffected on a windowless frameset assert_equals: expected (object) null but got (undefined) undefined
+PASS close is unaffected on a windowless frameset
 PASS contextmenu is unaffected on a windowless frameset
 PASS cuechange is unaffected on a windowless frameset
 PASS dblclick is unaffected on a windowless frameset

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt (279405 => 279406)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -39,11 +39,11 @@
 PASS onclick: the content attribute must be compiled into a function as the corresponding property
 PASS onclick: dynamic changes on the attribute
 PASS onclick: dispatching an Event at a <math> element must trigger element.onclick
-FAIL onclose: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "onclose" expected true got false
-FAIL onclose: the default value must be null assert_equals: The default value of the property is null for a MathMLMathElement instance expected (object) null but got (undefined) undefined
-FAIL onclose: the content attribute must be compiled into a function as the corresponding property assert_equals: The onclose property must be a function expected "function" but got "undefined"
-FAIL onclose: dynamic changes on the attribute assert_equals: The onclose property must be null (no attribute) expected (object) null but got (undefined) undefined
-FAIL onclose: dispatching an Event at a <math> element must trigger element.onclose assert_equals: The event must be fired at the <math> element expected (object) Element node <math></math> but got (undefined) undefined
+PASS onclose: must be on the appropriate locations for GlobalEventHandlers
+PASS onclose: the default value must be null
+PASS onclose: the content attribute must be compiled into a function as the corresponding property
+PASS onclose: dynamic changes on the attribute
+PASS onclose: dispatching an Event at a <math> element must trigger element.onclose
 PASS oncontextmenu: must be on the appropriate locations for GlobalEventHandlers
 PASS oncontextmenu: the default value must be null
 PASS oncontextmenu: the content attribute must be compiled into a function as the corresponding property

Modified: trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt (279405 => 279406)


--- trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -39,11 +39,11 @@
 PASS onclick: the content attribute must be compiled into a function as the corresponding property
 PASS onclick: dynamic changes on the attribute
 PASS onclick: dispatching an Event at a <math> element must trigger element.onclick
-FAIL onclose: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "onclose" expected true got false
-FAIL onclose: the default value must be null assert_equals: The default value of the property is null for a MathMLMathElement instance expected (object) null but got (undefined) undefined
-FAIL onclose: the content attribute must be compiled into a function as the corresponding property assert_equals: The onclose property must be a function expected "function" but got "undefined"
-FAIL onclose: dynamic changes on the attribute assert_equals: The onclose property must be null (no attribute) expected (object) null but got (undefined) undefined
-FAIL onclose: dispatching an Event at a <math> element must trigger element.onclose assert_equals: The event must be fired at the <math> element expected (object) Element node <math></math> but got (undefined) undefined
+PASS onclose: must be on the appropriate locations for GlobalEventHandlers
+PASS onclose: the default value must be null
+PASS onclose: the content attribute must be compiled into a function as the corresponding property
+PASS onclose: dynamic changes on the attribute
+PASS onclose: dispatching an Event at a <math> element must trigger element.onclose
 PASS oncontextmenu: must be on the appropriate locations for GlobalEventHandlers
 PASS oncontextmenu: the default value must be null
 PASS oncontextmenu: the content attribute must be compiled into a function as the corresponding property

Modified: trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (279405 => 279406)


--- trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -266,7 +266,7 @@
 PASS HTMLElement interface: attribute oncanplaythrough
 PASS HTMLElement interface: attribute onchange
 PASS HTMLElement interface: attribute onclick
-FAIL HTMLElement interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS HTMLElement interface: attribute onclose
 PASS HTMLElement interface: attribute oncontextmenu
 PASS HTMLElement interface: attribute oncuechange
 PASS HTMLElement interface: attribute ondblclick
@@ -360,7 +360,7 @@
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplaythrough" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onchange" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onclick" with the proper type
-FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS HTMLElement interface: document.createElement("noscript") must inherit property "onclose" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncontextmenu" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncuechange" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "ondblclick" with the proper type
@@ -4351,7 +4351,7 @@
 PASS Window interface: attribute oncanplaythrough
 PASS Window interface: attribute onchange
 PASS Window interface: attribute onclick
-FAIL Window interface: attribute onclose assert_own_property: The global object must have a property "onclose" expected property "onclose" missing
+PASS Window interface: attribute onclose
 PASS Window interface: attribute oncontextmenu
 PASS Window interface: attribute oncuechange
 PASS Window interface: attribute ondblclick
@@ -4502,7 +4502,7 @@
 PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
 PASS Window interface: window must inherit property "onchange" with the proper type
 PASS Window interface: window must inherit property "onclick" with the proper type
-FAIL Window interface: window must inherit property "onclose" with the proper type assert_own_property: expected property "onclose" missing
+PASS Window interface: window must inherit property "onclose" with the proper type
 PASS Window interface: window must inherit property "oncontextmenu" with the proper type
 PASS Window interface: window must inherit property "oncuechange" with the proper type
 PASS Window interface: window must inherit property "ondblclick" with the proper type
@@ -5273,7 +5273,7 @@
 PASS SVGElement interface: attribute oncanplaythrough
 PASS SVGElement interface: attribute onchange
 PASS SVGElement interface: attribute onclick
-FAIL SVGElement interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS SVGElement interface: attribute onclose
 PASS SVGElement interface: attribute oncontextmenu
 PASS SVGElement interface: attribute oncuechange
 PASS SVGElement interface: attribute ondblclick
@@ -5407,7 +5407,7 @@
 PASS Document interface: attribute oncanplaythrough
 PASS Document interface: attribute onchange
 PASS Document interface: attribute onclick
-FAIL Document interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS Document interface: attribute onclose
 PASS Document interface: attribute oncontextmenu
 PASS Document interface: attribute oncuechange
 PASS Document interface: attribute ondblclick
@@ -5532,7 +5532,7 @@
 PASS Document interface: iframe.contentDocument must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "onchange" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "onclick" with the proper type
-FAIL Document interface: iframe.contentDocument must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS Document interface: iframe.contentDocument must inherit property "onclose" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncontextmenu" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncuechange" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "ondblclick" with the proper type
@@ -5657,7 +5657,7 @@
 PASS Document interface: new Document() must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: new Document() must inherit property "onchange" with the proper type
 PASS Document interface: new Document() must inherit property "onclick" with the proper type
-FAIL Document interface: new Document() must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS Document interface: new Document() must inherit property "onclose" with the proper type
 PASS Document interface: new Document() must inherit property "oncontextmenu" with the proper type
 PASS Document interface: new Document() must inherit property "oncuechange" with the proper type
 PASS Document interface: new Document() must inherit property "ondblclick" with the proper type
@@ -5782,7 +5782,7 @@
 PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onchange" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onclick" with the proper type
-FAIL Document interface: documentWithHandlers must inherit property "onclose" with the proper type assert_inherits: property "onclose" found on object expected in prototype chain
+PASS Document interface: documentWithHandlers must inherit property "onclose" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncontextmenu" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncuechange" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "ondblclick" with the proper type

Modified: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (279405 => 279406)


--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -268,7 +268,7 @@
 PASS HTMLElement interface: attribute oncanplaythrough
 PASS HTMLElement interface: attribute onchange
 PASS HTMLElement interface: attribute onclick
-FAIL HTMLElement interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS HTMLElement interface: attribute onclose
 PASS HTMLElement interface: attribute oncontextmenu
 PASS HTMLElement interface: attribute oncuechange
 PASS HTMLElement interface: attribute ondblclick
@@ -363,7 +363,7 @@
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplaythrough" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onchange" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onclick" with the proper type
-FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS HTMLElement interface: document.createElement("noscript") must inherit property "onclose" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncontextmenu" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncuechange" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "ondblclick" with the proper type
@@ -4377,7 +4377,7 @@
 PASS Window interface: attribute oncanplaythrough
 PASS Window interface: attribute onchange
 PASS Window interface: attribute onclick
-FAIL Window interface: attribute onclose assert_own_property: The global object must have a property "onclose" expected property "onclose" missing
+PASS Window interface: attribute onclose
 PASS Window interface: attribute oncontextmenu
 PASS Window interface: attribute oncuechange
 PASS Window interface: attribute ondblclick
@@ -4527,7 +4527,7 @@
 PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
 PASS Window interface: window must inherit property "onchange" with the proper type
 PASS Window interface: window must inherit property "onclick" with the proper type
-FAIL Window interface: window must inherit property "onclose" with the proper type assert_own_property: expected property "onclose" missing
+PASS Window interface: window must inherit property "onclose" with the proper type
 PASS Window interface: window must inherit property "oncontextmenu" with the proper type
 PASS Window interface: window must inherit property "oncuechange" with the proper type
 PASS Window interface: window must inherit property "ondblclick" with the proper type
@@ -5242,7 +5242,7 @@
 PASS SVGElement interface: attribute oncanplaythrough
 PASS SVGElement interface: attribute onchange
 PASS SVGElement interface: attribute onclick
-FAIL SVGElement interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS SVGElement interface: attribute onclose
 PASS SVGElement interface: attribute oncontextmenu
 PASS SVGElement interface: attribute oncuechange
 PASS SVGElement interface: attribute ondblclick
@@ -5376,7 +5376,7 @@
 PASS Document interface: attribute oncanplaythrough
 PASS Document interface: attribute onchange
 PASS Document interface: attribute onclick
-FAIL Document interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS Document interface: attribute onclose
 PASS Document interface: attribute oncontextmenu
 PASS Document interface: attribute oncuechange
 PASS Document interface: attribute ondblclick
@@ -5501,7 +5501,7 @@
 PASS Document interface: iframe.contentDocument must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "onchange" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "onclick" with the proper type
-FAIL Document interface: iframe.contentDocument must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS Document interface: iframe.contentDocument must inherit property "onclose" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncontextmenu" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncuechange" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "ondblclick" with the proper type
@@ -5626,7 +5626,7 @@
 PASS Document interface: new Document() must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: new Document() must inherit property "onchange" with the proper type
 PASS Document interface: new Document() must inherit property "onclick" with the proper type
-FAIL Document interface: new Document() must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS Document interface: new Document() must inherit property "onclose" with the proper type
 PASS Document interface: new Document() must inherit property "oncontextmenu" with the proper type
 PASS Document interface: new Document() must inherit property "oncuechange" with the proper type
 PASS Document interface: new Document() must inherit property "ondblclick" with the proper type
@@ -5751,7 +5751,7 @@
 PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onchange" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onclick" with the proper type
-FAIL Document interface: documentWithHandlers must inherit property "onclose" with the proper type assert_inherits: property "onclose" found on object expected in prototype chain
+PASS Document interface: documentWithHandlers must inherit property "onclose" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncontextmenu" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncuechange" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "ondblclick" with the proper type

Modified: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt (279405 => 279406)


--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -39,11 +39,11 @@
 PASS onclick: the content attribute must be compiled into a function as the corresponding property
 PASS onclick: dynamic changes on the attribute
 PASS onclick: dispatching an Event at a <math> element must trigger element.onclick
-FAIL onclose: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "onclose" expected true got false
-FAIL onclose: the default value must be null assert_equals: The default value of the property is null for a MathMLMathElement instance expected (object) null but got (undefined) undefined
-FAIL onclose: the content attribute must be compiled into a function as the corresponding property assert_equals: The onclose property must be a function expected "function" but got "undefined"
-FAIL onclose: dynamic changes on the attribute assert_equals: The onclose property must be null (no attribute) expected (object) null but got (undefined) undefined
-FAIL onclose: dispatching an Event at a <math> element must trigger element.onclose assert_equals: The event must be fired at the <math> element expected (object) Element node <math></math> but got (undefined) undefined
+PASS onclose: must be on the appropriate locations for GlobalEventHandlers
+PASS onclose: the default value must be null
+PASS onclose: the content attribute must be compiled into a function as the corresponding property
+PASS onclose: dynamic changes on the attribute
+PASS onclose: dispatching an Event at a <math> element must trigger element.onclose
 PASS oncontextmenu: must be on the appropriate locations for GlobalEventHandlers
 PASS oncontextmenu: the default value must be null
 PASS oncontextmenu: the content attribute must be compiled into a function as the corresponding property

Modified: trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (279405 => 279406)


--- trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -268,7 +268,7 @@
 PASS HTMLElement interface: attribute oncanplaythrough
 PASS HTMLElement interface: attribute onchange
 PASS HTMLElement interface: attribute onclick
-FAIL HTMLElement interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS HTMLElement interface: attribute onclose
 PASS HTMLElement interface: attribute oncontextmenu
 PASS HTMLElement interface: attribute oncuechange
 PASS HTMLElement interface: attribute ondblclick
@@ -363,7 +363,7 @@
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplaythrough" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onchange" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onclick" with the proper type
-FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS HTMLElement interface: document.createElement("noscript") must inherit property "onclose" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncontextmenu" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncuechange" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "ondblclick" with the proper type
@@ -4387,7 +4387,7 @@
 PASS Window interface: attribute oncanplaythrough
 PASS Window interface: attribute onchange
 PASS Window interface: attribute onclick
-FAIL Window interface: attribute onclose assert_own_property: The global object must have a property "onclose" expected property "onclose" missing
+PASS Window interface: attribute onclose
 PASS Window interface: attribute oncontextmenu
 PASS Window interface: attribute oncuechange
 PASS Window interface: attribute ondblclick
@@ -4537,7 +4537,7 @@
 PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
 PASS Window interface: window must inherit property "onchange" with the proper type
 PASS Window interface: window must inherit property "onclick" with the proper type
-FAIL Window interface: window must inherit property "onclose" with the proper type assert_own_property: expected property "onclose" missing
+PASS Window interface: window must inherit property "onclose" with the proper type
 PASS Window interface: window must inherit property "oncontextmenu" with the proper type
 PASS Window interface: window must inherit property "oncuechange" with the proper type
 PASS Window interface: window must inherit property "ondblclick" with the proper type
@@ -5252,7 +5252,7 @@
 PASS SVGElement interface: attribute oncanplaythrough
 PASS SVGElement interface: attribute onchange
 PASS SVGElement interface: attribute onclick
-FAIL SVGElement interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS SVGElement interface: attribute onclose
 PASS SVGElement interface: attribute oncontextmenu
 PASS SVGElement interface: attribute oncuechange
 PASS SVGElement interface: attribute ondblclick
@@ -5386,7 +5386,7 @@
 PASS Document interface: attribute oncanplaythrough
 PASS Document interface: attribute onchange
 PASS Document interface: attribute onclick
-FAIL Document interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS Document interface: attribute onclose
 PASS Document interface: attribute oncontextmenu
 PASS Document interface: attribute oncuechange
 PASS Document interface: attribute ondblclick
@@ -5511,7 +5511,7 @@
 PASS Document interface: iframe.contentDocument must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "onchange" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "onclick" with the proper type
-FAIL Document interface: iframe.contentDocument must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS Document interface: iframe.contentDocument must inherit property "onclose" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncontextmenu" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncuechange" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "ondblclick" with the proper type
@@ -5636,7 +5636,7 @@
 PASS Document interface: new Document() must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: new Document() must inherit property "onchange" with the proper type
 PASS Document interface: new Document() must inherit property "onclick" with the proper type
-FAIL Document interface: new Document() must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS Document interface: new Document() must inherit property "onclose" with the proper type
 PASS Document interface: new Document() must inherit property "oncontextmenu" with the proper type
 PASS Document interface: new Document() must inherit property "oncuechange" with the proper type
 PASS Document interface: new Document() must inherit property "ondblclick" with the proper type
@@ -5761,7 +5761,7 @@
 PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onchange" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onclick" with the proper type
-FAIL Document interface: documentWithHandlers must inherit property "onclose" with the proper type assert_inherits: property "onclose" found on object expected in prototype chain
+PASS Document interface: documentWithHandlers must inherit property "onclose" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncontextmenu" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncuechange" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "ondblclick" with the proper type

Modified: trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt (279405 => 279406)


--- trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -39,11 +39,11 @@
 PASS onclick: the content attribute must be compiled into a function as the corresponding property
 PASS onclick: dynamic changes on the attribute
 PASS onclick: dispatching an Event at a <math> element must trigger element.onclick
-FAIL onclose: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "onclose" expected true got false
-FAIL onclose: the default value must be null assert_equals: The default value of the property is null for a MathMLMathElement instance expected (object) null but got (undefined) undefined
-FAIL onclose: the content attribute must be compiled into a function as the corresponding property assert_equals: The onclose property must be a function expected "function" but got "undefined"
-FAIL onclose: dynamic changes on the attribute assert_equals: The onclose property must be null (no attribute) expected (object) null but got (undefined) undefined
-FAIL onclose: dispatching an Event at a <math> element must trigger element.onclose assert_equals: The event must be fired at the <math> element expected (object) Element node <math></math> but got (undefined) undefined
+PASS onclose: must be on the appropriate locations for GlobalEventHandlers
+PASS onclose: the default value must be null
+PASS onclose: the content attribute must be compiled into a function as the corresponding property
+PASS onclose: dynamic changes on the attribute
+PASS onclose: dispatching an Event at a <math> element must trigger element.onclose
 PASS oncontextmenu: must be on the appropriate locations for GlobalEventHandlers
 PASS oncontextmenu: the default value must be null
 PASS oncontextmenu: the content attribute must be compiled into a function as the corresponding property

Modified: trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (279405 => 279406)


--- trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -268,7 +268,7 @@
 PASS HTMLElement interface: attribute oncanplaythrough
 PASS HTMLElement interface: attribute onchange
 PASS HTMLElement interface: attribute onclick
-FAIL HTMLElement interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS HTMLElement interface: attribute onclose
 PASS HTMLElement interface: attribute oncontextmenu
 PASS HTMLElement interface: attribute oncuechange
 PASS HTMLElement interface: attribute ondblclick
@@ -363,7 +363,7 @@
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplaythrough" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onchange" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onclick" with the proper type
-FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS HTMLElement interface: document.createElement("noscript") must inherit property "onclose" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncontextmenu" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncuechange" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "ondblclick" with the proper type
@@ -4387,7 +4387,7 @@
 PASS Window interface: attribute oncanplaythrough
 PASS Window interface: attribute onchange
 PASS Window interface: attribute onclick
-FAIL Window interface: attribute onclose assert_own_property: The global object must have a property "onclose" expected property "onclose" missing
+PASS Window interface: attribute onclose
 PASS Window interface: attribute oncontextmenu
 PASS Window interface: attribute oncuechange
 PASS Window interface: attribute ondblclick
@@ -4537,7 +4537,7 @@
 PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
 PASS Window interface: window must inherit property "onchange" with the proper type
 PASS Window interface: window must inherit property "onclick" with the proper type
-FAIL Window interface: window must inherit property "onclose" with the proper type assert_own_property: expected property "onclose" missing
+PASS Window interface: window must inherit property "onclose" with the proper type
 PASS Window interface: window must inherit property "oncontextmenu" with the proper type
 PASS Window interface: window must inherit property "oncuechange" with the proper type
 PASS Window interface: window must inherit property "ondblclick" with the proper type
@@ -5252,7 +5252,7 @@
 PASS SVGElement interface: attribute oncanplaythrough
 PASS SVGElement interface: attribute onchange
 PASS SVGElement interface: attribute onclick
-FAIL SVGElement interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS SVGElement interface: attribute onclose
 PASS SVGElement interface: attribute oncontextmenu
 PASS SVGElement interface: attribute oncuechange
 PASS SVGElement interface: attribute ondblclick
@@ -5386,7 +5386,7 @@
 PASS Document interface: attribute oncanplaythrough
 PASS Document interface: attribute onchange
 PASS Document interface: attribute onclick
-FAIL Document interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS Document interface: attribute onclose
 PASS Document interface: attribute oncontextmenu
 PASS Document interface: attribute oncuechange
 PASS Document interface: attribute ondblclick
@@ -5511,7 +5511,7 @@
 PASS Document interface: iframe.contentDocument must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "onchange" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "onclick" with the proper type
-FAIL Document interface: iframe.contentDocument must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS Document interface: iframe.contentDocument must inherit property "onclose" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncontextmenu" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncuechange" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "ondblclick" with the proper type
@@ -5636,7 +5636,7 @@
 PASS Document interface: new Document() must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: new Document() must inherit property "onchange" with the proper type
 PASS Document interface: new Document() must inherit property "onclick" with the proper type
-FAIL Document interface: new Document() must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS Document interface: new Document() must inherit property "onclose" with the proper type
 PASS Document interface: new Document() must inherit property "oncontextmenu" with the proper type
 PASS Document interface: new Document() must inherit property "oncuechange" with the proper type
 PASS Document interface: new Document() must inherit property "ondblclick" with the proper type
@@ -5761,7 +5761,7 @@
 PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onchange" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onclick" with the proper type
-FAIL Document interface: documentWithHandlers must inherit property "onclose" with the proper type assert_inherits: property "onclose" found on object expected in prototype chain
+PASS Document interface: documentWithHandlers must inherit property "onclose" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncontextmenu" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncuechange" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "ondblclick" with the proper type

Modified: trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt (279405 => 279406)


--- trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -39,11 +39,11 @@
 PASS onclick: the content attribute must be compiled into a function as the corresponding property
 PASS onclick: dynamic changes on the attribute
 PASS onclick: dispatching an Event at a <math> element must trigger element.onclick
-FAIL onclose: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "onclose" expected true got false
-FAIL onclose: the default value must be null assert_equals: The default value of the property is null for a MathMLMathElement instance expected (object) null but got (undefined) undefined
-FAIL onclose: the content attribute must be compiled into a function as the corresponding property assert_equals: The onclose property must be a function expected "function" but got "undefined"
-FAIL onclose: dynamic changes on the attribute assert_equals: The onclose property must be null (no attribute) expected (object) null but got (undefined) undefined
-FAIL onclose: dispatching an Event at a <math> element must trigger element.onclose assert_equals: The event must be fired at the <math> element expected (object) Element node <math></math> but got (undefined) undefined
+PASS onclose: must be on the appropriate locations for GlobalEventHandlers
+PASS onclose: the default value must be null
+PASS onclose: the content attribute must be compiled into a function as the corresponding property
+PASS onclose: dynamic changes on the attribute
+PASS onclose: dispatching an Event at a <math> element must trigger element.onclose
 PASS oncontextmenu: must be on the appropriate locations for GlobalEventHandlers
 PASS oncontextmenu: the default value must be null
 PASS oncontextmenu: the content attribute must be compiled into a function as the corresponding property

Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (279405 => 279406)


--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-06-30 10:18:26 UTC (rev 279406)
@@ -266,7 +266,7 @@
 PASS HTMLElement interface: attribute oncanplaythrough
 PASS HTMLElement interface: attribute onchange
 PASS HTMLElement interface: attribute onclick
-FAIL HTMLElement interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS HTMLElement interface: attribute onclose
 PASS HTMLElement interface: attribute oncontextmenu
 PASS HTMLElement interface: attribute oncuechange
 PASS HTMLElement interface: attribute ondblclick
@@ -360,7 +360,7 @@
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplaythrough" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onchange" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onclick" with the proper type
-FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS HTMLElement interface: document.createElement("noscript") must inherit property "onclose" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncontextmenu" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncuechange" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "ondblclick" with the proper type
@@ -4351,7 +4351,7 @@
 PASS Window interface: attribute oncanplaythrough
 PASS Window interface: attribute onchange
 PASS Window interface: attribute onclick
-FAIL Window interface: attribute onclose assert_own_property: The global object must have a property "onclose" expected property "onclose" missing
+PASS Window interface: attribute onclose
 PASS Window interface: attribute oncontextmenu
 PASS Window interface: attribute oncuechange
 PASS Window interface: attribute ondblclick
@@ -4502,7 +4502,7 @@
 PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
 PASS Window interface: window must inherit property "onchange" with the proper type
 PASS Window interface: window must inherit property "onclick" with the proper type
-FAIL Window interface: window must inherit property "onclose" with the proper type assert_own_property: expected property "onclose" missing
+PASS Window interface: window must inherit property "onclose" with the proper type
 PASS Window interface: window must inherit property "oncontextmenu" with the proper type
 PASS Window interface: window must inherit property "oncuechange" with the proper type
 PASS Window interface: window must inherit property "ondblclick" with the proper type
@@ -5273,7 +5273,7 @@
 PASS SVGElement interface: attribute oncanplaythrough
 PASS SVGElement interface: attribute onchange
 PASS SVGElement interface: attribute onclick
-FAIL SVGElement interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS SVGElement interface: attribute onclose
 PASS SVGElement interface: attribute oncontextmenu
 PASS SVGElement interface: attribute oncuechange
 PASS SVGElement interface: attribute ondblclick
@@ -5407,7 +5407,7 @@
 PASS Document interface: attribute oncanplaythrough
 PASS Document interface: attribute onchange
 PASS Document interface: attribute onclick
-FAIL Document interface: attribute onclose assert_true: The prototype object must have a property "onclose" expected true got false
+PASS Document interface: attribute onclose
 PASS Document interface: attribute oncontextmenu
 PASS Document interface: attribute oncuechange
 PASS Document interface: attribute ondblclick
@@ -5532,7 +5532,7 @@
 PASS Document interface: iframe.contentDocument must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "onchange" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "onclick" with the proper type
-FAIL Document interface: iframe.contentDocument must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS Document interface: iframe.contentDocument must inherit property "onclose" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncontextmenu" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncuechange" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "ondblclick" with the proper type
@@ -5657,7 +5657,7 @@
 PASS Document interface: new Document() must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: new Document() must inherit property "onchange" with the proper type
 PASS Document interface: new Document() must inherit property "onclick" with the proper type
-FAIL Document interface: new Document() must inherit property "onclose" with the proper type assert_inherits: property "onclose" not found in prototype chain
+PASS Document interface: new Document() must inherit property "onclose" with the proper type
 PASS Document interface: new Document() must inherit property "oncontextmenu" with the proper type
 PASS Document interface: new Document() must inherit property "oncuechange" with the proper type
 PASS Document interface: new Document() must inherit property "ondblclick" with the proper type
@@ -5782,7 +5782,7 @@
 PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onchange" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onclick" with the proper type
-FAIL Document interface: documentWithHandlers must inherit property "onclose" with the proper type assert_inherits: property "onclose" found on object expected in prototype chain
+PASS Document interface: documentWithHandlers must inherit property "onclose" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncontextmenu" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncuechange" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "ondblclick" with the proper type

Modified: trunk/Source/WebCore/ChangeLog (279405 => 279406)


--- trunk/Source/WebCore/ChangeLog	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/Source/WebCore/ChangeLog	2021-06-30 10:18:26 UTC (rev 279406)
@@ -1,3 +1,32 @@
+2021-06-30  Tim Nguyen  <[email protected]>
+
+        Implement support for <dialog> element close event
+        https://bugs.webkit.org/show_bug.cgi?id=227493
+
+        Reviewed by Antti Koivisto.
+
+        With this change, the m_isOpen flag of HTMLDialogElement is only changed on attribute change, so attribute changes can
+        be detected more easily to fire this new "close" event.
+
+        Test: web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close.html
+        Adjusted existing test expectations for new `close` event.
+
+        * dom/GlobalEventHandlers.idl:
+        * html/HTMLAttributeNames.in:
+        * html/HTMLDialogElement.cpp:
+        (WebCore::dialogCloseEventSender):
+        (WebCore::HTMLDialogElement::~HTMLDialogElement):
+        (WebCore::HTMLDialogElement::show):
+        (WebCore::HTMLDialogElement::showModal):
+        (WebCore::HTMLDialogElement::close):
+        (WebCore::HTMLDialogElement::dispatchPendingEvent):
+        (WebCore::HTMLDialogElement::parseAttribute):
+        (WebCore::HTMLDialogElement::setOpen):
+        (WebCore::HTMLDialogElement::toggleOpen): Deleted.
+        * html/HTMLDialogElement.h:
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::createEventHandlerNameMap):
+
 2021-06-30  Youenn Fablet  <[email protected]>
 
         [Cocoa] Migrate WebRTC UDP socket handling to NW API

Modified: trunk/Source/WebCore/dom/GlobalEventHandlers.idl (279405 => 279406)


--- trunk/Source/WebCore/dom/GlobalEventHandlers.idl	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/Source/WebCore/dom/GlobalEventHandlers.idl	2021-06-30 10:18:26 UTC (rev 279406)
@@ -39,8 +39,7 @@
     attribute EventHandler oncanplaythrough;
     attribute EventHandler onchange;
     attribute EventHandler onclick;
-    // FIXME: Implement 'onclose'.
-    // attribute EventHandler onclose;
+    attribute EventHandler onclose;
     attribute EventHandler oncontextmenu;
     attribute EventHandler oncuechange;
     attribute EventHandler ondblclick;

Modified: trunk/Source/WebCore/html/HTMLAttributeNames.in (279405 => 279406)


--- trunk/Source/WebCore/html/HTMLAttributeNames.in	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/Source/WebCore/html/HTMLAttributeNames.in	2021-06-30 10:18:26 UTC (rev 279406)
@@ -224,6 +224,7 @@
 oncanplaythrough
 onchange
 onclick
+onclose
 oncontextmenu
 oncopy
 oncut

Modified: trunk/Source/WebCore/html/HTMLDialogElement.cpp (279405 => 279406)


--- trunk/Source/WebCore/html/HTMLDialogElement.cpp	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/Source/WebCore/html/HTMLDialogElement.cpp	2021-06-30 10:18:26 UTC (rev 279406)
@@ -25,6 +25,8 @@
 
 #include "config.h"
 #include "HTMLDialogElement.h"
+#include "EventNames.h"
+#include "EventSender.h"
 
 #include "HTMLNames.h"
 #include <wtf/IsoMallocInlines.h>
@@ -35,11 +37,22 @@
 
 using namespace HTMLNames;
 
+static DialogEventSender& dialogCloseEventSender()
+{
+    static NeverDestroyed<DialogEventSender> sharedCloseEventSender(eventNames().closeEvent);
+    return sharedCloseEventSender;
+}
+
 HTMLDialogElement::HTMLDialogElement(const QualifiedName& tagName, Document& document)
     : HTMLElement(tagName, document)
 {
 }
 
+HTMLDialogElement::~HTMLDialogElement()
+{
+    dialogCloseEventSender().cancelEvent(*this);
+}
+
 bool HTMLDialogElement::isOpen() const
 {
     return m_isOpen;
@@ -61,7 +74,7 @@
     if (isOpen())
         return;
     
-    toggleOpen();
+    setOpen(true);
 }
 
 ExceptionOr<void> HTMLDialogElement::showModal()
@@ -74,7 +87,7 @@
     if (!isConnected())
         return Exception { InvalidStateError };
 
-    toggleOpen();
+    setOpen(true);
     return { };
 }
 
@@ -83,15 +96,28 @@
     if (!isOpen())
         return;
     
-    toggleOpen();
+    setOpen(false);
     if (!returnValue.isNull())
         m_returnValue = returnValue;
 }
 
+void HTMLDialogElement::dispatchPendingEvent(DialogEventSender* eventSender)
+{
+    ASSERT_UNUSED(eventSender, eventSender == &dialogCloseEventSender());
+    dispatchEvent(Event::create(eventNames().closeEvent, Event::CanBubble::No, Event::IsCancelable::No));
+}
+
 void HTMLDialogElement::parseAttribute(const QualifiedName& name, const AtomString& value)
 {
     if (name == HTMLNames::openAttr) {
+        bool oldValue = m_isOpen;
         m_isOpen = !value.isNull();
+
+        // Emit close event
+        if (oldValue != m_isOpen && !m_isOpen) {
+            dialogCloseEventSender().cancelEvent(*this);
+            dialogCloseEventSender().dispatchEventSoon(*this);
+        }
         return;
     }
     
@@ -98,10 +124,9 @@
     HTMLElement::parseAttribute(name, value);
 }
 
-void HTMLDialogElement::toggleOpen()
+void HTMLDialogElement::setOpen(bool value)
 {
-    m_isOpen = !m_isOpen;
-    setAttributeWithoutSynchronization(HTMLNames::openAttr, m_isOpen ? emptyAtom() : nullAtom());
+    setAttributeWithoutSynchronization(HTMLNames::openAttr, value ? emptyAtom() : nullAtom());
 }
 
 }

Modified: trunk/Source/WebCore/html/HTMLDialogElement.h (279405 => 279406)


--- trunk/Source/WebCore/html/HTMLDialogElement.h	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/Source/WebCore/html/HTMLDialogElement.h	2021-06-30 10:18:26 UTC (rev 279406)
@@ -29,10 +29,14 @@
 
 namespace WebCore {
 
+template<typename T> class EventSender;
+using DialogEventSender = EventSender<HTMLDialogElement>;
+
 class HTMLDialogElement final : public HTMLElement {
     WTF_MAKE_ISO_ALLOCATED(HTMLDialogElement);
 public:
     template<typename... Args> static Ref<HTMLDialogElement> create(Args&&... args) { return adoptRef(*new HTMLDialogElement(std::forward<Args>(args)...)); }
+    ~HTMLDialogElement();
     
     bool isOpen() const;
 
@@ -43,12 +47,14 @@
     ExceptionOr<void> showModal();
     void close(const String&);
 
+    void dispatchPendingEvent(DialogEventSender*);
+
 private:
     HTMLDialogElement(const QualifiedName&, Document&);
 
     void parseAttribute(const QualifiedName&, const AtomString&) final;
 
-    void toggleOpen();
+    void setOpen(bool);
 
     String m_returnValue;
     bool m_isOpen { false };

Modified: trunk/Source/WebCore/html/HTMLElement.cpp (279405 => 279406)


--- trunk/Source/WebCore/html/HTMLElement.cpp	2021-06-30 08:46:38 UTC (rev 279405)
+++ trunk/Source/WebCore/html/HTMLElement.cpp	2021-06-30 10:18:26 UTC (rev 279406)
@@ -270,6 +270,7 @@
         &oncanplaythroughAttr.get(),
         &onchangeAttr.get(),
         &onclickAttr.get(),
+        &oncloseAttr.get(),
         &oncontextmenuAttr.get(),
         &oncopyAttr.get(),
         &oncutAttr.get(),
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to