Partially implement dialog.showModal() (#40405)

Partially implement dialog.showModal()

Follow-ups will be needed to further implement proper dialog
functionality but this makes a good start.

Testing: Existing WPTs cover this.

---------

Signed-off-by: Luke Warlow <lwarlow@igalia.com>
This commit is contained in:
Luke Warlow
2025-11-05 15:03:13 +00:00
committed by GitHub
parent a90dff6919
commit e3c4655463
41 changed files with 215 additions and 119 deletions

View File

@@ -1,7 +1,4 @@
[focus-after-close.html]
[Focus should be moved to the previously focused element (Simple dialog usage)]
expected: FAIL
[Focus should be moved to the previously focused element (Complex dialog usage)]
expected: FAIL
@@ -11,11 +8,5 @@
[Focus should be moved to the previously focused element even if it has moved to shadow DOM root in between show/close]
expected: FAIL
[Focus should be moved to the body if the previously focused element is removed]
expected: FAIL
[Focus should be moved to the shadow DOM host if the previouly focused element is a shadow DOM node]
expected: FAIL
[Focus should not scroll if the previously focused element is outside the viewport]
expected: FAIL