Changeset 280703 in webkit


Ignore:
Timestamp:
Aug 5, 2021 1:56:52 PM (12 months ago)
Author:
ntim@apple.com
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:
Location:
trunk
Files:
4 added
34 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r280691 r280703  
     12021-08-05  Tim Nguyen  <ntim@apple.com>
     2
     3        Implement support for <dialog> element cancel event
     4        https://bugs.webkit.org/show_bug.cgi?id=227534
     5
     6        Reviewed by Chris Dumez.
     7
     8        This makes <dialog> emit a cancel event then close when the escape key is pressed.
     9
     10        Updated relevant WPT:
     11        - <dialog> cancel event WPTs: used send_keys instead of test_driver.Actions() (which are unsupported by WebKit test runner)
     12        - oncancel now is recognized
     13
     14        Failing WPT:
     15        - dialog-cancel-with-input.html: needs <dialog> focusing steps (webkit.org/b/227537) to be implemented for <input> to get focus
     16        - dialog-cancel-with-select.html: needs <dialog> focusing steps (webkit.org/b/227537) to be implemented for <select> to get focus
     17        - dialog-keydown-preventDefault.html: current implementation does not prevent canceling from happening when keydown event has preventDefault()
     18
     19        * platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
     20        * platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
     21        * platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
     22        * platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events-expected.txt: Added.
     23        * platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault-expected.txt: Added.
     24        * platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input-expected.txt: Added.
     25        * platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault-expected.txt: Added.
     26        * platform/ios-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
     27        * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
     28        * platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
     29        * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
     30        * platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
     31        * platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
     32
    1332021-08-04  Robert Jenner  <Jenner@apple.com>
    234
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r280688 r280703  
     12021-08-05  Tim Nguyen  <ntim@apple.com>
     2
     3        Implement support for <dialog> element cancel event
     4        https://bugs.webkit.org/show_bug.cgi?id=227534
     5
     6        Reviewed by Chris Dumez.
     7
     8        This makes <dialog> emit a cancel event then close when the escape key is pressed.
     9
     10        Updated relevant WPT:
     11        - <dialog> cancel event WPTs: used send_keys instead of test_driver.Actions() (which are unsupported by WebKit test runner)
     12        - oncancel now is recognized
     13
     14        Failing WPT:
     15        - dialog-cancel-with-input.html: needs <dialog> focusing steps (webkit.org/b/227537) to be implemented for <input> to get focus
     16        - dialog-cancel-with-select.html: needs <dialog> focusing steps (webkit.org/b/227537) to be implemented for <select> to get focus
     17        - dialog-keydown-preventDefault.html: current implementation does not prevent canceling from happening when keydown event has preventDefault()
     18
     19        * web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt:
     20        * web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt:
     21        * web-platform-tests/html/dom/idlharness.https-expected.txt:
     22        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events-expected.txt:
     23        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events.html:
     24        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault-expected.txt:
     25        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault.html:
     26        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input-expected.txt:
     27        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input.html:
     28        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-select.html:
     29        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault-expected.txt:
     30        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault.html:
     31        * web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events-expected.txt:
     32        * web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt:
     33        * web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt:
     34        * web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
     35
    1362021-08-05  Tim Nguyen  <ntim@apple.com>
    237
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt

    r279406 r280703  
    1919PASS A SecurityError exception must be thrown when window.onbeforeunload is accessed from a different origin.
    2020PASS A SecurityError exception must be thrown when window.onblur is accessed from a different origin.
    21 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
     21PASS A SecurityError exception must be thrown when window.oncancel is accessed from a different origin.
    2222PASS A SecurityError exception must be thrown when window.oncanplay is accessed from a different origin.
    2323PASS A SecurityError exception must be thrown when window.oncanplaythrough is accessed from a different origin.
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt

    r279406 r280703  
    8181PASS Window attribute: onbeforeunload
    8282PASS Window attribute: onblur
    83 FAIL Window attribute: oncancel assert_true: oncancel in window expected true got false
     83PASS Window attribute: oncancel
    8484PASS Window attribute: oncanplay
    8585PASS Window attribute: oncanplaythrough
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt

    r279406 r280703  
    130130FAIL HTMLElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    131131PASS HTMLElement interface: attribute onblur
    132 FAIL HTMLElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     132PASS HTMLElement interface: attribute oncancel
    133133PASS HTMLElement interface: attribute oncanplay
    134134PASS HTMLElement interface: attribute oncanplaythrough
     
    220220FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    221221PASS HTMLElement interface: document.createElement("noscript") must inherit property "onblur" with the proper type
    222 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     222PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type
    223223PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplay" with the proper type
    224224PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplaythrough" with the proper type
     
    41894189FAIL Window interface: attribute onauxclick assert_own_property: The global object must have a property "onauxclick" expected property "onauxclick" missing
    41904190PASS Window interface: attribute onblur
    4191 FAIL Window interface: attribute oncancel assert_own_property: The global object must have a property "oncancel" expected property "oncancel" missing
     4191PASS Window interface: attribute oncancel
    41924192PASS Window interface: attribute oncanplay
    41934193PASS Window interface: attribute oncanplaythrough
     
    43334333FAIL Window interface: window must inherit property "onauxclick" with the proper type assert_own_property: expected property "onauxclick" missing
    43344334PASS Window interface: window must inherit property "onblur" with the proper type
    4335 FAIL Window interface: window must inherit property "oncancel" with the proper type assert_own_property: expected property "oncancel" missing
     4335PASS Window interface: window must inherit property "oncancel" with the proper type
    43364336PASS Window interface: window must inherit property "oncanplay" with the proper type
    43374337PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
     
    50345034FAIL SVGElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    50355035PASS SVGElement interface: attribute onblur
    5036 FAIL SVGElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     5036PASS SVGElement interface: attribute oncancel
    50375037PASS SVGElement interface: attribute oncanplay
    50385038PASS SVGElement interface: attribute oncanplaythrough
     
    51765176FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    51775177PASS Document interface: attribute onblur
    5178 FAIL Document interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     5178PASS Document interface: attribute oncancel
    51795179PASS Document interface: attribute oncanplay
    51805180PASS Document interface: attribute oncanplaythrough
     
    52975297FAIL Document interface: iframe.contentDocument must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    52985298PASS Document interface: iframe.contentDocument must inherit property "onblur" with the proper type
    5299 FAIL Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     5299PASS Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type
    53005300PASS Document interface: iframe.contentDocument must inherit property "oncanplay" with the proper type
    53015301PASS Document interface: iframe.contentDocument must inherit property "oncanplaythrough" with the proper type
     
    54185418FAIL Document interface: new Document() must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    54195419PASS Document interface: new Document() must inherit property "onblur" with the proper type
    5420 FAIL Document interface: new Document() must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     5420PASS Document interface: new Document() must inherit property "oncancel" with the proper type
    54215421PASS Document interface: new Document() must inherit property "oncanplay" with the proper type
    54225422PASS Document interface: new Document() must inherit property "oncanplaythrough" with the proper type
     
    55395539FAIL Document interface: documentWithHandlers must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" found on object expected in prototype chain
    55405540PASS Document interface: documentWithHandlers must inherit property "onblur" with the proper type
    5541 FAIL Document interface: documentWithHandlers must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" found on object expected in prototype chain
     5541PASS Document interface: documentWithHandlers must inherit property "oncancel" with the proper type
    55425542PASS Document interface: documentWithHandlers must inherit property "oncanplay" with the proper type
    55435543PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events-expected.txt

    r280688 r280703  
    1 CONSOLE MESSAGE: ReferenceError: Can't find variable: action
    21Test cancel event is fired when the dialog is closed by user interaction
    32
    4 Hello World
    53
     4PASS Test cancel event is fired when the dialog is closed by user interaction
    65
    7 FAIL Test cancel event is fired when the dialog is closed by user interaction ReferenceError: Can't find variable: action
    8 
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events.html

    r280688 r280703  
    77  <script src="/resources/testdriver.js"></script>
    88  <script src="/resources/testdriver-vendor.js"></script>
    9   <script src="/resources/testdriver-actions.js"></script>
     9  <link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=227534">
    1010  <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1322947">
    1111</head>
     
    4040
    4141  dialog.showModal();
    42 
    43   const escKey = "\uE00C";
    44   new test_driver.Actions()
    45     .keyDown(escKey)
    46     .keyUp(escKey)
    47     .send();
     42  test_driver.send_keys(document.documentElement, "\uE00C"); // ESC key
    4843</script>
    4944</body>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault-expected.txt

    r280688 r280703  
    1 CONSOLE MESSAGE: ReferenceError: Can't find variable: action
    21Test cancel event with preventDefault on cancel event for dialog element
    32
     
    54
    65
    7 FAIL Test cancel event with preventDefault on cancel event for dialog element ReferenceError: Can't find variable: action
     6PASS Test cancel event with preventDefault on cancel event for dialog element
    87
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault.html

    r280688 r280703  
    77  <script src="/resources/testdriver.js"></script>
    88  <script src="/resources/testdriver-vendor.js"></script>
    9   <script src="/resources/testdriver-actions.js"></script>
     9  <link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=227534">
    1010  <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1322947">
    1111</head>
     
    4040
    4141  dialog.showModal();
    42   const escKey = "\uE00C";
    43   new test_driver.Actions()
    44     .keyDown(escKey)
    45     .keyUp(escKey)
    46     .send();
     42  test_driver.send_keys(document.documentElement, "\uE00C"); // ESC key
    4743</script>
    4844</body>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input-expected.txt

    r280688 r280703  
    1 CONSOLE MESSAGE: ReferenceError: Can't find variable: action
     1CONSOLE MESSAGE: Error: assert_true: input element should be focused expected true got false
    22Test dialog modal is closed by escape key with input focused
    33
    4 Hello World
    54
    65
    7 FAIL Test dialog modal is closed by escape key with input focused ReferenceError: Can't find variable: action
     6FAIL Test dialog modal is closed by escape key with input focused Error: assert_true: input element should be focused expected true got false
    87
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-input.html

    r280688 r280703  
    77  <script src="/resources/testdriver.js"></script>
    88  <script src="/resources/testdriver-vendor.js"></script>
    9   <script src="/resources/testdriver-actions.js"></script>
     9  <link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=227534">
    1010  <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1322947">
    1111</head>
     
    2424
    2525  const triggerEscKey = () => {
    26     const escKey = "\uE00C";
    27     new test_driver.Actions()
    28       .keyDown(escKey)
    29       .keyUp(escKey)
    30       .send();
     26    test_driver.send_keys(document.documentElement, "\uE00C"); // ESC key
    3127  };
    3228
     
    5046  dialog.addEventListener("close", function() {
    5147    assert_false(dialog.open, "dialog closed");
    52     step_timeout(function(){
     48    step_timeout(function() {
    5349      runTestCancelWhenInputFocused();
    5450    }, 0);
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-with-select.html

    r280688 r280703  
    77  <script src="/resources/testdriver.js"></script>
    88  <script src="/resources/testdriver-vendor.js"></script>
    9   <script src="/resources/testdriver-actions.js"></script>
     9  <link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=227534">
    1010  <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1322947">
    1111</head>
     
    3232  assert_true(select == document.activeElement, "select element should be focused");
    3333
    34   const escKey = "\uE00C";
    35   new test_driver.Actions()
    36     .keyDown(escKey)
    37     .keyUp(escKey)
    38     .send();
     34  test_driver.send_keys(document.documentElement, "\uE00C"); // ESC key
    3935</script>
    4036</body>
    4137</html>
    42 
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault-expected.txt

    r280688 r280703  
    1 CONSOLE MESSAGE: ReferenceError: Can't find variable: action
    21Test cancel event with preventDefault on keydown event for dialog element
    32
    4 Hello World
    53
     4Harness Error (TIMEOUT), message = null
    65
    7 FAIL Test cancel event with preventDefault on keydown event for dialog element ReferenceError: Can't find variable: action
     6NOTRUN Test cancel event with preventDefault on keydown event for dialog element
    87
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-keydown-preventDefault.html

    r280688 r280703  
    77  <script src="/resources/testdriver.js"></script>
    88  <script src="/resources/testdriver-vendor.js"></script>
    9   <script src="/resources/testdriver-actions.js"></script>
     9  <link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=227534">
    1010  <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1322947">
    1111</head>
     
    4040  });
    4141  dialog.showModal();
    42   const escKey = "\uE00C";
    43   new test_driver.Actions()
    44     .keyDown(escKey)
    45     .keyUp(escKey)
    46     .send();
     42  test_driver.send_keys(document.documentElement, "\uE00C"); // ESC key
    4743</script>
    4844</body>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events-expected.txt

    r280310 r280703  
    1515PASS onblur: the content attribute must execute when an event is dispatched
    1616PASS onblur: dispatching an Event at a <meta> element must trigger element.onblur
    17 FAIL oncancel: must be on the appropriate locations for GlobalEventHandlers assert_true: Window has an own property named "oncancel" expected true got false
    18 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
    19 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"
    20 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
     17PASS oncancel: must be on the appropriate locations for GlobalEventHandlers
     18PASS oncancel: the default value must be null
     19PASS oncancel: the content attribute must be compiled into a function as the corresponding property
     20PASS oncancel: the content attribute must execute when an event is dispatched
    2121PASS oncancel: dispatching an Event at a <meta> element must trigger element.oncancel
    2222PASS oncanplay: must be on the appropriate locations for GlobalEventHandlers
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt

    r280310 r280703  
    2424PASS not shadowed abort (document.body)
    2525FAIL not shadowed auxclick (document.body) assert_equals: alternative body should reflect expected (object) null but got (undefined) undefined
    26 FAIL not shadowed cancel (document.body) assert_equals: alternative body should reflect expected (object) null but got (undefined) undefined
     26PASS not shadowed cancel (document.body)
    2727PASS not shadowed canplay (document.body)
    2828PASS not shadowed canplaythrough (document.body)
     
    131131PASS not shadowed abort (document.createElement("body"))
    132132FAIL not shadowed auxclick (document.createElement("body")) assert_equals: body should reflect expected (object) null but got (undefined) undefined
    133 FAIL not shadowed cancel (document.createElement("body")) assert_equals: body should reflect expected (object) null but got (undefined) undefined
     133PASS not shadowed cancel (document.createElement("body"))
    134134PASS not shadowed canplay (document.createElement("body"))
    135135PASS not shadowed canplaythrough (document.createElement("body"))
     
    238238PASS not shadowed abort (window)
    239239FAIL not shadowed auxclick (window) assert_equals: body should reflect expected (object) null but got (undefined) undefined
    240 FAIL not shadowed cancel (window) assert_equals: body should reflect expected (object) null but got (undefined) undefined
     240PASS not shadowed cancel (window)
    241241PASS not shadowed canplay (window)
    242242PASS not shadowed canplaythrough (window)
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt

    r280310 r280703  
    4646PASS abort is unaffected on a windowless body
    4747FAIL auxclick is unaffected on a windowless body assert_equals: expected (object) null but got (undefined) undefined
    48 FAIL cancel is unaffected on a windowless body assert_equals: expected (object) null but got (undefined) undefined
     48PASS cancel is unaffected on a windowless body
    4949PASS canplay is unaffected on a windowless body
    5050PASS canplaythrough is unaffected on a windowless body
     
    153153PASS abort is unaffected on a windowless frameset
    154154FAIL auxclick is unaffected on a windowless frameset assert_equals: expected (object) null but got (undefined) undefined
    155 FAIL cancel is unaffected on a windowless frameset assert_equals: expected (object) null but got (undefined) undefined
     155PASS cancel is unaffected on a windowless frameset
    156156PASS canplay is unaffected on a windowless frameset
    157157PASS canplaythrough is unaffected on a windowless frameset
  • trunk/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt

    r279406 r280703  
    1515PASS onblur: dynamic changes on the attribute
    1616PASS onblur: dispatching an Event at a <math> element must trigger element.onblur
    17 FAIL oncancel: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "oncancel" expected true got false
    18 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
    19 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"
    20 FAIL oncancel: dynamic changes on the attribute assert_equals: The oncancel property must be null (no attribute) expected (object) null but got (undefined) undefined
    21 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
     17PASS oncancel: must be on the appropriate locations for GlobalEventHandlers
     18PASS oncancel: the default value must be null
     19PASS oncancel: the content attribute must be compiled into a function as the corresponding property
     20PASS oncancel: dynamic changes on the attribute
     21PASS oncancel: dispatching an Event at a <math> element must trigger element.oncancel
    2222PASS oncanplay: must be on the appropriate locations for GlobalEventHandlers
    2323PASS oncanplay: the default value must be null
  • trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt

    r280678 r280703  
    1515PASS onblur: dynamic changes on the attribute
    1616PASS onblur: dispatching an Event at a <math> element must trigger element.onblur
    17 FAIL oncancel: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "oncancel" expected true got false
    18 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
    19 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"
    20 FAIL oncancel: dynamic changes on the attribute assert_equals: The oncancel property must be null (no attribute) expected (object) null but got (undefined) undefined
    21 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
     17PASS oncancel: must be on the appropriate locations for GlobalEventHandlers
     18PASS oncancel: the default value must be null
     19PASS oncancel: the content attribute must be compiled into a function as the corresponding property
     20PASS oncancel: dynamic changes on the attribute
     21PASS oncancel: dispatching an Event at a <math> element must trigger element.oncancel
    2222PASS oncanplay: must be on the appropriate locations for GlobalEventHandlers
    2323PASS oncanplay: the default value must be null
  • trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt

    r280678 r280703  
    264264FAIL HTMLElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    265265PASS HTMLElement interface: attribute onblur
    266 FAIL HTMLElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     266PASS HTMLElement interface: attribute oncancel
    267267PASS HTMLElement interface: attribute oncanplay
    268268PASS HTMLElement interface: attribute oncanplaythrough
     
    359359FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    360360PASS HTMLElement interface: document.createElement("noscript") must inherit property "onblur" with the proper type
    361 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     361PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type
    362362PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplay" with the proper type
    363363PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplaythrough" with the proper type
     
    44044404FAIL Window interface: attribute onauxclick assert_own_property: The global object must have a property "onauxclick" expected property "onauxclick" missing
    44054405PASS Window interface: attribute onblur
    4406 FAIL Window interface: attribute oncancel assert_own_property: The global object must have a property "oncancel" expected property "oncancel" missing
     4406PASS Window interface: attribute oncancel
    44074407PASS Window interface: attribute oncanplay
    44084408PASS Window interface: attribute oncanplaythrough
     
    45544554FAIL Window interface: window must inherit property "onauxclick" with the proper type assert_own_property: expected property "onauxclick" missing
    45554555PASS Window interface: window must inherit property "onblur" with the proper type
    4556 FAIL Window interface: window must inherit property "oncancel" with the proper type assert_own_property: expected property "oncancel" missing
     4556PASS Window interface: window must inherit property "oncancel" with the proper type
    45574557PASS Window interface: window must inherit property "oncanplay" with the proper type
    45584558PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
     
    52695269FAIL SVGElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    52705270PASS SVGElement interface: attribute onblur
    5271 FAIL SVGElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     5271PASS SVGElement interface: attribute oncancel
    52725272PASS SVGElement interface: attribute oncanplay
    52735273PASS SVGElement interface: attribute oncanplaythrough
     
    54035403FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    54045404PASS Document interface: attribute onblur
    5405 FAIL Document interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     5405PASS Document interface: attribute oncancel
    54065406PASS Document interface: attribute oncanplay
    54075407PASS Document interface: attribute oncanplaythrough
     
    55285528FAIL Document interface: iframe.contentDocument must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    55295529PASS Document interface: iframe.contentDocument must inherit property "onblur" with the proper type
    5530 FAIL Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     5530PASS Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type
    55315531PASS Document interface: iframe.contentDocument must inherit property "oncanplay" with the proper type
    55325532PASS Document interface: iframe.contentDocument must inherit property "oncanplaythrough" with the proper type
     
    56535653FAIL Document interface: new Document() must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    56545654PASS Document interface: new Document() must inherit property "onblur" with the proper type
    5655 FAIL Document interface: new Document() must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     5655PASS Document interface: new Document() must inherit property "oncancel" with the proper type
    56565656PASS Document interface: new Document() must inherit property "oncanplay" with the proper type
    56575657PASS Document interface: new Document() must inherit property "oncanplaythrough" with the proper type
     
    57785778FAIL Document interface: documentWithHandlers must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" found on object expected in prototype chain
    57795779PASS Document interface: documentWithHandlers must inherit property "onblur" with the proper type
    5780 FAIL Document interface: documentWithHandlers must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" found on object expected in prototype chain
     5780PASS Document interface: documentWithHandlers must inherit property "oncancel" with the proper type
    57815781PASS Document interface: documentWithHandlers must inherit property "oncanplay" with the proper type
    57825782PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
  • trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt

    r280504 r280703  
    264264FAIL HTMLElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    265265PASS HTMLElement interface: attribute onblur
    266 FAIL HTMLElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     266PASS HTMLElement interface: attribute oncancel
    267267PASS HTMLElement interface: attribute oncanplay
    268268PASS HTMLElement interface: attribute oncanplaythrough
     
    359359FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    360360PASS HTMLElement interface: document.createElement("noscript") must inherit property "onblur" with the proper type
    361 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     361PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type
    362362PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplay" with the proper type
    363363PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplaythrough" with the proper type
     
    43944394FAIL Window interface: attribute onauxclick assert_own_property: The global object must have a property "onauxclick" expected property "onauxclick" missing
    43954395PASS Window interface: attribute onblur
    4396 FAIL Window interface: attribute oncancel assert_own_property: The global object must have a property "oncancel" expected property "oncancel" missing
     4396PASS Window interface: attribute oncancel
    43974397PASS Window interface: attribute oncanplay
    43984398PASS Window interface: attribute oncanplaythrough
     
    45444544FAIL Window interface: window must inherit property "onauxclick" with the proper type assert_own_property: expected property "onauxclick" missing
    45454545PASS Window interface: window must inherit property "onblur" with the proper type
    4546 FAIL Window interface: window must inherit property "oncancel" with the proper type assert_own_property: expected property "oncancel" missing
     4546PASS Window interface: window must inherit property "oncancel" with the proper type
    45474547PASS Window interface: window must inherit property "oncanplay" with the proper type
    45484548PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
     
    52595259FAIL SVGElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    52605260PASS SVGElement interface: attribute onblur
    5261 FAIL SVGElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     5261PASS SVGElement interface: attribute oncancel
    52625262PASS SVGElement interface: attribute oncanplay
    52635263PASS SVGElement interface: attribute oncanplaythrough
     
    53935393FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    53945394PASS Document interface: attribute onblur
    5395 FAIL Document interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     5395PASS Document interface: attribute oncancel
    53965396PASS Document interface: attribute oncanplay
    53975397PASS Document interface: attribute oncanplaythrough
     
    55185518FAIL Document interface: iframe.contentDocument must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    55195519PASS Document interface: iframe.contentDocument must inherit property "onblur" with the proper type
    5520 FAIL Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     5520PASS Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type
    55215521PASS Document interface: iframe.contentDocument must inherit property "oncanplay" with the proper type
    55225522PASS Document interface: iframe.contentDocument must inherit property "oncanplaythrough" with the proper type
     
    56435643FAIL Document interface: new Document() must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    56445644PASS Document interface: new Document() must inherit property "onblur" with the proper type
    5645 FAIL Document interface: new Document() must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     5645PASS Document interface: new Document() must inherit property "oncancel" with the proper type
    56465646PASS Document interface: new Document() must inherit property "oncanplay" with the proper type
    56475647PASS Document interface: new Document() must inherit property "oncanplaythrough" with the proper type
     
    57685768FAIL Document interface: documentWithHandlers must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" found on object expected in prototype chain
    57695769PASS Document interface: documentWithHandlers must inherit property "onblur" with the proper type
    5770 FAIL Document interface: documentWithHandlers must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" found on object expected in prototype chain
     5770PASS Document interface: documentWithHandlers must inherit property "oncancel" with the proper type
    57715771PASS Document interface: documentWithHandlers must inherit property "oncanplay" with the proper type
    57725772PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
  • trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt

    r280310 r280703  
    1515PASS onblur: dynamic changes on the attribute
    1616PASS onblur: dispatching an Event at a <math> element must trigger element.onblur
    17 FAIL oncancel: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "oncancel" expected true got false
    18 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
    19 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"
    20 FAIL oncancel: dynamic changes on the attribute assert_equals: The oncancel property must be null (no attribute) expected (object) null but got (undefined) undefined
    21 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
     17PASS oncancel: must be on the appropriate locations for GlobalEventHandlers
     18PASS oncancel: the default value must be null
     19PASS oncancel: the content attribute must be compiled into a function as the corresponding property
     20PASS oncancel: dynamic changes on the attribute
     21PASS oncancel: dispatching an Event at a <math> element must trigger element.oncancel
    2222PASS oncanplay: must be on the appropriate locations for GlobalEventHandlers
    2323PASS oncanplay: the default value must be null
  • trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt

    r280504 r280703  
    264264FAIL HTMLElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    265265PASS HTMLElement interface: attribute onblur
    266 FAIL HTMLElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     266PASS HTMLElement interface: attribute oncancel
    267267PASS HTMLElement interface: attribute oncanplay
    268268PASS HTMLElement interface: attribute oncanplaythrough
     
    359359FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    360360PASS HTMLElement interface: document.createElement("noscript") must inherit property "onblur" with the proper type
    361 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     361PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type
    362362PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplay" with the proper type
    363363PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplaythrough" with the proper type
     
    44044404FAIL Window interface: attribute onauxclick assert_own_property: The global object must have a property "onauxclick" expected property "onauxclick" missing
    44054405PASS Window interface: attribute onblur
    4406 FAIL Window interface: attribute oncancel assert_own_property: The global object must have a property "oncancel" expected property "oncancel" missing
     4406PASS Window interface: attribute oncancel
    44074407PASS Window interface: attribute oncanplay
    44084408PASS Window interface: attribute oncanplaythrough
     
    45544554FAIL Window interface: window must inherit property "onauxclick" with the proper type assert_own_property: expected property "onauxclick" missing
    45554555PASS Window interface: window must inherit property "onblur" with the proper type
    4556 FAIL Window interface: window must inherit property "oncancel" with the proper type assert_own_property: expected property "oncancel" missing
     4556PASS Window interface: window must inherit property "oncancel" with the proper type
    45574557PASS Window interface: window must inherit property "oncanplay" with the proper type
    45584558PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
     
    52695269FAIL SVGElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    52705270PASS SVGElement interface: attribute onblur
    5271 FAIL SVGElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     5271PASS SVGElement interface: attribute oncancel
    52725272PASS SVGElement interface: attribute oncanplay
    52735273PASS SVGElement interface: attribute oncanplaythrough
     
    54035403FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    54045404PASS Document interface: attribute onblur
    5405 FAIL Document interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     5405PASS Document interface: attribute oncancel
    54065406PASS Document interface: attribute oncanplay
    54075407PASS Document interface: attribute oncanplaythrough
     
    55285528FAIL Document interface: iframe.contentDocument must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    55295529PASS Document interface: iframe.contentDocument must inherit property "onblur" with the proper type
    5530 FAIL Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     5530PASS Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type
    55315531PASS Document interface: iframe.contentDocument must inherit property "oncanplay" with the proper type
    55325532PASS Document interface: iframe.contentDocument must inherit property "oncanplaythrough" with the proper type
     
    56535653FAIL Document interface: new Document() must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    56545654PASS Document interface: new Document() must inherit property "onblur" with the proper type
    5655 FAIL Document interface: new Document() must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     5655PASS Document interface: new Document() must inherit property "oncancel" with the proper type
    56565656PASS Document interface: new Document() must inherit property "oncanplay" with the proper type
    56575657PASS Document interface: new Document() must inherit property "oncanplaythrough" with the proper type
     
    57785778FAIL Document interface: documentWithHandlers must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" found on object expected in prototype chain
    57795779PASS Document interface: documentWithHandlers must inherit property "onblur" with the proper type
    5780 FAIL Document interface: documentWithHandlers must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" found on object expected in prototype chain
     5780PASS Document interface: documentWithHandlers must inherit property "oncancel" with the proper type
    57815781PASS Document interface: documentWithHandlers must inherit property "oncanplay" with the proper type
    57825782PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
  • trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt

    r280310 r280703  
    1515PASS onblur: dynamic changes on the attribute
    1616PASS onblur: dispatching an Event at a <math> element must trigger element.onblur
    17 FAIL oncancel: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "oncancel" expected true got false
    18 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
    19 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"
    20 FAIL oncancel: dynamic changes on the attribute assert_equals: The oncancel property must be null (no attribute) expected (object) null but got (undefined) undefined
    21 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
     17PASS oncancel: must be on the appropriate locations for GlobalEventHandlers
     18PASS oncancel: the default value must be null
     19PASS oncancel: the content attribute must be compiled into a function as the corresponding property
     20PASS oncancel: dynamic changes on the attribute
     21PASS oncancel: dispatching an Event at a <math> element must trigger element.oncancel
    2222PASS oncanplay: must be on the appropriate locations for GlobalEventHandlers
    2323PASS oncanplay: the default value must be null
  • trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt

    r280504 r280703  
    264264FAIL HTMLElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    265265PASS HTMLElement interface: attribute onblur
    266 FAIL HTMLElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     266PASS HTMLElement interface: attribute oncancel
    267267PASS HTMLElement interface: attribute oncanplay
    268268PASS HTMLElement interface: attribute oncanplaythrough
     
    359359FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    360360PASS HTMLElement interface: document.createElement("noscript") must inherit property "onblur" with the proper type
    361 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     361PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type
    362362PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplay" with the proper type
    363363PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplaythrough" with the proper type
     
    44044404FAIL Window interface: attribute onauxclick assert_own_property: The global object must have a property "onauxclick" expected property "onauxclick" missing
    44054405PASS Window interface: attribute onblur
    4406 FAIL Window interface: attribute oncancel assert_own_property: The global object must have a property "oncancel" expected property "oncancel" missing
     4406PASS Window interface: attribute oncancel
    44074407PASS Window interface: attribute oncanplay
    44084408PASS Window interface: attribute oncanplaythrough
     
    45544554FAIL Window interface: window must inherit property "onauxclick" with the proper type assert_own_property: expected property "onauxclick" missing
    45554555PASS Window interface: window must inherit property "onblur" with the proper type
    4556 FAIL Window interface: window must inherit property "oncancel" with the proper type assert_own_property: expected property "oncancel" missing
     4556PASS Window interface: window must inherit property "oncancel" with the proper type
    45574557PASS Window interface: window must inherit property "oncanplay" with the proper type
    45584558PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
     
    52695269FAIL SVGElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    52705270PASS SVGElement interface: attribute onblur
    5271 FAIL SVGElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     5271PASS SVGElement interface: attribute oncancel
    52725272PASS SVGElement interface: attribute oncanplay
    52735273PASS SVGElement interface: attribute oncanplaythrough
     
    54035403FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    54045404PASS Document interface: attribute onblur
    5405 FAIL Document interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     5405PASS Document interface: attribute oncancel
    54065406PASS Document interface: attribute oncanplay
    54075407PASS Document interface: attribute oncanplaythrough
     
    55285528FAIL Document interface: iframe.contentDocument must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    55295529PASS Document interface: iframe.contentDocument must inherit property "onblur" with the proper type
    5530 FAIL Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     5530PASS Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type
    55315531PASS Document interface: iframe.contentDocument must inherit property "oncanplay" with the proper type
    55325532PASS Document interface: iframe.contentDocument must inherit property "oncanplaythrough" with the proper type
     
    56535653FAIL Document interface: new Document() must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    56545654PASS Document interface: new Document() must inherit property "onblur" with the proper type
    5655 FAIL Document interface: new Document() must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     5655PASS Document interface: new Document() must inherit property "oncancel" with the proper type
    56565656PASS Document interface: new Document() must inherit property "oncanplay" with the proper type
    56575657PASS Document interface: new Document() must inherit property "oncanplaythrough" with the proper type
     
    57785778FAIL Document interface: documentWithHandlers must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" found on object expected in prototype chain
    57795779PASS Document interface: documentWithHandlers must inherit property "onblur" with the proper type
    5780 FAIL Document interface: documentWithHandlers must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" found on object expected in prototype chain
     5780PASS Document interface: documentWithHandlers must inherit property "oncancel" with the proper type
    57815781PASS Document interface: documentWithHandlers must inherit property "oncanplay" with the proper type
    57825782PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
  • trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt

    r280310 r280703  
    1515PASS onblur: dynamic changes on the attribute
    1616PASS onblur: dispatching an Event at a <math> element must trigger element.onblur
    17 FAIL oncancel: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "oncancel" expected true got false
    18 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
    19 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"
    20 FAIL oncancel: dynamic changes on the attribute assert_equals: The oncancel property must be null (no attribute) expected (object) null but got (undefined) undefined
    21 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
     17PASS oncancel: must be on the appropriate locations for GlobalEventHandlers
     18PASS oncancel: the default value must be null
     19PASS oncancel: the content attribute must be compiled into a function as the corresponding property
     20PASS oncancel: dynamic changes on the attribute
     21PASS oncancel: dispatching an Event at a <math> element must trigger element.oncancel
    2222PASS oncanplay: must be on the appropriate locations for GlobalEventHandlers
    2323PASS oncanplay: the default value must be null
  • trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt

    r280678 r280703  
    264264FAIL HTMLElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    265265PASS HTMLElement interface: attribute onblur
    266 FAIL HTMLElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     266PASS HTMLElement interface: attribute oncancel
    267267PASS HTMLElement interface: attribute oncanplay
    268268PASS HTMLElement interface: attribute oncanplaythrough
     
    359359FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    360360PASS HTMLElement interface: document.createElement("noscript") must inherit property "onblur" with the proper type
    361 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     361PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type
    362362PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplay" with the proper type
    363363PASS HTMLElement interface: document.createElement("noscript") must inherit property "oncanplaythrough" with the proper type
     
    44044404FAIL Window interface: attribute onauxclick assert_own_property: The global object must have a property "onauxclick" expected property "onauxclick" missing
    44054405PASS Window interface: attribute onblur
    4406 FAIL Window interface: attribute oncancel assert_own_property: The global object must have a property "oncancel" expected property "oncancel" missing
     4406PASS Window interface: attribute oncancel
    44074407PASS Window interface: attribute oncanplay
    44084408PASS Window interface: attribute oncanplaythrough
     
    45544554FAIL Window interface: window must inherit property "onauxclick" with the proper type assert_own_property: expected property "onauxclick" missing
    45554555PASS Window interface: window must inherit property "onblur" with the proper type
    4556 FAIL Window interface: window must inherit property "oncancel" with the proper type assert_own_property: expected property "oncancel" missing
     4556PASS Window interface: window must inherit property "oncancel" with the proper type
    45574557PASS Window interface: window must inherit property "oncanplay" with the proper type
    45584558PASS Window interface: window must inherit property "oncanplaythrough" with the proper type
     
    52695269FAIL SVGElement interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    52705270PASS SVGElement interface: attribute onblur
    5271 FAIL SVGElement interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     5271PASS SVGElement interface: attribute oncancel
    52725272PASS SVGElement interface: attribute oncanplay
    52735273PASS SVGElement interface: attribute oncanplaythrough
     
    54035403FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
    54045404PASS Document interface: attribute onblur
    5405 FAIL Document interface: attribute oncancel assert_true: The prototype object must have a property "oncancel" expected true got false
     5405PASS Document interface: attribute oncancel
    54065406PASS Document interface: attribute oncanplay
    54075407PASS Document interface: attribute oncanplaythrough
     
    55285528FAIL Document interface: iframe.contentDocument must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    55295529PASS Document interface: iframe.contentDocument must inherit property "onblur" with the proper type
    5530 FAIL Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     5530PASS Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type
    55315531PASS Document interface: iframe.contentDocument must inherit property "oncanplay" with the proper type
    55325532PASS Document interface: iframe.contentDocument must inherit property "oncanplaythrough" with the proper type
     
    56535653FAIL Document interface: new Document() must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" not found in prototype chain
    56545654PASS Document interface: new Document() must inherit property "onblur" with the proper type
    5655 FAIL Document interface: new Document() must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" not found in prototype chain
     5655PASS Document interface: new Document() must inherit property "oncancel" with the proper type
    56565656PASS Document interface: new Document() must inherit property "oncanplay" with the proper type
    56575657PASS Document interface: new Document() must inherit property "oncanplaythrough" with the proper type
     
    57785778FAIL Document interface: documentWithHandlers must inherit property "onauxclick" with the proper type assert_inherits: property "onauxclick" found on object expected in prototype chain
    57795779PASS Document interface: documentWithHandlers must inherit property "onblur" with the proper type
    5780 FAIL Document interface: documentWithHandlers must inherit property "oncancel" with the proper type assert_inherits: property "oncancel" found on object expected in prototype chain
     5780PASS Document interface: documentWithHandlers must inherit property "oncancel" with the proper type
    57815781PASS Document interface: documentWithHandlers must inherit property "oncanplay" with the proper type
    57825782PASS Document interface: documentWithHandlers must inherit property "oncanplaythrough" with the proper type
  • trunk/Source/WebCore/ChangeLog

    r280702 r280703  
     12021-08-05  Tim Nguyen  <ntim@apple.com>
     2
     3        Implement support for <dialog> element cancel event
     4        https://bugs.webkit.org/show_bug.cgi?id=227534
     5
     6        Reviewed by Chris Dumez.
     7
     8        This makes <dialog> emit a cancel event then close when the escape key is pressed.
     9
     10        Updated relevant WPT:
     11        - <dialog> cancel event WPTs: used send_keys instead of test_driver.Actions() (which are unsupported by WebKit test runner)
     12        - oncancel now is recognized
     13
     14        Failing WPT:
     15        - dialog-cancel-with-input.html: needs <dialog> focusing steps (webkit.org/b/227537) to be implemented for <input> to get focus
     16        - dialog-cancel-with-select.html: needs <dialog> focusing steps (webkit.org/b/227537) to be implemented for <select> to get focus
     17        - dialog-keydown-preventDefault.html: current implementation does not prevent canceling from happening when keydown event has preventDefault()
     18
     19        * dom/GlobalEventHandlers.idl:
     20        * html/HTMLAttributeNames.in:
     21        * html/HTMLDialogElement.cpp:
     22        (WebCore::HTMLDialogElement::cancel):
     23        * html/HTMLDialogElement.h:
     24        * html/HTMLElement.cpp:
     25        (WebCore::HTMLElement::createEventHandlerNameMap):
     26        * page/EventHandler.cpp:
     27        (WebCore::EventHandler::internalKeyEvent):
     28
    1292021-08-05  Eric Carlson  <eric.carlson@apple.com>
    230
  • trunk/Source/WebCore/dom/GlobalEventHandlers.idl

    r280310 r280703  
    3434    // attribute EventHandler onauxclick;
    3535    attribute EventHandler onblur;
    36     // FIXME: Implement 'oncancel'.
    37     // attribute EventHandler oncancel;
     36    attribute EventHandler oncancel;
    3837    attribute EventHandler oncanplay;
    3938    attribute EventHandler oncanplaythrough;
  • trunk/Source/WebCore/html/HTMLAttributeNames.in

    r280310 r280703  
    221221onbeforeunload
    222222onblur
     223oncancel
    223224oncanplay
    224225oncanplaythrough
  • trunk/Source/WebCore/html/HTMLDialogElement.cpp

    r280049 r280703  
    9696}
    9797
     98void HTMLDialogElement::cancel()
     99{
     100    document().eventLoop().queueTask(TaskSource::UserInteraction, [protectedThis = GCReachableRef { *this }] {
     101        auto cancelEvent = Event::create(eventNames().cancelEvent, Event::CanBubble::No, Event::IsCancelable::Yes);
     102        protectedThis->dispatchEvent(cancelEvent);
     103        if (!cancelEvent->defaultPrevented())
     104            protectedThis->close(nullString());
     105    });
    98106}
     107
     108}
  • trunk/Source/WebCore/html/HTMLDialogElement.h

    r280049 r280703  
    4444    void close(const String&);
    4545
     46    void cancel();
     47
    4648    bool isModal() const { return m_isModal; };
    4749
  • trunk/Source/WebCore/html/HTMLElement.cpp

    r280548 r280703  
    267267        &onbeforepasteAttr.get(),
    268268        &onblurAttr.get(),
     269        &oncancelAttr.get(),
    269270        &oncanplayAttr.get(),
    270271        &oncanplaythroughAttr.get(),
  • trunk/Source/WebCore/page/EventHandler.cpp

    r280671 r280703  
    5656#include "FrameView.h"
    5757#include "FullscreenManager.h"
     58#include "HTMLDialogElement.h"
    5859#include "HTMLDocument.h"
    5960#include "HTMLFrameElement.h"
     
    35113512    }
    35123513
     3514    if (auto* activeModalDialog = m_frame.document()->activeModalDialog()) {
     3515        if (initialKeyEvent.type() == PlatformEvent::KeyDown && initialKeyEvent.windowsVirtualKeyCode() == VK_ESCAPE) {
     3516            activeModalDialog->cancel();
     3517            return true;
     3518        }
     3519    }
     3520
    35133521#if ENABLE(FULLSCREEN_API)
    35143522    if (m_frame.document()->fullscreenManager().isFullscreen()) {
Note: See TracChangeset for help on using the changeset viewer.