Intent to Implement and Ship: Change <dialog> from position: absolute to position: fixed.

231 views
Skip to first unread message

Ian Kilpatrick

unread,
Sep 22, 2020, 3:54:11 PM9/22/20
to blink-dev

Contact emails

ikilp...@chromium.org

Explainer

None

Specification

https://github.com/w3c/csswg-drafts/issues/4645

Summary

Blink shipped the <dialog> element[1] using a somewhat complex positioning scheme. The CSSWG discussed a change to this positioning scheme using "position: fixed" instead, and auto-margins to achieve centering. See [2]. We believe this should be broadly compatible with existing use (as the dialog is placed in the "top-layer"). [1] https://html.spec.whatwg.org/#the-dialog-element [2] https://github.com/w3c/csswg-drafts/issues/4645

Blink component

Blink

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

We've shipped this feature for quite a while, we added two use-counters to determine if this would be web-compatible. https://www.chromestatus.com/metrics/feature/timeline/popularity/3329 https://www.chromestatus.com/metrics/feature/timeline/popularity/3330 Broadly speaking - we believe this should be web-compatible.

Gecko: In development (https://groups.google.com/g/mozilla.dev.platform/c/gqi4MDQDwX8/m/WKgnucKUAwAJ)

WebKit: No signal (https://github.com/w3c/csswg-drafts/issues/4645#issuecomment-635675187)

Web developers: No signals


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

No

Is this feature fully tested by web-platform-tests?

Yes

Link to entry on the Chrome Platform Status

https://www.chromestatus.com/feature/5756963046555648

This intent message was generated by Chrome Platform Status.

Domenic Denicola

unread,
Sep 22, 2020, 4:15:25 PM9/22/20
to Ian Kilpatrick, blink-dev
From: Ian Kilpatrick <ikilp...@chromium.org>

> Specification
> https://github.com/w3c/csswg-drafts/issues/4645

Could you work to update the HTML Standard as part of this shipping? The relevant sections would be https://html.spec.whatwg.org/#normal-alignment and https://html.spec.whatwg.org/#flow-content-3.

> Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
> No

I'm curious what platform it won't be supported on?

Ian Kilpatrick

unread,
Sep 22, 2020, 5:00:28 PM9/22/20
to Domenic Denicola, blink-dev
On Tue, Sep 22, 2020 at 1:15 PM Domenic Denicola <d...@domenic.me> wrote:
From: Ian Kilpatrick <ikilp...@chromium.org>

> Specification
> https://github.com/w3c/csswg-drafts/issues/4645

Could you work to update the HTML Standard as part of this shipping? The relevant sections would be https://html.spec.whatwg.org/#normal-alignment and https://html.spec.whatwg.org/#flow-content-3.

 

> Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
> No

I'm curious what platform it won't be supported on?

Supported everywhere - must have missed a field in chromestatus.  

Chris Harrelson

unread,
Sep 22, 2020, 5:04:38 PM9/22/20
to Ian Kilpatrick, Domenic Denicola, blink-dev
LGTM1

No TAG review is required in this case, in my view, because this is a small layout change to an existing feature that is shipped on Chromium browsers already, and will result in interop with the in-progress Gecko feature.

Please do email webkit-dev also to get an official position rather than a comment on an issue. Perhaps this would result in them changing their behavior in concert to further de-risk interop? Worth asking them that as well.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAJL3UpTSZrYuqTyHOBhfSiYmmNf%2BYLV_UVmE1rxtowhgBmQH5w%40mail.gmail.com.

Ian Kilpatrick

unread,
Sep 22, 2020, 5:09:01 PM9/22/20
to Chris Harrelson, Domenic Denicola, blink-dev
On Tue, Sep 22, 2020 at 2:04 PM Chris Harrelson <chri...@chromium.org> wrote:
LGTM1

No TAG review is required in this case, in my view, because this is a small layout change to an existing feature that is shipped on Chromium browsers already, and will result in interop with the in-progress Gecko feature.

Please do email webkit-dev also to get an official position rather than a comment on an issue. Perhaps this would result in them changing their behavior in concert to further de-risk interop? Worth asking them that as well.

Yup. Also I'm 99% certain the WebKit never shipped the <dialog> element with this rendering behaviour (see dialog.css

Mike West

unread,
Sep 23, 2020, 3:07:11 AM9/23/20
to Ian Kilpatrick, Chris Harrelson, Domenic Denicola, blink-dev
I generally agree with Chris' logic above. The direction seems good, and I'm happy to see us moving in concert with Firefox. That said, Domenic raised a quite reasonable question about `show()` vs `showModal()` on the PR. It seems reasonable to ship only after resolving that question; can you validate that our implementation (and the spec) remain consistent with Firefox's?

-mike


Mike West

unread,
Oct 29, 2020, 3:07:15 PM10/29/20
to blink-dev, Mike West, Chris Harrelson, d...@domenic.me, blink-dev, Ian Kilpatrick
Friendly ping. Is the conversation around the PR still ongoing?

-mike

Ian Kilpatrick

unread,
Oct 29, 2020, 4:10:41 PM10/29/20
to Mike West, blink-dev, Chris Harrelson, d...@domenic.me
Close - one small disagreement left on the pull request - (but no fundamental disagreements).

Ian Kilpatrick

unread,
Nov 5, 2020, 3:12:19 PM11/5/20
to Mike West, blink-dev, Chris Harrelson, d...@domenic.me
Bump on this now it has been merged.

Chris Harrelson

unread,
Nov 5, 2020, 5:35:25 PM11/5/20
to Ian Kilpatrick, Mike West, blink-dev, d...@domenic.me
LGTM1

Yoav Weiss

unread,
Nov 6, 2020, 3:05:22 AM11/6/20
to Chris Harrelson, Ian Kilpatrick, Mike West, blink-dev, d...@domenic.me
LGTM2

Please file implementation bugs on WebKit and Firefox (if there aren't ones open already).

Ian Kilpatrick

unread,
Nov 6, 2020, 2:15:13 PM11/6/20
to Yoav Weiss, Chris Harrelson, Mike West, blink-dev, d...@domenic.me
Currently chromium is the only engine to have implemented and ship dialog. The relevant bugs for <dialog> more generally in the other browsers are:
https://bugs.webkit.org/show_bug.cgi?id=84635

Mike West

unread,
Nov 9, 2020, 2:13:25 AM11/9/20
to Ian Kilpatrick, Yoav Weiss, Chris Harrelson, blink-dev, d...@domenic.me
LGTM3. Thank you for working through the spec and interop details!

-mike

Reply all
Reply to author
Forward
0 new messages