mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Consider shadow dom when dispatching events (#34788)
* Implement EventTarget::get_the_parent Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add spec steps to Event::init_event Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Rewrite Event::composedPath to be spec compliant Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Retarget EventTargets instead of Nodes Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Rewrite event dispatch/invocation to better match the spec Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add spec comments to Event struct Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Don't traverse shadow roots when calculating an events path We can't do this correctly yet, and assuming that an events composed flag is never set is correct 99% of the time. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix typo in event dispatch Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * fix comment Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * allow crown error Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * fmt Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reduce item visibility where possible Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Simplify code a bit Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix Step 5.10 of Event::invoke Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix renamed method calls Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
cd39b1de64
commit
270df6e263
10 changed files with 728 additions and 293 deletions
|
@ -1,6 +0,0 @@
|
|||
[Event-dispatch-click.html]
|
||||
[event state during post-click handling]
|
||||
expected: FAIL
|
||||
|
||||
[submit button should not activate if the event listener disables it]
|
||||
expected: FAIL
|
|
@ -1,8 +0,0 @@
|
|||
[EventTarget-constructible.any.worker.html]
|
||||
[A constructed EventTarget implements dispatch correctly]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[EventTarget-constructible.any.html]
|
||||
[A constructed EventTarget implements dispatch correctly]
|
||||
expected: FAIL
|
|
@ -1,6 +1,7 @@
|
|||
[event-global.html]
|
||||
expected: TIMEOUT
|
||||
[window.event is undefined if the target is in a shadow tree (event dispatched inside shadow tree)]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[window.event is undefined inside window.onerror if the target is in a shadow tree (ErrorEvent dispatched inside shadow tree)]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
[Extensions-to-Event-Interface.html]
|
||||
[composedPath() must return an empty array when the event is no longer dispatched]
|
||||
expected: FAIL
|
||||
|
||||
[composed on EventInit must default to false]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,28 +1,13 @@
|
|||
[event-post-dispatch.html]
|
||||
[Event properties post dispatch without ShadowRoots (composed: true).]
|
||||
expected: FAIL
|
||||
|
||||
[Event properties post dispatch without ShadowRoots (composed: false).]
|
||||
expected: FAIL
|
||||
|
||||
[Event properties post dispatch with an open ShadowRoot (composed: true).]
|
||||
expected: FAIL
|
||||
|
||||
[Event properties post dispatch with an open ShadowRoot (composed: false).]
|
||||
expected: FAIL
|
||||
|
||||
[Event properties post dispatch with a closed ShadowRoot (composed: true).]
|
||||
expected: FAIL
|
||||
|
||||
[Event properties post dispatch with a closed ShadowRoot (composed: false).]
|
||||
expected: FAIL
|
||||
|
||||
[Event properties post dispatch with nested ShadowRoots (composed: true).]
|
||||
expected: FAIL
|
||||
|
||||
[Event properties post dispatch with nested ShadowRoots (composed: false).]
|
||||
expected: FAIL
|
||||
|
||||
[Event properties post dispatch with relatedTarget in the same shadow tree. (composed: true)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -43,6 +28,3 @@
|
|||
|
||||
[Event properties post dispatch when target get moved out of the shadow tree by event listener]
|
||||
expected: FAIL
|
||||
|
||||
[Event properties post dispatch when target get moved into the the shadow tree by event listener]
|
||||
expected: FAIL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue