Bug 226169 adds the non-modal dialog element UA styles, but the modal dialog styles are different: https://html.spec.whatwg.org/#flow-content-3 """ The dialog element, when its is modal flag is true, is expected to act as if it had a user-agent-level style sheet rule setting the following properties: 'position' property to 'fixed' 'overflow' property to 'auto' 'inset-block-start' property to '0' 'inset-block-end' property to '0' 'max-width' property to 'calc(100% - 6px - 2em)' 'max-height' property to 'calc(100% - 6px - 2em)' """ This needs an internal pseudo selector like ::-internal-modal-dialog to be able to apply those styles from the UA stylesheet.
<rdar://problem/78687090>
Created attachment 432582 [details] Patch
Created attachment 432591 [details] Patch
Comment on attachment 432591 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=432591&action=review > Source/WebCore/css/dialog.css:25 > + max-width: calc(100% - 6px - 2em); > + max-height: calc(100% - 6px - 2em); Where did these come from?
Created attachment 432605 [details] Patch
(In reply to Simon Fraser (smfr) from comment #4) > Comment on attachment 432591 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=432591&action=review > > > Source/WebCore/css/dialog.css:25 > > + max-width: calc(100% - 6px - 2em); > > + max-height: calc(100% - 6px - 2em); > > Where did these come from? As wonky as they are, they are actually from the spec, see comment 0.
Committed r279414 (239279@main): <https://commits.webkit.org/239279@main>