mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:58:11 +00:00
LibWeb: Treat non-finite containing block width as zero for percentages
Fixes an assertion when loading https://bun.sh/
This commit is contained in:
parent
c0a5787395
commit
3f022f4040
3 changed files with 18 additions and 1 deletions
|
@ -1372,7 +1372,7 @@ CSSPixels FormattingContext::calculate_max_content_height(Layout::Box const& box
|
|||
|
||||
CSS::Length FormattingContext::calculate_inner_width(Layout::Box const& box, AvailableSize const& available_width, CSS::Size const& width) const
|
||||
{
|
||||
auto width_of_containing_block = available_width.to_px();
|
||||
auto width_of_containing_block = available_width.to_px_or_zero();
|
||||
auto width_of_containing_block_as_length_for_resolve = CSS::Length::make_px(width_of_containing_block);
|
||||
if (width.is_auto()) {
|
||||
return width.resolved(box, width_of_containing_block_as_length_for_resolve);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue