mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Allow any FC type for replaced boxes in dimension_box_on_line()
If box is sized as replaced it still could be anything, not only SVG. This fixes crashing on https://www.shopify.com/ that was caused by a missing paintable for a box that has a layout node. This occurred because the box was not laid out in dimension_box_on_line().
This commit is contained in:
committed by
Andreas Kling
parent
e1fbb08747
commit
26a516c85f
@@ -120,9 +120,9 @@ void InlineFormattingContext::dimension_box_on_line(Box const& box, LayoutMode l
|
||||
if (box_is_sized_as_replaced_element(box)) {
|
||||
box_state.set_content_width(compute_width_for_replaced_element(box, *m_available_space));
|
||||
box_state.set_content_height(compute_height_for_replaced_element(box, *m_available_space));
|
||||
|
||||
if (is<SVGSVGBox>(box))
|
||||
(void)layout_inside(box, layout_mode, box_state.available_inner_space_or_constraints_from(*m_available_space));
|
||||
auto independent_formatting_context = layout_inside(box, layout_mode, box_state.available_inner_space_or_constraints_from(*m_available_space));
|
||||
if (independent_formatting_context)
|
||||
independent_formatting_context->parent_context_did_dimension_child_root_box();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user