Bug 245747 - Align "UA" stylesheet for "dialog" with HTML Spec and other browsers
Summary: Align "UA" stylesheet for "dialog" with HTML Spec and other browsers
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-27 12:39 PDT by Ahmad Saleem
Modified: 2022-09-27 13:12 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2022-09-27 12:39:06 PDT
Hi Team,

I hope you are well.

I just wanted to raise this for aligning "dialog.css" with other browsers and see if it leads to more WPT Test passes:

Webkit is missing following compared to Blink:

dialog:modal {
user-select: text;
}

https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/resources/html.css;l=1401?q=html.css

and compared to Gecko and Blink, we are missing:

dialog:not([open]) {
display: none;
}

^ this is technically there with dialog {} but I think moving to above would be more aligned with all browsers.

https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3

And let see what happens. Thanks!
Comment 1 Tim Nguyen (:ntim) 2022-09-27 13:12:09 PDT
> dialog:not([open]) {
>   display: none;
> }

We do it slightly differently, but it's there: 
https://searchfox.org/wubkat/rev/cf0cfbaf1ad7728a145c06e3539170870bbb913f/Source/WebCore/css/dialog.css#12-17

> dialog:modal {
>   user-select: text;
> }

Same here, we implement this through inertness (similar to how Firefox does it): https://searchfox.org/wubkat/rev/cf0cfbaf1ad7728a145c06e3539170870bbb913f/Source/WebCore/rendering/style/RenderStyle.cpp#2934-2944