[webkit-dev] Feature Announcement: <dialog> element

Matt Falkenhagen falken at chromium.org
Tue Jul 3 01:31:38 PDT 2012


I'm interested in implementing the HTML5 <dialog> element:

<dialog> is meant to be a standard markup for UI elements like
dialogs, popups, and tooltips. It also allows for page-level modal
dialogs. It would be an alternative to existing methods such as
positioning a div element or using app-modal dialog APIs like
window.alert(). Some use cases are shown here:

<dialog> involves some potentially tricky interactions with DOM, CSS,
rendering, and layout, so implementation may prove difficult. A
complete implementation will include the following pieces:
1. Default positioning of dialogs (centered in the viewport)
2. "Magical alignment" layout mode: anchoring a dialog to another element
3. Inert subtrees. When a modal dialog is active, the rest of the page
is "inert" and cannot be interacted with as normal.
4. The top layer, a new stacking layer used by both <dialog> and
Fullscreen. <https://bugs.webkit.org/show_bug.cgi?id=84796>
5. Always-on-top behavior for the top layer, including over windowed plugins.

I have not yet started implementation. I propose beginning
implementation behind the feature flag ENABLE_DIALOG_TAG.

I don't plan to deviate from the spec, so a vendor prefix probably
isn't necessary. As a practical matter, however, I plan to first
implement a subset of <dialog>, like a non-modal, non-anchored dialog,
and build up from there.

The master bug is <https://bugs.webkit.org/show_bug.cgi?id=84635>.


More information about the webkit-dev mailing list