mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:08:12 +00:00
LibWeb: Make IFC aware that its parent is always a BFC
This simplifies some code and allows us to use tighter types for the parent context everywhere.
This commit is contained in:
parent
83a6e698a0
commit
00bd17034d
5 changed files with 21 additions and 11 deletions
|
@ -455,7 +455,7 @@ float FlexFormattingContext::layout_for_maximum_main_size(Box& box)
|
|||
auto& block_container = verify_cast<BlockContainer>(box);
|
||||
BlockFormattingContext bfc(block_container, this);
|
||||
bfc.run(box, LayoutMode::Default);
|
||||
InlineFormattingContext ifc(block_container, &bfc);
|
||||
InlineFormattingContext ifc(block_container, bfc);
|
||||
|
||||
if (is_row_layout()) {
|
||||
ifc.run(box, LayoutMode::OnlyRequiredLineBreaks);
|
||||
|
@ -805,7 +805,7 @@ float FlexFormattingContext::determine_hypothetical_cross_size_of_item(Box& box)
|
|||
auto& block_container = verify_cast<BlockContainer>(box);
|
||||
BlockFormattingContext bfc(block_container, this);
|
||||
bfc.run(box, LayoutMode::Default);
|
||||
InlineFormattingContext ifc(block_container, &bfc);
|
||||
InlineFormattingContext ifc(block_container, bfc);
|
||||
ifc.run(box, LayoutMode::OnlyRequiredLineBreaks);
|
||||
|
||||
return is_row_layout() ? box.height() : box.width();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue