Pārlūkot izejas kodu

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.
Andreas Kling 5 gadi atpakaļ
vecāks
revīzija
1f9c4ffd21
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      Libraries/LibHTML/Layout/LayoutListItem.cpp

+ 3 - 1
Libraries/LibHTML/Layout/LayoutListItem.cpp

@@ -16,7 +16,9 @@ void LayoutListItem::layout()
 
 
     if (!m_marker) {
     if (!m_marker) {
         m_marker = adopt(*new LayoutListItemMarker);
         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() };
     Rect marker_rect { rect().x() - 8, rect().y(), 4, rect().height() };