mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:18:13 +00:00
LibWeb: Don't cap used width by available width from a constraint
In compute_table_box_width_inside_table_wrapper, we should only consider available_width when it's valid. Values which come from {min, max}-content constraints aren't meaningful and shouldn't be considered for the cap.
This commit is contained in:
parent
a910c4d984
commit
c5eeb303d8
2 changed files with 8 additions and 8 deletions
|
@ -438,7 +438,7 @@ CSSPixels BlockFormattingContext::compute_table_box_width_inside_table_wrapper(B
|
|||
VERIFY(table_box.has_value());
|
||||
|
||||
auto table_used_width = throwaway_state.get(*table_box).content_width();
|
||||
return table_used_width > available_width ? available_width : table_used_width;
|
||||
return available_space.width.is_definite() ? min(table_used_width, available_width) : table_used_width;
|
||||
}
|
||||
|
||||
void BlockFormattingContext::compute_height(Box const& box, AvailableSpace const& available_space)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue