From 870bcd56df13a0a6123c0d15228105e31b7292a6 Mon Sep 17 00:00:00 2001 From: Simon Wanner Date: Fri, 2 Jun 2023 23:07:25 +0200 Subject: [PATCH] LibWeb: Make disclosure marker bounds square This makes sure we actually render an equilateral triangle inside a square. --- Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index 2213eb1b16..17961989c1 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -999,6 +999,9 @@ void BlockFormattingContext::layout_list_item_marker(ListItemBox const& list_ite marker_state.set_content_height(max(image_height, marker.font().pixel_size_rounded_up() + 1).value()); + if (marker.list_style_type() == CSS::ListStyleType::DisclosureClosed || marker.list_style_type() == CSS::ListStyleType::DisclosureOpen) + marker_state.set_content_width(marker_state.content_height()); + auto final_marker_width = marker_state.content_width() + default_marker_width; if (marker.list_style_position() == CSS::ListStylePosition::Inside) {