diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-10-11 23:25:45 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-10-11 23:26:25 +0200 |
commit | 1f9c4ffd21ed4a8ca5098150067551dcf8dc600c (patch) | |
tree | 0dc024b2d0878159d3f1a163670fb899e3af226f | |
parent | 724754e39a5bad976c4f6af2d4a42f6d4620b685 (diff) | |
download | serenity-1f9c4ffd21ed4a8ca5098150067551dcf8dc600c.zip |
LibHTML: Make sure the marker has the same inline state as siblings
Or LayoutBlock will assert when trying to layout its children since
they have inconsistent inline state.
-rw-r--r-- | Libraries/LibHTML/Layout/LayoutListItem.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Libraries/LibHTML/Layout/LayoutListItem.cpp b/Libraries/LibHTML/Layout/LayoutListItem.cpp index b9174e6569..4c43f5eb7c 100644 --- a/Libraries/LibHTML/Layout/LayoutListItem.cpp +++ b/Libraries/LibHTML/Layout/LayoutListItem.cpp @@ -16,7 +16,9 @@ void LayoutListItem::layout() if (!m_marker) { m_marker = adopt(*new LayoutListItemMarker); - prepend_child(*m_marker); + if (first_child()) + m_marker->set_inline(first_child()->is_inline()); + append_child(*m_marker); } Rect marker_rect { rect().x() - 8, rect().y(), 4, rect().height() }; |