From 9cd5e051c185566f4c5a3d4adb0c2cfe139eb265 Mon Sep 17 00:00:00 2001
From: Artyom Bologov <git@aartaka.me>
Date: Mon, 31 Aug 2026 08:33:16 +0400
Subject: [PATCH] Add dialog element with block display

---
 src/html.cc        | 3 ++-
 src/styleengine.cc | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/html.cc b/src/html.cc
index fb9f4fb5..b5a7ec9a 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -3591,7 +3591,8 @@ static const TagInfo Tags[] = {
  {"ul", B8(01100),'R', Html_tag_open_ul, NULL, NULL},
  {"var", B8(01011),'R', Html_tag_open_default, NULL, NULL},
  {"video", B8(01111),'R', Html_tag_open_video, NULL, Html_tag_close_media},
- {"wbr", B8(01011),'F', Html_tag_open_default, Html_tag_content_wbr, NULL}
+ {"wbr", B8(01011),'F', Html_tag_open_default, Html_tag_content_wbr, NULL},
+ {"dialog", B8(01100),'R', Html_tag_open_sectioning, NULL, NULL}
 };
 #define NTAGS (sizeof(Tags)/sizeof(Tags[0]))
 
diff --git a/src/styleengine.cc b/src/styleengine.cc
index ef8ab3c0..07e038c9 100644
--- a/src/styleengine.cc
+++ b/src/styleengine.cc
@@ -1028,7 +1028,8 @@ void StyleEngine::init () {
       ":visited {color: #800080; text-decoration: underline; cursor: pointer}"
       "h1, h2, h3, h4, h5, h6, b, strong {font-weight: bolder}"
       "address, article, aside, center, div, figure, figcaption, footer,"
-      " h1, h2, h3, h4, h5, h6, header, main, nav, ol, p, pre, section, ul"
+      " h1, h2, h3, h4, h5, h6, header, main, nav, ol, p, pre, section, ul,"
+      " dialog"
       " {display: block}"
       "i, em, cite, address, var {font-style: italic}"
       "frameset, ul, ol, dir {margin-left: 40px}"
-- 
2.47.3

