mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
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.
This commit is contained in:
parent
724754e39a
commit
1f9c4ffd21
Notes:
sideshowbarker
2024-07-19 11:43:52 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1f9c4ffd21e
1 changed files with 3 additions and 1 deletions
|
@ -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() };
|
||||
|
|
Loading…
Add table
Reference in a new issue