From 06916c31d3c09191e3865bab05adfff2e6362662 Mon Sep 17 00:00:00 2001 From: Oriol Brufau Date: Thu, 25 Nov 2021 08:28:47 -0800 Subject: [PATCH] [inert] Add WPTs for interaction of inert attribute with modal dialog https://html.spec.whatwg.org/multipage/interaction.html#inert is clear: > While document is so blocked [by a modal dialog], every node that is > connected to document, with the exception of the subject element and > its shadow-including descendants, must be marked inert. (The elements > excepted by this paragraph can additionally be marked inert through > other means; being part of a modal dialog does not "protect" a node > from being marked inert.) However, both Firefox and WebKit ignore this, and let modal dialogs escape the inertness set by an ancestor with the 'inert' attribute. There is also an interesting case: when the modal dialog is the root element. Firefox handles this fine, but Chromium used to fail the test, and WebKit directly crashes. Bug: 692360 Change-Id: Ie52201a1f31790392180c96a9e08be1b5eee86d8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3290703 Commit-Queue: Oriol Brufau Reviewed-by: Mason Freed Cr-Commit-Position: refs/heads/main@{#945411} --- ...inert-with-modal-dialog-001.tentative.html | 56 +++++++++++++++++++ ...inert-with-modal-dialog-002.tentative.html | 56 +++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 inert/inert-with-modal-dialog-001.tentative.html create mode 100644 inert/inert-with-modal-dialog-002.tentative.html diff --git a/inert/inert-with-modal-dialog-001.tentative.html b/inert/inert-with-modal-dialog-001.tentative.html new file mode 100644 index 00000000000000..a31fa150147f5c --- /dev/null +++ b/inert/inert-with-modal-dialog-001.tentative.html @@ -0,0 +1,56 @@ + + +Interaction of 'inert' attribute with modal dialog + + + +
+
+ wrapper + + dialog + + child + + +
+ + + diff --git a/inert/inert-with-modal-dialog-002.tentative.html b/inert/inert-with-modal-dialog-002.tentative.html new file mode 100644 index 00000000000000..499ac80d09e2c0 --- /dev/null +++ b/inert/inert-with-modal-dialog-002.tentative.html @@ -0,0 +1,56 @@ + + +Interaction of 'inert' attribute with modal dialog, when the dialog is the root element + + + +
+ + dialog + + child + + + + +