summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/FormattingContext.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Layout/FormattingContext.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
index 9c2f77afd1..e7759e33d7 100644
--- a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
+++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
@@ -220,6 +220,12 @@ float FormattingContext::compute_auto_height_for_block_level_element(FormattingS
if (child_box->is_absolutely_positioned() || child_box->is_floating())
continue;
+ // FIXME: This is hack. If the last child is a list-item marker box, we ignore it for purposes of height calculation.
+ // Perhaps markers should not be considered in-flow(?) Perhaps they should always be the first child of the list-item
+ // box instead of the last child.
+ if (child_box->is_list_item_marker_box())
+ continue;
+
// FIXME: Handle margin collapsing.
auto const& child_box_state = state.get(*child_box);
return max(0, child_box_state.offset.y() + child_box_state.content_height + child_box_state.margin_box_bottom());