1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

LibWeb: Remove special handling of disclosure-open/closed markers

Setting the marker's content width here is causing the text that follows
the marker to be indented a bit too much. This is noticeable when a line
with a disclosure marker is followed by a line with any other marker. It
previously would look something like:

    >    Text inline with disclosure-closed marker
    * Text inline with circle marker
    # Text inline with square marker

Now the disclosure marker line matches other marker types:

    > Text inline with disclosure-closed marker
    * Text inline with circle marker
    # Text inline with square marker
This commit is contained in:
Timothy Flynn 2023-11-21 16:39:10 -05:00 committed by Andreas Kling
parent 16ac2089e3
commit b5162ceabd
3 changed files with 10 additions and 13 deletions

View file

@ -1105,9 +1105,6 @@ 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));
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) {