mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
LibWeb: Apply the layout_mode argument in BFC::compute_width
This commit is contained in:
parent
9b3229da17
commit
e5a779aecf
1 changed files with 13 additions and 1 deletions
|
@ -96,7 +96,19 @@ void BlockFormattingContext::compute_width(Box const& box, LayoutMode layout_mod
|
|||
}
|
||||
|
||||
auto const& computed_values = box.computed_values();
|
||||
float width_of_containing_block = m_state.get(*box.containing_block()).content_width;
|
||||
float width_of_containing_block;
|
||||
switch (layout_mode) {
|
||||
case LayoutMode::Normal:
|
||||
width_of_containing_block = m_state.get(*box.containing_block()).content_width;
|
||||
break;
|
||||
case LayoutMode::MinContent:
|
||||
width_of_containing_block = 0;
|
||||
break;
|
||||
case LayoutMode::MaxContent:
|
||||
width_of_containing_block = INFINITY;
|
||||
break;
|
||||
}
|
||||
|
||||
auto width_of_containing_block_as_length = CSS::Length::make_px(width_of_containing_block);
|
||||
|
||||
auto zero_value = CSS::Length::make_px(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue