Title: [280703] trunk
Revision
280703
Author
[email protected]
Date
2021-08-05 13:56:52 -0700 (Thu, 05 Aug 2021)

Log Message

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

Reviewed by Chris Dumez.

This makes <dialog> emit a cancel event then close when the escape key is pressed.

Updated relevant WPT:
- <dialog> cancel event WPTs: used send_keys instead of test_driver.Actions() (which are unsupported by WebKit test runner)
- oncancel now is recognized

Failing WPT:
- dialog-cancel-with-input.html: needs <dialog> focusing steps (webkit.org/b/227537) to be implemented for <input> to get focus
- dialog-cancel-with-select.html: needs <dialog> focusing steps (webkit.org/b/227537) to be implemented for <select> to get focus
- dialog-keydown-preventDefault.html: current implementation does not prevent canceling from happening when keydown event has preventDefault()

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/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events.html:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault.html:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input.html:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-select.html:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault.html:
* 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:
* web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:

Source/WebCore:

* dom/GlobalEventHandlers.idl:
* html/HTMLAttributeNames.in:
* html/HTMLDialogElement.cpp:
(WebCore::HTMLDialogElement::cancel):
* html/HTMLDialogElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::createEventHandlerNameMap):
* page/EventHandler.cpp:
(WebCore::EventHandler::internalKeyEvent):

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/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events-expected.txt: Added.
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault-expected.txt: Added.
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input-expected.txt: Added.
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault-expected.txt: Added.
* 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

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (280702 => 280703)


--- trunk/LayoutTests/ChangeLog	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/ChangeLog	2021-08-05 20:56:52 UTC (rev 280703)
@@ -1,3 +1,35 @@
+2021-08-05  Tim Nguyen  <[email protected]>
+
+        Implement support for <dialog> element cancel event
+        https://bugs.webkit.org/show_bug.cgi?id=227534
+
+        Reviewed by Chris Dumez.
+
+        This makes <dialog> emit a cancel event then close when the escape key is pressed.
+
+        Updated relevant WPT:
+        - <dialog> cancel event WPTs: used send_keys instead of test_driver.Actions() (which are unsupported by WebKit test runner)
+        - oncancel now is recognized
+
+        Failing WPT:
+        - dialog-cancel-with-input.html: needs <dialog> focusing steps (webkit.org/b/227537) to be implemented for <input> to get focus
+        - dialog-cancel-with-select.html: needs <dialog> focusing steps (webkit.org/b/227537) to be implemented for <select> to get focus
+        - dialog-keydown-preventDefault.html: current implementation does not prevent canceling from happening when keydown event has preventDefault()
+
+        * 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/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events-expected.txt: Added.
+        * platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault-expected.txt: Added.
+        * platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input-expected.txt: Added.
+        * platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault-expected.txt: Added.
+        * 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-08-04  Robert Jenner  <[email protected]>
 
         ( Rebaseline) [ iOS ] fast/forms/ios/inputmode-none.html is a constant failure

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (280702 => 280703)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-08-05 20:56:52 UTC (rev 280703)
@@ -1,5 +1,40 @@
 2021-08-05  Tim Nguyen  <[email protected]>
 
+        Implement support for <dialog> element cancel event
+        https://bugs.webkit.org/show_bug.cgi?id=227534
+
+        Reviewed by Chris Dumez.
+
+        This makes <dialog> emit a cancel event then close when the escape key is pressed.
+
+        Updated relevant WPT:
+        - <dialog> cancel event WPTs: used send_keys instead of test_driver.Actions() (which are unsupported by WebKit test runner)
+        - oncancel now is recognized
+
+        Failing WPT:
+        - dialog-cancel-with-input.html: needs <dialog> focusing steps (webkit.org/b/227537) to be implemented for <input> to get focus
+        - dialog-cancel-with-select.html: needs <dialog> focusing steps (webkit.org/b/227537) to be implemented for <select> to get focus
+        - dialog-keydown-preventDefault.html: current implementation does not prevent canceling from happening when keydown event has preventDefault()
+
+        * 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/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events-expected.txt:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events.html:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault-expected.txt:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault.html:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input-expected.txt:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input.html:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-select.html:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault-expected.txt:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault.html:
+        * 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:
+        * web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
+
+2021-08-05  Tim Nguyen  <[email protected]>
+
         Re-import html/semantics/interactive-elements/the-dialog-element WPT
         https://bugs.webkit.org/show_bug.cgi?id=228822
 

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


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -18,7 +18,7 @@
 PASS A SecurityError exception must be thrown when window.onbeforeprint is accessed from a different origin.
 PASS A SecurityError exception must be thrown when window.onbeforeunload is accessed from a different origin.
 PASS A SecurityError exception must be thrown when window.onblur is accessed from a different origin.
-FAIL A SecurityError exception must be thrown when window.oncancel is accessed from a different origin. assert_true: window.oncancel should exist. expected true got false
+PASS A SecurityError exception must be thrown when window.oncancel is accessed from a different origin.
 PASS A SecurityError exception must be thrown when window.oncanplay is accessed from a different origin.
 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.

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


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -80,7 +80,7 @@
 PASS Window attribute: onbeforeprint
 PASS Window attribute: onbeforeunload
 PASS Window attribute: onblur
-FAIL Window attribute: oncancel assert_true: oncancel in window expected true got false
+PASS Window attribute: oncancel
 PASS Window attribute: oncanplay
 PASS Window attribute: oncanplaythrough
 PASS Window attribute: onchange

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


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -129,7 +129,7 @@
 PASS HTMLElement interface: attribute onabort
 FAIL HTMLElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS HTMLElement interface: attribute onblur
-FAIL HTMLElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS HTMLElement interface: attribute oncancel
 PASS HTMLElement interface: attribute oncanplay
 PASS HTMLElement interface: attribute oncanplaythrough
 PASS HTMLElement interface: attribute onchange
@@ -219,7 +219,7 @@
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onabort" with the proper type
 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onblur" with the proper type
-FAIL HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplay" with the proper type
 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
@@ -4188,7 +4188,7 @@
 PASS Window interface: attribute onabort
 FAIL Window interface: attribute onauxclick assert_own_property: The global object must have a property "onauxclick" expected property "onauxclick" missing
 PASS Window interface: attribute onblur
-FAIL Window interface: attribute oncancel assert_own_property: The global object must have a property "oncancel" expected property "oncancel" missing
+PASS Window interface: attribute oncancel
 PASS Window interface: attribute oncanplay
 PASS Window interface: attribute oncanplaythrough
 PASS Window interface: attribute onchange
@@ -4332,7 +4332,7 @@
 PASS Window interface: window must inherit property "onabort" with the proper type
 FAIL Window interface: window must inherit property "onauxclick" with the proper type assert_own_property: expected property "onauxclick" missing
 PASS Window interface: window must inherit property "onblur" with the proper type
-FAIL Window interface: window must inherit property "oncancel" with the proper type assert_own_property: expected property "oncancel" missing
+PASS Window interface: window must inherit property "oncancel" with the proper type
 PASS Window interface: window must inherit property "oncanplay" with the proper type
 PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
 PASS Window interface: window must inherit property "onchange" with the proper type
@@ -5033,7 +5033,7 @@
 PASS SVGElement interface: attribute onabort
 FAIL SVGElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS SVGElement interface: attribute onblur
-FAIL SVGElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS SVGElement interface: attribute oncancel
 PASS SVGElement interface: attribute oncanplay
 PASS SVGElement interface: attribute oncanplaythrough
 PASS SVGElement interface: attribute onchange
@@ -5175,7 +5175,7 @@
 PASS Document interface: attribute onabort
 FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS Document interface: attribute onblur
-FAIL Document interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS Document interface: attribute oncancel
 PASS Document interface: attribute oncanplay
 PASS Document interface: attribute oncanplaythrough
 PASS Document interface: attribute onchange
@@ -5296,7 +5296,7 @@
 PASS Document interface: iframe.contentDocument must inherit property "onabort" with the proper type
 FAIL Document interface: iframe.contentDocument must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS Document interface: iframe.contentDocument must inherit property "onblur" with the proper type
-FAIL Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncanplay" with the proper type
 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
@@ -5417,7 +5417,7 @@
 PASS Document interface: new Document() must inherit property "onabort" with the proper type
 FAIL Document interface: new Document() must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS Document interface: new Document() must inherit property "onblur" with the proper type
-FAIL Document interface: new Document() must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS Document interface: new Document() must inherit property "oncancel" with the proper type
 PASS Document interface: new Document() must inherit property "oncanplay" with the proper type
 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
@@ -5538,7 +5538,7 @@
 PASS Document interface: documentWithHandlers must inherit property "onabort" with the proper type
 FAIL Document interface: documentWithHandlers must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" found on object expected in prototype chain
 PASS Document interface: documentWithHandlers must inherit property "onblur" with the proper type
-FAIL Document interface: documentWithHandlers must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" found on object expected in prototype chain
+PASS Document interface: documentWithHandlers must inherit property "oncancel" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncanplay" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onchange" with the proper type

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events-expected.txt (280702 => 280703)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -1,8 +1,5 @@
-CONSOLE MESSAGE: ReferenceError: Can't find variable: action
 Test cancel event is fired when the dialog is closed by user interaction
 
-Hello World
 
+PASS Test cancel event is fired when the dialog is closed by user interaction
 
-FAIL Test cancel event is fired when the dialog is closed by user interaction ReferenceError: Can't find variable: action
-

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events.html (280702 => 280703)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events.html	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events.html	2021-08-05 20:56:52 UTC (rev 280703)
@@ -6,7 +6,7 @@
   <script src=""
   <script src=""
   <script src=""
-  <script src=""
+  <link rel="help" href=""
   <link rel="help" href=""
 </head>
 <body>
@@ -39,12 +39,7 @@
   });
 
   dialog.showModal();
-
-  const escKey = "\uE00C";
-  new test_driver.Actions()
-    .keyDown(escKey)
-    .keyUp(escKey)
-    .send();
+  test_driver.send_keys(document.documentElement, "\uE00C"); // ESC key
 </script>
 </body>
 </html>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault-expected.txt (280702 => 280703)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -1,8 +1,7 @@
-CONSOLE MESSAGE: ReferenceError: Can't find variable: action
 Test cancel event with preventDefault on cancel event for dialog element
 
 Hello World
 
 
-FAIL Test cancel event with preventDefault on cancel event for dialog element ReferenceError: Can't find variable: action
+PASS Test cancel event with preventDefault on cancel event for dialog element
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault.html (280702 => 280703)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault.html	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault.html	2021-08-05 20:56:52 UTC (rev 280703)
@@ -6,7 +6,7 @@
   <script src=""
   <script src=""
   <script src=""
-  <script src=""
+  <link rel="help" href=""
   <link rel="help" href=""
 </head>
 <body>
@@ -39,11 +39,7 @@
   });
 
   dialog.showModal();
-  const escKey = "\uE00C";
-  new test_driver.Actions()
-    .keyDown(escKey)
-    .keyUp(escKey)
-    .send();
+  test_driver.send_keys(document.documentElement, "\uE00C"); // ESC key
 </script>
 </body>
 </html>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input-expected.txt (280702 => 280703)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -1,8 +1,7 @@
-CONSOLE MESSAGE: ReferenceError: Can't find variable: action
+CONSOLE MESSAGE: Error: assert_true: input element should be focused expected true got false
 Test dialog modal is closed by escape key with input focused
 
-Hello World
 
 
-FAIL Test dialog modal is closed by escape key with input focused ReferenceError: Can't find variable: action
+FAIL Test dialog modal is closed by escape key with input focused Error: assert_true: input element should be focused expected true got false
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input.html (280702 => 280703)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input.html	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input.html	2021-08-05 20:56:52 UTC (rev 280703)
@@ -6,7 +6,7 @@
   <script src=""
   <script src=""
   <script src=""
-  <script src=""
+  <link rel="help" href=""
   <link rel="help" href=""
 </head>
 <body>
@@ -23,11 +23,7 @@
   setup({ single_test: true });
 
   const triggerEscKey = () => {
-    const escKey = "\uE00C";
-    new test_driver.Actions()
-      .keyDown(escKey)
-      .keyUp(escKey)
-      .send();
+    test_driver.send_keys(document.documentElement, "\uE00C"); // ESC key
   };
 
   /* Make sure we still cancel the dialog even if the input element is focused */
@@ -49,7 +45,7 @@
 
   dialog.addEventListener("close", function() {
     assert_false(dialog.open, "dialog closed");
-    step_timeout(function(){
+    step_timeout(function() {
       runTestCancelWhenInputFocused();
     }, 0);
   });

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-select.html (280702 => 280703)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-select.html	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-select.html	2021-08-05 20:56:52 UTC (rev 280703)
@@ -6,7 +6,7 @@
   <script src=""
   <script src=""
   <script src=""
-  <script src=""
+  <link rel="help" href=""
   <link rel="help" href=""
 </head>
 <body>
@@ -31,12 +31,7 @@
   dialog.showModal();
   assert_true(select == document.activeElement, "select element should be focused");
 
-  const escKey = "\uE00C";
-  new test_driver.Actions()
-    .keyDown(escKey)
-    .keyUp(escKey)
-    .send();
+  test_driver.send_keys(document.documentElement, "\uE00C"); // ESC key
 </script>
 </body>
 </html>
-

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault-expected.txt (280702 => 280703)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -1,8 +1,7 @@
-CONSOLE MESSAGE: ReferenceError: Can't find variable: action
 Test cancel event with preventDefault on keydown event for dialog element
 
-Hello World
 
+Harness Error (TIMEOUT), message = null
 
-FAIL Test cancel event with preventDefault on keydown event for dialog element ReferenceError: Can't find variable: action
+NOTRUN Test cancel event with preventDefault on keydown event for dialog element
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault.html (280702 => 280703)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault.html	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault.html	2021-08-05 20:56:52 UTC (rev 280703)
@@ -6,7 +6,7 @@
   <script src=""
   <script src=""
   <script src=""
-  <script src=""
+  <link rel="help" href=""
   <link rel="help" href=""
 </head>
 <body>
@@ -39,11 +39,7 @@
     }, 0);
   });
   dialog.showModal();
-  const escKey = "\uE00C";
-  new test_driver.Actions()
-    .keyDown(escKey)
-    .keyUp(escKey)
-    .send();
+  test_driver.send_keys(document.documentElement, "\uE00C"); // ESC key
 </script>
 </body>
 </html>

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


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -14,10 +14,10 @@
 PASS onblur: the content attribute must be compiled into a function as the corresponding property
 PASS onblur: the content attribute must execute when an event is dispatched
 PASS onblur: dispatching an Event at a <meta> element must trigger element.onblur
-FAIL oncancel: must be on the appropriate locations for GlobalEventHandlers assert_true: Window has an own property named "oncancel" expected true got false
-FAIL oncancel: 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 oncancel: the content attribute must be compiled into a function as the corresponding property assert_equals: The oncancel property must be a function expected "function" but got "undefined"
-FAIL oncancel: the content attribute must execute when an event is dispatched assert_true: Dispatching an event must run the code expected true got undefined
+PASS oncancel: must be on the appropriate locations for GlobalEventHandlers
+PASS oncancel: the default value must be null
+PASS oncancel: the content attribute must be compiled into a function as the corresponding property
+PASS oncancel: the content attribute must execute when an event is dispatched
 PASS oncancel: dispatching an Event at a <meta> element must trigger element.oncancel
 PASS oncanplay: must be on the appropriate locations for GlobalEventHandlers
 PASS oncanplay: 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 (280702 => 280703)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -23,7 +23,7 @@
 PASS shadowed unload (document.body)
 PASS not shadowed abort (document.body)
 FAIL not shadowed auxclick (document.body) assert_equals: alternative body should reflect expected (object) null but got (undefined) undefined
-FAIL not shadowed cancel (document.body) assert_equals: alternative body should reflect expected (object) null but got (undefined) undefined
+PASS not shadowed cancel (document.body)
 PASS not shadowed canplay (document.body)
 PASS not shadowed canplaythrough (document.body)
 PASS not shadowed change (document.body)
@@ -130,7 +130,7 @@
 PASS shadowed unload (document.createElement("body"))
 PASS not shadowed abort (document.createElement("body"))
 FAIL not shadowed auxclick (document.createElement("body")) assert_equals: body should reflect expected (object) null but got (undefined) undefined
-FAIL not shadowed cancel (document.createElement("body")) assert_equals: body should reflect expected (object) null but got (undefined) undefined
+PASS not shadowed cancel (document.createElement("body"))
 PASS not shadowed canplay (document.createElement("body"))
 PASS not shadowed canplaythrough (document.createElement("body"))
 PASS not shadowed change (document.createElement("body"))
@@ -237,7 +237,7 @@
 PASS shadowed unload (window)
 PASS not shadowed abort (window)
 FAIL not shadowed auxclick (window) assert_equals: body should reflect expected (object) null but got (undefined) undefined
-FAIL not shadowed cancel (window) assert_equals: body should reflect expected (object) null but got (undefined) undefined
+PASS not shadowed cancel (window)
 PASS not shadowed canplay (window)
 PASS not shadowed canplaythrough (window)
 PASS not shadowed change (window)

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


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -45,7 +45,7 @@
 PASS Ignore setting of unload window event handlers on windowless body
 PASS abort is unaffected on a windowless body
 FAIL auxclick is unaffected on a windowless body assert_equals: expected (object) null but got (undefined) undefined
-FAIL cancel is unaffected on a windowless body assert_equals: expected (object) null but got (undefined) undefined
+PASS cancel is unaffected on a windowless body
 PASS canplay is unaffected on a windowless body
 PASS canplaythrough is unaffected on a windowless body
 PASS change is unaffected on a windowless body
@@ -152,7 +152,7 @@
 PASS Ignore setting of unload window event handlers on windowless frameset
 PASS abort is unaffected on a windowless frameset
 FAIL auxclick is unaffected on a windowless frameset assert_equals: expected (object) null but got (undefined) undefined
-FAIL cancel is unaffected on a windowless frameset assert_equals: expected (object) null but got (undefined) undefined
+PASS cancel is unaffected on a windowless frameset
 PASS canplay is unaffected on a windowless frameset
 PASS canplaythrough is unaffected on a windowless frameset
 PASS change 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 (280702 => 280703)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -14,11 +14,11 @@
 PASS onblur: the content attribute must be compiled into a function as the corresponding property
 PASS onblur: dynamic changes on the attribute
 PASS onblur: dispatching an Event at a <math> element must trigger element.onblur
-FAIL oncancel: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "oncancel" expected true got false
-FAIL oncancel: 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 oncancel: the content attribute must be compiled into a function as the corresponding property assert_equals: The oncancel property must be a function expected "function" but got "undefined"
-FAIL oncancel: dynamic changes on the attribute assert_equals: The oncancel property must be null (no attribute) expected (object) null but got (undefined) undefined
-FAIL oncancel: dispatching an Event at a <math> element must trigger element.oncancel assert_equals: The event must be fired at the <math> element expected (object) Element node <math></math> but got (undefined) undefined
+PASS oncancel: must be on the appropriate locations for GlobalEventHandlers
+PASS oncancel: the default value must be null
+PASS oncancel: the content attribute must be compiled into a function as the corresponding property
+PASS oncancel: dynamic changes on the attribute
+PASS oncancel: dispatching an Event at a <math> element must trigger element.oncancel
 PASS oncanplay: must be on the appropriate locations for GlobalEventHandlers
 PASS oncanplay: the default value must be null
 PASS oncanplay: 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 (280702 => 280703)


--- trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -14,11 +14,11 @@
 PASS onblur: the content attribute must be compiled into a function as the corresponding property
 PASS onblur: dynamic changes on the attribute
 PASS onblur: dispatching an Event at a <math> element must trigger element.onblur
-FAIL oncancel: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "oncancel" expected true got false
-FAIL oncancel: 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 oncancel: the content attribute must be compiled into a function as the corresponding property assert_equals: The oncancel property must be a function expected "function" but got "undefined"
-FAIL oncancel: dynamic changes on the attribute assert_equals: The oncancel property must be null (no attribute) expected (object) null but got (undefined) undefined
-FAIL oncancel: dispatching an Event at a <math> element must trigger element.oncancel assert_equals: The event must be fired at the <math> element expected (object) Element node <math></math> but got (undefined) undefined
+PASS oncancel: must be on the appropriate locations for GlobalEventHandlers
+PASS oncancel: the default value must be null
+PASS oncancel: the content attribute must be compiled into a function as the corresponding property
+PASS oncancel: dynamic changes on the attribute
+PASS oncancel: dispatching an Event at a <math> element must trigger element.oncancel
 PASS oncanplay: must be on the appropriate locations for GlobalEventHandlers
 PASS oncanplay: the default value must be null
 PASS oncanplay: 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 (280702 => 280703)


--- trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -263,7 +263,7 @@
 PASS HTMLElement interface: attribute onabort
 FAIL HTMLElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS HTMLElement interface: attribute onblur
-FAIL HTMLElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS HTMLElement interface: attribute oncancel
 PASS HTMLElement interface: attribute oncanplay
 PASS HTMLElement interface: attribute oncanplaythrough
 PASS HTMLElement interface: attribute onchange
@@ -358,7 +358,7 @@
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onabort" with the proper type
 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onblur" with the proper type
-FAIL HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplay" with the proper type
 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
@@ -4403,7 +4403,7 @@
 PASS Window interface: attribute onabort
 FAIL Window interface: attribute onauxclick assert_own_property: The global object must have a property "onauxclick" expected property "onauxclick" missing
 PASS Window interface: attribute onblur
-FAIL Window interface: attribute oncancel assert_own_property: The global object must have a property "oncancel" expected property "oncancel" missing
+PASS Window interface: attribute oncancel
 PASS Window interface: attribute oncanplay
 PASS Window interface: attribute oncanplaythrough
 PASS Window interface: attribute onchange
@@ -4553,7 +4553,7 @@
 PASS Window interface: window must inherit property "onabort" with the proper type
 FAIL Window interface: window must inherit property "onauxclick" with the proper type assert_own_property: expected property "onauxclick" missing
 PASS Window interface: window must inherit property "onblur" with the proper type
-FAIL Window interface: window must inherit property "oncancel" with the proper type assert_own_property: expected property "oncancel" missing
+PASS Window interface: window must inherit property "oncancel" with the proper type
 PASS Window interface: window must inherit property "oncanplay" with the proper type
 PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
 PASS Window interface: window must inherit property "onchange" with the proper type
@@ -5268,7 +5268,7 @@
 PASS SVGElement interface: attribute onabort
 FAIL SVGElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS SVGElement interface: attribute onblur
-FAIL SVGElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS SVGElement interface: attribute oncancel
 PASS SVGElement interface: attribute oncanplay
 PASS SVGElement interface: attribute oncanplaythrough
 PASS SVGElement interface: attribute onchange
@@ -5402,7 +5402,7 @@
 PASS Document interface: attribute onabort
 FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS Document interface: attribute onblur
-FAIL Document interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS Document interface: attribute oncancel
 PASS Document interface: attribute oncanplay
 PASS Document interface: attribute oncanplaythrough
 PASS Document interface: attribute onchange
@@ -5527,7 +5527,7 @@
 PASS Document interface: iframe.contentDocument must inherit property "onabort" with the proper type
 FAIL Document interface: iframe.contentDocument must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS Document interface: iframe.contentDocument must inherit property "onblur" with the proper type
-FAIL Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncanplay" with the proper type
 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
@@ -5652,7 +5652,7 @@
 PASS Document interface: new Document() must inherit property "onabort" with the proper type
 FAIL Document interface: new Document() must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS Document interface: new Document() must inherit property "onblur" with the proper type
-FAIL Document interface: new Document() must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS Document interface: new Document() must inherit property "oncancel" with the proper type
 PASS Document interface: new Document() must inherit property "oncanplay" with the proper type
 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
@@ -5777,7 +5777,7 @@
 PASS Document interface: documentWithHandlers must inherit property "onabort" with the proper type
 FAIL Document interface: documentWithHandlers must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" found on object expected in prototype chain
 PASS Document interface: documentWithHandlers must inherit property "onblur" with the proper type
-FAIL Document interface: documentWithHandlers must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" found on object expected in prototype chain
+PASS Document interface: documentWithHandlers must inherit property "oncancel" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncanplay" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onchange" with the proper type

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


--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -263,7 +263,7 @@
 PASS HTMLElement interface: attribute onabort
 FAIL HTMLElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS HTMLElement interface: attribute onblur
-FAIL HTMLElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS HTMLElement interface: attribute oncancel
 PASS HTMLElement interface: attribute oncanplay
 PASS HTMLElement interface: attribute oncanplaythrough
 PASS HTMLElement interface: attribute onchange
@@ -358,7 +358,7 @@
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onabort" with the proper type
 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onblur" with the proper type
-FAIL HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplay" with the proper type
 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
@@ -4393,7 +4393,7 @@
 PASS Window interface: attribute onabort
 FAIL Window interface: attribute onauxclick assert_own_property: The global object must have a property "onauxclick" expected property "onauxclick" missing
 PASS Window interface: attribute onblur
-FAIL Window interface: attribute oncancel assert_own_property: The global object must have a property "oncancel" expected property "oncancel" missing
+PASS Window interface: attribute oncancel
 PASS Window interface: attribute oncanplay
 PASS Window interface: attribute oncanplaythrough
 PASS Window interface: attribute onchange
@@ -4543,7 +4543,7 @@
 PASS Window interface: window must inherit property "onabort" with the proper type
 FAIL Window interface: window must inherit property "onauxclick" with the proper type assert_own_property: expected property "onauxclick" missing
 PASS Window interface: window must inherit property "onblur" with the proper type
-FAIL Window interface: window must inherit property "oncancel" with the proper type assert_own_property: expected property "oncancel" missing
+PASS Window interface: window must inherit property "oncancel" with the proper type
 PASS Window interface: window must inherit property "oncanplay" with the proper type
 PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
 PASS Window interface: window must inherit property "onchange" with the proper type
@@ -5258,7 +5258,7 @@
 PASS SVGElement interface: attribute onabort
 FAIL SVGElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS SVGElement interface: attribute onblur
-FAIL SVGElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS SVGElement interface: attribute oncancel
 PASS SVGElement interface: attribute oncanplay
 PASS SVGElement interface: attribute oncanplaythrough
 PASS SVGElement interface: attribute onchange
@@ -5392,7 +5392,7 @@
 PASS Document interface: attribute onabort
 FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS Document interface: attribute onblur
-FAIL Document interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS Document interface: attribute oncancel
 PASS Document interface: attribute oncanplay
 PASS Document interface: attribute oncanplaythrough
 PASS Document interface: attribute onchange
@@ -5517,7 +5517,7 @@
 PASS Document interface: iframe.contentDocument must inherit property "onabort" with the proper type
 FAIL Document interface: iframe.contentDocument must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS Document interface: iframe.contentDocument must inherit property "onblur" with the proper type
-FAIL Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncanplay" with the proper type
 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
@@ -5642,7 +5642,7 @@
 PASS Document interface: new Document() must inherit property "onabort" with the proper type
 FAIL Document interface: new Document() must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS Document interface: new Document() must inherit property "onblur" with the proper type
-FAIL Document interface: new Document() must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS Document interface: new Document() must inherit property "oncancel" with the proper type
 PASS Document interface: new Document() must inherit property "oncanplay" with the proper type
 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
@@ -5767,7 +5767,7 @@
 PASS Document interface: documentWithHandlers must inherit property "onabort" with the proper type
 FAIL Document interface: documentWithHandlers must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" found on object expected in prototype chain
 PASS Document interface: documentWithHandlers must inherit property "onblur" with the proper type
-FAIL Document interface: documentWithHandlers must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" found on object expected in prototype chain
+PASS Document interface: documentWithHandlers must inherit property "oncancel" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncanplay" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onchange" with the proper type

Added: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events-expected.txt (0 => 280703)


--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -0,0 +1,9 @@
+Test cancel event is fired when the dialog is closed by user interaction
+
+Hello World
+
+
+Harness Error (TIMEOUT), message = null
+
+NOTRUN Test cancel event is fired when the dialog is closed by user interaction
+

Added: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault-expected.txt (0 => 280703)


--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -0,0 +1,9 @@
+Test cancel event with preventDefault on cancel event for dialog element
+
+Hello World
+
+
+Harness Error (TIMEOUT), message = null
+
+NOTRUN Test cancel event with preventDefault on cancel event for dialog element
+

Added: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input-expected.txt (0 => 280703)


--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -0,0 +1,9 @@
+Test dialog modal is closed by escape key with input focused
+
+Hello World
+
+
+Harness Error (TIMEOUT), message = null
+
+NOTRUN Test dialog modal is closed by escape key with input focused
+

Added: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault-expected.txt (0 => 280703)


--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -0,0 +1,9 @@
+Test cancel event with preventDefault on keydown event for dialog element
+
+Hello World
+
+
+Harness Error (TIMEOUT), message = null
+
+NOTRUN Test cancel event with preventDefault on keydown event for dialog element
+

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


--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -14,11 +14,11 @@
 PASS onblur: the content attribute must be compiled into a function as the corresponding property
 PASS onblur: dynamic changes on the attribute
 PASS onblur: dispatching an Event at a <math> element must trigger element.onblur
-FAIL oncancel: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "oncancel" expected true got false
-FAIL oncancel: 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 oncancel: the content attribute must be compiled into a function as the corresponding property assert_equals: The oncancel property must be a function expected "function" but got "undefined"
-FAIL oncancel: dynamic changes on the attribute assert_equals: The oncancel property must be null (no attribute) expected (object) null but got (undefined) undefined
-FAIL oncancel: dispatching an Event at a <math> element must trigger element.oncancel assert_equals: The event must be fired at the <math> element expected (object) Element node <math></math> but got (undefined) undefined
+PASS oncancel: must be on the appropriate locations for GlobalEventHandlers
+PASS oncancel: the default value must be null
+PASS oncancel: the content attribute must be compiled into a function as the corresponding property
+PASS oncancel: dynamic changes on the attribute
+PASS oncancel: dispatching an Event at a <math> element must trigger element.oncancel
 PASS oncanplay: must be on the appropriate locations for GlobalEventHandlers
 PASS oncanplay: the default value must be null
 PASS oncanplay: 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 (280702 => 280703)


--- trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -263,7 +263,7 @@
 PASS HTMLElement interface: attribute onabort
 FAIL HTMLElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS HTMLElement interface: attribute onblur
-FAIL HTMLElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS HTMLElement interface: attribute oncancel
 PASS HTMLElement interface: attribute oncanplay
 PASS HTMLElement interface: attribute oncanplaythrough
 PASS HTMLElement interface: attribute onchange
@@ -358,7 +358,7 @@
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onabort" with the proper type
 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onblur" with the proper type
-FAIL HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplay" with the proper type
 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
@@ -4403,7 +4403,7 @@
 PASS Window interface: attribute onabort
 FAIL Window interface: attribute onauxclick assert_own_property: The global object must have a property "onauxclick" expected property "onauxclick" missing
 PASS Window interface: attribute onblur
-FAIL Window interface: attribute oncancel assert_own_property: The global object must have a property "oncancel" expected property "oncancel" missing
+PASS Window interface: attribute oncancel
 PASS Window interface: attribute oncanplay
 PASS Window interface: attribute oncanplaythrough
 PASS Window interface: attribute onchange
@@ -4553,7 +4553,7 @@
 PASS Window interface: window must inherit property "onabort" with the proper type
 FAIL Window interface: window must inherit property "onauxclick" with the proper type assert_own_property: expected property "onauxclick" missing
 PASS Window interface: window must inherit property "onblur" with the proper type
-FAIL Window interface: window must inherit property "oncancel" with the proper type assert_own_property: expected property "oncancel" missing
+PASS Window interface: window must inherit property "oncancel" with the proper type
 PASS Window interface: window must inherit property "oncanplay" with the proper type
 PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
 PASS Window interface: window must inherit property "onchange" with the proper type
@@ -5268,7 +5268,7 @@
 PASS SVGElement interface: attribute onabort
 FAIL SVGElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS SVGElement interface: attribute onblur
-FAIL SVGElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS SVGElement interface: attribute oncancel
 PASS SVGElement interface: attribute oncanplay
 PASS SVGElement interface: attribute oncanplaythrough
 PASS SVGElement interface: attribute onchange
@@ -5402,7 +5402,7 @@
 PASS Document interface: attribute onabort
 FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS Document interface: attribute onblur
-FAIL Document interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS Document interface: attribute oncancel
 PASS Document interface: attribute oncanplay
 PASS Document interface: attribute oncanplaythrough
 PASS Document interface: attribute onchange
@@ -5527,7 +5527,7 @@
 PASS Document interface: iframe.contentDocument must inherit property "onabort" with the proper type
 FAIL Document interface: iframe.contentDocument must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS Document interface: iframe.contentDocument must inherit property "onblur" with the proper type
-FAIL Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncanplay" with the proper type
 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
@@ -5652,7 +5652,7 @@
 PASS Document interface: new Document() must inherit property "onabort" with the proper type
 FAIL Document interface: new Document() must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS Document interface: new Document() must inherit property "onblur" with the proper type
-FAIL Document interface: new Document() must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS Document interface: new Document() must inherit property "oncancel" with the proper type
 PASS Document interface: new Document() must inherit property "oncanplay" with the proper type
 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
@@ -5777,7 +5777,7 @@
 PASS Document interface: documentWithHandlers must inherit property "onabort" with the proper type
 FAIL Document interface: documentWithHandlers must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" found on object expected in prototype chain
 PASS Document interface: documentWithHandlers must inherit property "onblur" with the proper type
-FAIL Document interface: documentWithHandlers must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" found on object expected in prototype chain
+PASS Document interface: documentWithHandlers must inherit property "oncancel" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncanplay" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onchange" 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 (280702 => 280703)


--- trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -14,11 +14,11 @@
 PASS onblur: the content attribute must be compiled into a function as the corresponding property
 PASS onblur: dynamic changes on the attribute
 PASS onblur: dispatching an Event at a <math> element must trigger element.onblur
-FAIL oncancel: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "oncancel" expected true got false
-FAIL oncancel: 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 oncancel: the content attribute must be compiled into a function as the corresponding property assert_equals: The oncancel property must be a function expected "function" but got "undefined"
-FAIL oncancel: dynamic changes on the attribute assert_equals: The oncancel property must be null (no attribute) expected (object) null but got (undefined) undefined
-FAIL oncancel: dispatching an Event at a <math> element must trigger element.oncancel assert_equals: The event must be fired at the <math> element expected (object) Element node <math></math> but got (undefined) undefined
+PASS oncancel: must be on the appropriate locations for GlobalEventHandlers
+PASS oncancel: the default value must be null
+PASS oncancel: the content attribute must be compiled into a function as the corresponding property
+PASS oncancel: dynamic changes on the attribute
+PASS oncancel: dispatching an Event at a <math> element must trigger element.oncancel
 PASS oncanplay: must be on the appropriate locations for GlobalEventHandlers
 PASS oncanplay: the default value must be null
 PASS oncanplay: 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 (280702 => 280703)


--- trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -263,7 +263,7 @@
 PASS HTMLElement interface: attribute onabort
 FAIL HTMLElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS HTMLElement interface: attribute onblur
-FAIL HTMLElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS HTMLElement interface: attribute oncancel
 PASS HTMLElement interface: attribute oncanplay
 PASS HTMLElement interface: attribute oncanplaythrough
 PASS HTMLElement interface: attribute onchange
@@ -358,7 +358,7 @@
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onabort" with the proper type
 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onblur" with the proper type
-FAIL HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplay" with the proper type
 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
@@ -4403,7 +4403,7 @@
 PASS Window interface: attribute onabort
 FAIL Window interface: attribute onauxclick assert_own_property: The global object must have a property "onauxclick" expected property "onauxclick" missing
 PASS Window interface: attribute onblur
-FAIL Window interface: attribute oncancel assert_own_property: The global object must have a property "oncancel" expected property "oncancel" missing
+PASS Window interface: attribute oncancel
 PASS Window interface: attribute oncanplay
 PASS Window interface: attribute oncanplaythrough
 PASS Window interface: attribute onchange
@@ -4553,7 +4553,7 @@
 PASS Window interface: window must inherit property "onabort" with the proper type
 FAIL Window interface: window must inherit property "onauxclick" with the proper type assert_own_property: expected property "onauxclick" missing
 PASS Window interface: window must inherit property "onblur" with the proper type
-FAIL Window interface: window must inherit property "oncancel" with the proper type assert_own_property: expected property "oncancel" missing
+PASS Window interface: window must inherit property "oncancel" with the proper type
 PASS Window interface: window must inherit property "oncanplay" with the proper type
 PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
 PASS Window interface: window must inherit property "onchange" with the proper type
@@ -5268,7 +5268,7 @@
 PASS SVGElement interface: attribute onabort
 FAIL SVGElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS SVGElement interface: attribute onblur
-FAIL SVGElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS SVGElement interface: attribute oncancel
 PASS SVGElement interface: attribute oncanplay
 PASS SVGElement interface: attribute oncanplaythrough
 PASS SVGElement interface: attribute onchange
@@ -5402,7 +5402,7 @@
 PASS Document interface: attribute onabort
 FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS Document interface: attribute onblur
-FAIL Document interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS Document interface: attribute oncancel
 PASS Document interface: attribute oncanplay
 PASS Document interface: attribute oncanplaythrough
 PASS Document interface: attribute onchange
@@ -5527,7 +5527,7 @@
 PASS Document interface: iframe.contentDocument must inherit property "onabort" with the proper type
 FAIL Document interface: iframe.contentDocument must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS Document interface: iframe.contentDocument must inherit property "onblur" with the proper type
-FAIL Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncanplay" with the proper type
 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
@@ -5652,7 +5652,7 @@
 PASS Document interface: new Document() must inherit property "onabort" with the proper type
 FAIL Document interface: new Document() must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS Document interface: new Document() must inherit property "onblur" with the proper type
-FAIL Document interface: new Document() must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS Document interface: new Document() must inherit property "oncancel" with the proper type
 PASS Document interface: new Document() must inherit property "oncanplay" with the proper type
 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
@@ -5777,7 +5777,7 @@
 PASS Document interface: documentWithHandlers must inherit property "onabort" with the proper type
 FAIL Document interface: documentWithHandlers must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" found on object expected in prototype chain
 PASS Document interface: documentWithHandlers must inherit property "onblur" with the proper type
-FAIL Document interface: documentWithHandlers must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" found on object expected in prototype chain
+PASS Document interface: documentWithHandlers must inherit property "oncancel" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncanplay" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onchange" 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 (280702 => 280703)


--- trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -14,11 +14,11 @@
 PASS onblur: the content attribute must be compiled into a function as the corresponding property
 PASS onblur: dynamic changes on the attribute
 PASS onblur: dispatching an Event at a <math> element must trigger element.onblur
-FAIL oncancel: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "oncancel" expected true got false
-FAIL oncancel: 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 oncancel: the content attribute must be compiled into a function as the corresponding property assert_equals: The oncancel property must be a function expected "function" but got "undefined"
-FAIL oncancel: dynamic changes on the attribute assert_equals: The oncancel property must be null (no attribute) expected (object) null but got (undefined) undefined
-FAIL oncancel: dispatching an Event at a <math> element must trigger element.oncancel assert_equals: The event must be fired at the <math> element expected (object) Element node <math></math> but got (undefined) undefined
+PASS oncancel: must be on the appropriate locations for GlobalEventHandlers
+PASS oncancel: the default value must be null
+PASS oncancel: the content attribute must be compiled into a function as the corresponding property
+PASS oncancel: dynamic changes on the attribute
+PASS oncancel: dispatching an Event at a <math> element must trigger element.oncancel
 PASS oncanplay: must be on the appropriate locations for GlobalEventHandlers
 PASS oncanplay: the default value must be null
 PASS oncanplay: 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 (280702 => 280703)


--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt	2021-08-05 20:56:52 UTC (rev 280703)
@@ -263,7 +263,7 @@
 PASS HTMLElement interface: attribute onabort
 FAIL HTMLElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS HTMLElement interface: attribute onblur
-FAIL HTMLElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS HTMLElement interface: attribute oncancel
 PASS HTMLElement interface: attribute oncanplay
 PASS HTMLElement interface: attribute oncanplaythrough
 PASS HTMLElement interface: attribute onchange
@@ -358,7 +358,7 @@
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onabort" with the proper type
 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onblur" with the proper type
-FAIL HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type
 PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplay" with the proper type
 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
@@ -4403,7 +4403,7 @@
 PASS Window interface: attribute onabort
 FAIL Window interface: attribute onauxclick assert_own_property: The global object must have a property "onauxclick" expected property "onauxclick" missing
 PASS Window interface: attribute onblur
-FAIL Window interface: attribute oncancel assert_own_property: The global object must have a property "oncancel" expected property "oncancel" missing
+PASS Window interface: attribute oncancel
 PASS Window interface: attribute oncanplay
 PASS Window interface: attribute oncanplaythrough
 PASS Window interface: attribute onchange
@@ -4553,7 +4553,7 @@
 PASS Window interface: window must inherit property "onabort" with the proper type
 FAIL Window interface: window must inherit property "onauxclick" with the proper type assert_own_property: expected property "onauxclick" missing
 PASS Window interface: window must inherit property "onblur" with the proper type
-FAIL Window interface: window must inherit property "oncancel" with the proper type assert_own_property: expected property "oncancel" missing
+PASS Window interface: window must inherit property "oncancel" with the proper type
 PASS Window interface: window must inherit property "oncanplay" with the proper type
 PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
 PASS Window interface: window must inherit property "onchange" with the proper type
@@ -5268,7 +5268,7 @@
 PASS SVGElement interface: attribute onabort
 FAIL SVGElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS SVGElement interface: attribute onblur
-FAIL SVGElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS SVGElement interface: attribute oncancel
 PASS SVGElement interface: attribute oncanplay
 PASS SVGElement interface: attribute oncanplaythrough
 PASS SVGElement interface: attribute onchange
@@ -5402,7 +5402,7 @@
 PASS Document interface: attribute onabort
 FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
 PASS Document interface: attribute onblur
-FAIL Document interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
+PASS Document interface: attribute oncancel
 PASS Document interface: attribute oncanplay
 PASS Document interface: attribute oncanplaythrough
 PASS Document interface: attribute onchange
@@ -5527,7 +5527,7 @@
 PASS Document interface: iframe.contentDocument must inherit property "onabort" with the proper type
 FAIL Document interface: iframe.contentDocument must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS Document interface: iframe.contentDocument must inherit property "onblur" with the proper type
-FAIL Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type
 PASS Document interface: iframe.contentDocument must inherit property "oncanplay" with the proper type
 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
@@ -5652,7 +5652,7 @@
 PASS Document interface: new Document() must inherit property "onabort" with the proper type
 FAIL Document interface: new Document() must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
 PASS Document interface: new Document() must inherit property "onblur" with the proper type
-FAIL Document interface: new Document() must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
+PASS Document interface: new Document() must inherit property "oncancel" with the proper type
 PASS Document interface: new Document() must inherit property "oncanplay" with the proper type
 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
@@ -5777,7 +5777,7 @@
 PASS Document interface: documentWithHandlers must inherit property "onabort" with the proper type
 FAIL Document interface: documentWithHandlers must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" found on object expected in prototype chain
 PASS Document interface: documentWithHandlers must inherit property "onblur" with the proper type
-FAIL Document interface: documentWithHandlers must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" found on object expected in prototype chain
+PASS Document interface: documentWithHandlers must inherit property "oncancel" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncanplay" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
 PASS Document interface: documentWithHandlers must inherit property "onchange" with the proper type

Modified: trunk/Source/WebCore/ChangeLog (280702 => 280703)


--- trunk/Source/WebCore/ChangeLog	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/Source/WebCore/ChangeLog	2021-08-05 20:56:52 UTC (rev 280703)
@@ -1,3 +1,31 @@
+2021-08-05  Tim Nguyen  <[email protected]>
+
+        Implement support for <dialog> element cancel event
+        https://bugs.webkit.org/show_bug.cgi?id=227534
+
+        Reviewed by Chris Dumez.
+
+        This makes <dialog> emit a cancel event then close when the escape key is pressed.
+
+        Updated relevant WPT:
+        - <dialog> cancel event WPTs: used send_keys instead of test_driver.Actions() (which are unsupported by WebKit test runner)
+        - oncancel now is recognized
+
+        Failing WPT:
+        - dialog-cancel-with-input.html: needs <dialog> focusing steps (webkit.org/b/227537) to be implemented for <input> to get focus
+        - dialog-cancel-with-select.html: needs <dialog> focusing steps (webkit.org/b/227537) to be implemented for <select> to get focus
+        - dialog-keydown-preventDefault.html: current implementation does not prevent canceling from happening when keydown event has preventDefault()
+
+        * dom/GlobalEventHandlers.idl:
+        * html/HTMLAttributeNames.in:
+        * html/HTMLDialogElement.cpp:
+        (WebCore::HTMLDialogElement::cancel):
+        * html/HTMLDialogElement.h:
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::createEventHandlerNameMap):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::internalKeyEvent):
+
 2021-08-05  Eric Carlson  <[email protected]>
 
         [iOS] getUserMedia sometimes doesn't capture from specified microphone

Modified: trunk/Source/WebCore/dom/GlobalEventHandlers.idl (280702 => 280703)


--- trunk/Source/WebCore/dom/GlobalEventHandlers.idl	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/Source/WebCore/dom/GlobalEventHandlers.idl	2021-08-05 20:56:52 UTC (rev 280703)
@@ -33,8 +33,7 @@
     // FIXME: Implement 'onauxclick'.
     // attribute EventHandler onauxclick;
     attribute EventHandler onblur;
-    // FIXME: Implement 'oncancel'.
-    // attribute EventHandler oncancel;
+    attribute EventHandler oncancel;
     attribute EventHandler oncanplay;
     attribute EventHandler oncanplaythrough;
     attribute EventHandler onchange;

Modified: trunk/Source/WebCore/html/HTMLAttributeNames.in (280702 => 280703)


--- trunk/Source/WebCore/html/HTMLAttributeNames.in	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/Source/WebCore/html/HTMLAttributeNames.in	2021-08-05 20:56:52 UTC (rev 280703)
@@ -220,6 +220,7 @@
 onbeforeprint
 onbeforeunload
 onblur
+oncancel
 oncanplay
 oncanplaythrough
 onchange

Modified: trunk/Source/WebCore/html/HTMLDialogElement.cpp (280702 => 280703)


--- trunk/Source/WebCore/html/HTMLDialogElement.cpp	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/Source/WebCore/html/HTMLDialogElement.cpp	2021-08-05 20:56:52 UTC (rev 280703)
@@ -95,4 +95,14 @@
     });
 }
 
+void HTMLDialogElement::cancel()
+{
+    document().eventLoop().queueTask(TaskSource::UserInteraction, [protectedThis = GCReachableRef { *this }] {
+        auto cancelEvent = Event::create(eventNames().cancelEvent, Event::CanBubble::No, Event::IsCancelable::Yes);
+        protectedThis->dispatchEvent(cancelEvent);
+        if (!cancelEvent->defaultPrevented())
+            protectedThis->close(nullString());
+    });
 }
+
+}

Modified: trunk/Source/WebCore/html/HTMLDialogElement.h (280702 => 280703)


--- trunk/Source/WebCore/html/HTMLDialogElement.h	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/Source/WebCore/html/HTMLDialogElement.h	2021-08-05 20:56:52 UTC (rev 280703)
@@ -43,6 +43,8 @@
     ExceptionOr<void> showModal();
     void close(const String&);
 
+    void cancel();
+
     bool isModal() const { return m_isModal; };
 
 private:

Modified: trunk/Source/WebCore/html/HTMLElement.cpp (280702 => 280703)


--- trunk/Source/WebCore/html/HTMLElement.cpp	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/Source/WebCore/html/HTMLElement.cpp	2021-08-05 20:56:52 UTC (rev 280703)
@@ -266,6 +266,7 @@
         &onbeforeloadAttr.get(),
         &onbeforepasteAttr.get(),
         &onblurAttr.get(),
+        &oncancelAttr.get(),
         &oncanplayAttr.get(),
         &oncanplaythroughAttr.get(),
         &onchangeAttr.get(),

Modified: trunk/Source/WebCore/page/EventHandler.cpp (280702 => 280703)


--- trunk/Source/WebCore/page/EventHandler.cpp	2021-08-05 19:29:05 UTC (rev 280702)
+++ trunk/Source/WebCore/page/EventHandler.cpp	2021-08-05 20:56:52 UTC (rev 280703)
@@ -55,6 +55,7 @@
 #include "FrameTree.h"
 #include "FrameView.h"
 #include "FullscreenManager.h"
+#include "HTMLDialogElement.h"
 #include "HTMLDocument.h"
 #include "HTMLFrameElement.h"
 #include "HTMLFrameSetElement.h"
@@ -3510,6 +3511,13 @@
         }
     }
 
+    if (auto* activeModalDialog = m_frame.document()->activeModalDialog()) {
+        if (initialKeyEvent.type() == PlatformEvent::KeyDown && initialKeyEvent.windowsVirtualKeyCode() == VK_ESCAPE) {
+            activeModalDialog->cancel();
+            return true;
+        }
+    }
+
 #if ENABLE(FULLSCREEN_API)
     if (m_frame.document()->fullscreenManager().isFullscreen()) {
         if (initialKeyEvent.type() == PlatformEvent::KeyDown && initialKeyEvent.windowsVirtualKeyCode() == VK_ESCAPE) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to