mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
LibWeb: Consider inline content (line boxes) when measuring overflow
Fixes #13628
This commit is contained in:
parent
244ea0fa9c
commit
96f8cf2971
1 changed files with 15 additions and 4 deletions
|
@ -690,10 +690,21 @@ static void measure_scrollable_overflow(LayoutState const& state, Box const& box
|
||||||
if (box.computed_values().overflow_x() == CSS::Overflow::Hidden && box.computed_values().overflow_y() == CSS::Overflow::Hidden)
|
if (box.computed_values().overflow_x() == CSS::Overflow::Hidden && box.computed_values().overflow_y() == CSS::Overflow::Hidden)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
box.for_each_child_of_type<Box>([&](Box const& child) {
|
if (box.children_are_inline()) {
|
||||||
measure_scrollable_overflow(state, child, bottom_edge, right_edge);
|
if (!child_state.line_boxes.is_empty()) {
|
||||||
return IterationDecision::Continue;
|
bottom_edge = max(bottom_edge, child_rect.y() + child_state.line_boxes.last().bottom());
|
||||||
});
|
for (auto& line_box : child_state.line_boxes) {
|
||||||
|
if (line_box.fragments().is_empty())
|
||||||
|
continue;
|
||||||
|
right_edge = max(right_edge, child_rect.x() + line_box.fragments().last().width());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
box.for_each_child_of_type<Box>([&](Box const& child) {
|
||||||
|
measure_scrollable_overflow(state, child, bottom_edge, right_edge);
|
||||||
|
return IterationDecision::Continue;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BlockFormattingContext::layout_viewport(LayoutMode layout_mode, AvailableSpace const& available_space)
|
void BlockFormattingContext::layout_viewport(LayoutMode layout_mode, AvailableSpace const& available_space)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue