Commit 90f43894 authored by tkent@chromium.org's avatar tkent@chromium.org

Move default style for <dialog> to html.css

This is a follow-up of Blink r181385.

BUG=402536

Review URL: https://codereview.chromium.org/553353002

git-svn-id: svn://svn.chromium.org/blink/trunk@181710 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent fdc3a7b6
......@@ -1057,6 +1057,32 @@ textarea[dir=auto i] {
unicode-bidi: -webkit-plaintext;
}
dialog:not([open]) {
display: none
}
dialog {
position: absolute;
left: 0;
right: 0;
width: -webkit-fit-content;
height: -webkit-fit-content;
margin: auto;
border: solid;
padding: 1em;
background: white;
color: black
}
dialog::backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0,0,0,0.1)
}
/* page */
@page {
......
......@@ -406,14 +406,8 @@ bool RenderTheme::paintDecorations(RenderObject* o, const PaintInfo& paintInfo,
String RenderTheme::extraDefaultStyleSheet()
{
StringBuilder runtimeCSS;
runtimeCSS.appendLiteral("dialog:not([open]) { display: none; }");
runtimeCSS.appendLiteral("dialog { position: absolute; left: 0; right: 0; width: -webkit-fit-content; height: -webkit-fit-content; margin: auto; border: solid; padding: 1em; background: white; color: black;}");
runtimeCSS.appendLiteral("dialog::backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.1); }");
if (RuntimeEnabledFeatures::contextMenuEnabled()) {
if (RuntimeEnabledFeatures::contextMenuEnabled())
runtimeCSS.appendLiteral("menu[type=\"popup\" i] { display: none; }");
}
return runtimeCSS.toString();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment