For show, we need to update both style & layout. For showModal, we need to update only layout (addToTopLayer called beforehand updates style).
Created attachment 441210 [details] Patch
Comment on attachment 441210 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=441210&action=review > Source/WebCore/html/HTMLDialogElement.cpp:125 > + if (auto* cs = computedStyle(); cs && cs->effectiveInert()) We don't use abbreviations like "cs". Why go through computedStyle() and not the Renderer? Have we updated style here yet after opening the dialog?
Created attachment 441227 [details] updateStyleIfNeeded patch
Created attachment 441228 [details] updateLayout patch
Comment on attachment 441228 [details] updateLayout patch As Antti points out, Element::isFocusable is able to resolve without layout being up-to-date. So the updateLayout patch is not needed.
Committed r284174 (242991@main): <https://commits.webkit.org/242991@main>
<rdar://problem/84263950>