1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:47:45 +00:00

LibWeb: Make ListItemMarkerBox inherit style from ListItemBox

This commit is contained in:
Andreas Kling 2021-09-23 19:47:53 +02:00
parent ca28a118ae
commit c5b4928f4a
3 changed files with 6 additions and 4 deletions

View file

@ -30,8 +30,10 @@ void ListItemBox::layout_marker()
return;
if (!m_marker) {
auto* marker_style = dom_node().specified_css_values();
VERIFY(marker_style);
int child_index = parent()->index_of_child<ListItemBox>(*this).value();
m_marker = adopt_ref(*new ListItemMarkerBox(document(), computed_values().list_style_type(), child_index + 1));
m_marker = adopt_ref(*new ListItemMarkerBox(document(), computed_values().list_style_type(), child_index + 1, *marker_style));
if (first_child())
m_marker->set_inline(first_child()->is_inline());
append_child(*m_marker);