1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:57:43 +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:
Andreas Kling 2022-01-23 15:22:18 +01:00
parent 83a6e698a0
commit 00bd17034d
5 changed files with 21 additions and 11 deletions

View file

@ -95,7 +95,7 @@ OwnPtr<FormattingContext> FormattingContext::create_independent_formatting_conte
VERIFY(is_block_formatting_context());
if (child_box.children_are_inline())
return make<InlineFormattingContext>(verify_cast<BlockContainer>(child_box), this);
return make<InlineFormattingContext>(verify_cast<BlockContainer>(child_box), static_cast<BlockFormattingContext&>(*this));
// The child box is a block container that doesn't create its own BFC.
// It will be formatted by this BFC.