Depending on whether we want to affect JS APIs or not, we can either: * Change hit testing code to treat inert nodes as pointer-events: none, like in: https://github.com/nt1m/WebKit/commit/991684e0f3b810e566329e0c031342de613933b0 -> This is close to Firefox's implementation -> Firefox argues the spec should be this way: https://github.com/whatwg/html/issues/5650 * Treat inert nodes more like isDisabledFormControl() (e.g. having similar checks when triggering events) -> More similar to Chrome's implementation -> Closer to latest inert attribute PR by the Chromium team: https://github.com/whatwg/html/pull/4288 In the context of <dialog>, I think both approaches are acceptable wrt. the spec and similarly easy. Hit testing also doesn't matter much generally since everything is behind a backdrop in a modal dialog context. This is more relevant for the inert attribute implementation.
<rdar://problem/82186260>
Created attachment 436919 [details] Patch
Created attachment 438657 [details] Patch
Comment on attachment 438657 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=438657&action=review > Source/WebCore/rendering/style/StyleRareInheritedData.h:169 > + bool isInert; You should include this into the bitfield with the rest of the booleans.
Created attachment 438661 [details] Patch
Created attachment 438978 [details] Patch
Created attachment 439020 [details] Patch
Comment on attachment 439020 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=439020&action=review > Source/WebCore/style/StyleSharingResolver.cpp:283 > + return false; Note to self, this could use an inert attribute feature flag check (though not sure if that slows down the SharingResolver or not)
Comment on attachment 439020 [details] Patch Please split this up to pieces that can be reviewed separately (along the lines of "Add effectiveInert bit to RenderStyle")
Created attachment 439039 [details] Patch
Created attachment 439042 [details] Patch
Comment on attachment 439042 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=439042&action=review > Source/WebCore/style/StyleAdjuster.cpp:526 > + bool isInertSubtreeRoot = (m_document.activeModalDialog() && m_element == m_document.documentElement()) > + || (m_document.settings().inertAttributeEnabled() && is<HTMLElement>(m_element) && m_element->hasAttribute(HTMLNames::inertAttr)); This would read better as a lambda. > Source/WebCore/style/StyleAdjuster.cpp:532 > + if (isInertSubtreeRoot) > + style.setEffectiveInert(true); > + > + // Make sure the active dialog is interactable when the whole document is blocked by the modal dialog > + if (m_element == m_document.activeModalDialog()) > + style.setEffectiveInert(false); What should happen when you have an active <dialog inert>?
Created attachment 439262 [details] Patch
Committed r283079 (242137@main): <https://commits.webkit.org/242137@main>
*** Bug 229410 has been marked as a duplicate of this bug. ***