Skip to content

Commit

Permalink
Add onslotchange on ShadowRoot and GlobalEventHandlers
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=191310

Patch by Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> on 2020-10-03
Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaselined tests to pass more test cases.

* web-platform-tests/dom/idlharness.window-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt:
* web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:

Source/WebCore:

`onslotchange` attribute has been added to `ShadowRoot` and
`GlobalEventHandlers` by whatwg/html#3487

    - whatwg/dom#78
    - whatwg/html#4129

This patch supports it.

Tests: imported/w3c/web-platform-tests/dom/idlharness.window.html:
       imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events.html
       imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window.html
       imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html
       imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html

* dom/GlobalEventHandlers.idl:
* dom/ShadowRoot.idl:
* html/HTMLAttributeNames.in:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::createEventHandlerNameMap):

LayoutTests:

Rebaselined tests to pass more test cases.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@267939 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
commit-queue@webkit.org committed Oct 4, 2020
1 parent 8efce1a commit 330391d
Show file tree
Hide file tree
Showing 21 changed files with 145 additions and 84 deletions.
19 changes: 19 additions & 0 deletions LayoutTests/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
2020-10-03 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com>

Add onslotchange on ShadowRoot and GlobalEventHandlers
https://bugs.webkit.org/show_bug.cgi?id=191310

Reviewed by Sam Weinig.

Rebaselined tests to pass more test cases.

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

2020-10-03 Antoine Quint <graouts@webkit.org>

Add non-animated support for the CSS translate property
Expand Down
15 changes: 15 additions & 0 deletions LayoutTests/imported/w3c/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
2020-10-03 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com>

Add onslotchange on ShadowRoot and GlobalEventHandlers
https://bugs.webkit.org/show_bug.cgi?id=191310

Reviewed by Sam Weinig.

Rebaselined tests to pass more test cases.

* web-platform-tests/dom/idlharness.window-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt:
* web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:

2020-10-03 Antoine Quint <graouts@webkit.org>

Add non-animated support for the CSS translate property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ PASS ShadowRoot interface: existence and properties of interface prototype objec
PASS ShadowRoot interface: existence and properties of interface prototype object's @@unscopables property
PASS ShadowRoot interface: attribute mode
PASS ShadowRoot interface: attribute host
FAIL ShadowRoot interface: attribute onslotchange assert_true: The prototype object must have a property "onslotchange" expected true got false
PASS ShadowRoot interface: attribute onslotchange
PASS Element interface: existence and properties of interface object
PASS Element interface object length
PASS Element interface object name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,10 @@ PASS onselect: the default value must be null
PASS onselect: the content attribute must be compiled into a function as the corresponding property
PASS onselect: the content attribute must execute when an event is dispatched
PASS onselect: dispatching an Event at a <meta> element must trigger element.onselect
FAIL onslotchange: must be on the appropriate locations for GlobalEventHandlers assert_true: Window has an own property named "onslotchange" expected true got false
FAIL onslotchange: 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 onslotchange: the content attribute must be compiled into a function as the corresponding property assert_equals: The onslotchange property must be a function expected "function" but got "undefined"
FAIL onslotchange: the content attribute must execute when an event is dispatched assert_true: Dispatching an event must run the code expected true got undefined
PASS onslotchange: must be on the appropriate locations for GlobalEventHandlers
PASS onslotchange: the default value must be null
PASS onslotchange: the content attribute must be compiled into a function as the corresponding property
PASS onslotchange: the content attribute must execute when an event is dispatched
PASS onslotchange: dispatching an Event at a <meta> element must trigger element.onslotchange
PASS onstalled: must be on the appropriate locations for GlobalEventHandlers
PASS onstalled: the default value must be null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ FAIL not shadowed securitypolicyviolation (document.body) assert_equals: alterna
PASS not shadowed seeked (document.body)
PASS not shadowed seeking (document.body)
PASS not shadowed select (document.body)
FAIL not shadowed slotchange (document.body) assert_equals: alternative body should reflect expected (object) null but got (undefined) undefined
PASS not shadowed slotchange (document.body)
PASS not shadowed stalled (document.body)
PASS not shadowed submit (document.body)
PASS not shadowed suspend (document.body)
Expand Down Expand Up @@ -177,7 +177,7 @@ FAIL not shadowed securitypolicyviolation (document.createElement("body")) asser
PASS not shadowed seeked (document.createElement("body"))
PASS not shadowed seeking (document.createElement("body"))
PASS not shadowed select (document.createElement("body"))
FAIL not shadowed slotchange (document.createElement("body")) assert_equals: body should reflect expected (object) null but got (undefined) undefined
PASS not shadowed slotchange (document.createElement("body"))
PASS not shadowed stalled (document.createElement("body"))
PASS not shadowed submit (document.createElement("body"))
PASS not shadowed suspend (document.createElement("body"))
Expand Down Expand Up @@ -285,7 +285,7 @@ FAIL not shadowed securitypolicyviolation (window) assert_equals: body should re
PASS not shadowed seeked (window)
PASS not shadowed seeking (window)
PASS not shadowed select (window)
FAIL not shadowed slotchange (window) assert_equals: body should reflect expected (object) null but got (undefined) undefined
PASS not shadowed slotchange (window)
PASS not shadowed stalled (window)
PASS not shadowed submit (window)
PASS not shadowed suspend (window)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ FAIL securitypolicyviolation is unaffected on a windowless body assert_equals: e
PASS seeked is unaffected on a windowless body
PASS seeking is unaffected on a windowless body
PASS select is unaffected on a windowless body
FAIL slotchange is unaffected on a windowless body assert_equals: expected (object) null but got (undefined) undefined
PASS slotchange is unaffected on a windowless body
PASS stalled is unaffected on a windowless body
PASS submit is unaffected on a windowless body
PASS suspend is unaffected on a windowless body
Expand Down Expand Up @@ -199,7 +199,7 @@ FAIL securitypolicyviolation is unaffected on a windowless frameset assert_equal
PASS seeked is unaffected on a windowless frameset
PASS seeking is unaffected on a windowless frameset
PASS select is unaffected on a windowless frameset
FAIL slotchange is unaffected on a windowless frameset assert_equals: expected (object) null but got (undefined) undefined
PASS slotchange is unaffected on a windowless frameset
PASS stalled is unaffected on a windowless frameset
PASS submit is unaffected on a windowless frameset
PASS suspend is unaffected on a windowless frameset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,11 @@ PASS onselect: the default value must be null
PASS onselect: the content attribute must be compiled into a function as the corresponding property
PASS onselect: dynamic changes on the attribute
PASS onselect: dispatching an Event at a <math> element must trigger element.onselect
FAIL onslotchange: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "onslotchange" expected true got false
FAIL onslotchange: 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 onslotchange: the content attribute must be compiled into a function as the corresponding property assert_equals: The onslotchange property must be a function expected "function" but got "undefined"
FAIL onslotchange: dynamic changes on the attribute assert_equals: The onslotchange property must be null (no attribute) expected (object) null but got (undefined) undefined
FAIL onslotchange: dispatching an Event at a <math> element must trigger element.onslotchange assert_equals: The event must be fired at the <math> element expected (object) Element node <math></math> but got (undefined) undefined
PASS onslotchange: must be on the appropriate locations for GlobalEventHandlers
PASS onslotchange: the default value must be null
PASS onslotchange: the content attribute must be compiled into a function as the corresponding property
PASS onslotchange: dynamic changes on the attribute
PASS onslotchange: dispatching an Event at a <math> element must trigger element.onslotchange
PASS onstalled: must be on the appropriate locations for GlobalEventHandlers
PASS onstalled: the default value must be null
PASS onstalled: the content attribute must be compiled into a function as the corresponding property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,11 @@ PASS onselect: the default value must be null
PASS onselect: the content attribute must be compiled into a function as the corresponding property
PASS onselect: dynamic changes on the attribute
PASS onselect: dispatching an Event at a <math> element must trigger element.onselect
FAIL onslotchange: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "onslotchange" expected true got false
FAIL onslotchange: 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 onslotchange: the content attribute must be compiled into a function as the corresponding property assert_equals: The onslotchange property must be a function expected "function" but got "undefined"
FAIL onslotchange: dynamic changes on the attribute assert_equals: The onslotchange property must be null (no attribute) expected (object) null but got (undefined) undefined
FAIL onslotchange: dispatching an Event at a <math> element must trigger element.onslotchange assert_equals: The event must be fired at the <math> element expected (object) Element node <math></math> but got (undefined) undefined
PASS onslotchange: must be on the appropriate locations for GlobalEventHandlers
PASS onslotchange: the default value must be null
PASS onslotchange: the content attribute must be compiled into a function as the corresponding property
PASS onslotchange: dynamic changes on the attribute
PASS onslotchange: dispatching an Event at a <math> element must trigger element.onslotchange
PASS onstalled: must be on the appropriate locations for GlobalEventHandlers
PASS onstalled: the default value must be null
PASS onstalled: the content attribute must be compiled into a function as the corresponding property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ FAIL HTMLElement interface: attribute onsecuritypolicyviolation assert_true: The
PASS HTMLElement interface: attribute onseeked
PASS HTMLElement interface: attribute onseeking
PASS HTMLElement interface: attribute onselect
FAIL HTMLElement interface: attribute onslotchange assert_true: The prototype object must have a property "onslotchange" expected true got false
PASS HTMLElement interface: attribute onslotchange
PASS HTMLElement interface: attribute onstalled
PASS HTMLElement interface: attribute onsubmit
PASS HTMLElement interface: attribute onsuspend
Expand Down Expand Up @@ -405,7 +405,7 @@ FAIL HTMLElement interface: document.createElement("noscript") must inherit prop
PASS HTMLElement interface: document.createElement("noscript") must inherit property "onseeked" with the proper type
PASS HTMLElement interface: document.createElement("noscript") must inherit property "onseeking" with the proper type
PASS HTMLElement interface: document.createElement("noscript") must inherit property "onselect" with the proper type
FAIL HTMLElement interface: document.createElement("noscript") must inherit property "onslotchange" with the proper type assert_inherits: property "onslotchange" not found in prototype chain
PASS HTMLElement interface: document.createElement("noscript") must inherit property "onslotchange" with the proper type
PASS HTMLElement interface: document.createElement("noscript") must inherit property "onstalled" with the proper type
PASS HTMLElement interface: document.createElement("noscript") must inherit property "onsubmit" with the proper type
PASS HTMLElement interface: document.createElement("noscript") must inherit property "onsuspend" with the proper type
Expand Down Expand Up @@ -4391,7 +4391,7 @@ FAIL Window interface: attribute onsecuritypolicyviolation assert_own_property:
PASS Window interface: attribute onseeked
PASS Window interface: attribute onseeking
PASS Window interface: attribute onselect
FAIL Window interface: attribute onslotchange assert_own_property: The global object must have a property "onslotchange" expected property "onslotchange" missing
PASS Window interface: attribute onslotchange
PASS Window interface: attribute onstalled
PASS Window interface: attribute onsubmit
PASS Window interface: attribute onsuspend
Expand Down Expand Up @@ -4540,7 +4540,7 @@ FAIL Window interface: window must inherit property "onsecuritypolicyviolation"
PASS Window interface: window must inherit property "onseeked" with the proper type
PASS Window interface: window must inherit property "onseeking" with the proper type
PASS Window interface: window must inherit property "onselect" with the proper type
FAIL Window interface: window must inherit property "onslotchange" with the proper type assert_own_property: expected property "onslotchange" missing
PASS Window interface: window must inherit property "onslotchange" with the proper type
PASS Window interface: window must inherit property "onstalled" with the proper type
PASS Window interface: window must inherit property "onsubmit" with the proper type
PASS Window interface: window must inherit property "onsuspend" with the proper type
Expand Down Expand Up @@ -5257,7 +5257,7 @@ FAIL SVGElement interface: attribute onsecuritypolicyviolation assert_true: The
PASS SVGElement interface: attribute onseeked
PASS SVGElement interface: attribute onseeking
PASS SVGElement interface: attribute onselect
FAIL SVGElement interface: attribute onslotchange assert_true: The prototype object must have a property "onslotchange" expected true got false
PASS SVGElement interface: attribute onslotchange
PASS SVGElement interface: attribute onstalled
PASS SVGElement interface: attribute onsubmit
PASS SVGElement interface: attribute onsuspend
Expand Down Expand Up @@ -5394,7 +5394,7 @@ FAIL Document interface: attribute onsecuritypolicyviolation assert_true: The pr
PASS Document interface: attribute onseeked
PASS Document interface: attribute onseeking
PASS Document interface: attribute onselect
FAIL Document interface: attribute onslotchange assert_true: The prototype object must have a property "onslotchange" expected true got false
PASS Document interface: attribute onslotchange
PASS Document interface: attribute onstalled
PASS Document interface: attribute onsubmit
PASS Document interface: attribute onsuspend
Expand Down Expand Up @@ -5520,7 +5520,7 @@ FAIL Document interface: iframe.contentDocument must inherit property "onsecurit
PASS Document interface: iframe.contentDocument must inherit property "onseeked" with the proper type
PASS Document interface: iframe.contentDocument must inherit property "onseeking" with the proper type
PASS Document interface: iframe.contentDocument must inherit property "onselect" with the proper type
FAIL Document interface: iframe.contentDocument must inherit property "onslotchange" with the proper type assert_inherits: property "onslotchange" not found in prototype chain
PASS Document interface: iframe.contentDocument must inherit property "onslotchange" with the proper type
PASS Document interface: iframe.contentDocument must inherit property "onstalled" with the proper type
PASS Document interface: iframe.contentDocument must inherit property "onsubmit" with the proper type
PASS Document interface: iframe.contentDocument must inherit property "onsuspend" with the proper type
Expand Down Expand Up @@ -5646,7 +5646,7 @@ FAIL Document interface: new Document() must inherit property "onsecuritypolicyv
PASS Document interface: new Document() must inherit property "onseeked" with the proper type
PASS Document interface: new Document() must inherit property "onseeking" with the proper type
PASS Document interface: new Document() must inherit property "onselect" with the proper type
FAIL Document interface: new Document() must inherit property "onslotchange" with the proper type assert_inherits: property "onslotchange" not found in prototype chain
PASS Document interface: new Document() must inherit property "onslotchange" with the proper type
PASS Document interface: new Document() must inherit property "onstalled" with the proper type
PASS Document interface: new Document() must inherit property "onsubmit" with the proper type
PASS Document interface: new Document() must inherit property "onsuspend" with the proper type
Expand Down Expand Up @@ -5772,7 +5772,7 @@ FAIL Document interface: documentWithHandlers must inherit property "onsecurityp
PASS Document interface: documentWithHandlers must inherit property "onseeked" with the proper type
PASS Document interface: documentWithHandlers must inherit property "onseeking" with the proper type
PASS Document interface: documentWithHandlers must inherit property "onselect" with the proper type
FAIL Document interface: documentWithHandlers must inherit property "onslotchange" with the proper type assert_inherits: property "onslotchange" found on object expected in prototype chain
PASS Document interface: documentWithHandlers must inherit property "onslotchange" with the proper type
PASS Document interface: documentWithHandlers must inherit property "onstalled" with the proper type
PASS Document interface: documentWithHandlers must inherit property "onsubmit" with the proper type
PASS Document interface: documentWithHandlers must inherit property "onsuspend" with the proper type
Expand Down
Loading

0 comments on commit 330391d

Please sign in to comment.