mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
LibWeb: Make BFC always drive IFC
Instead of allowing FormattingContext to instantiate an IFC for anything that has inline children, move this logic to BFC. This is fine, since only BFC deals with blocks having inline children anyway.
This commit is contained in:
parent
db2d62671f
commit
fd68be29ab
2 changed files with 10 additions and 8 deletions
|
@ -9,7 +9,6 @@
|
|||
#include <LibWeb/Layout/Box.h>
|
||||
#include <LibWeb/Layout/FlexFormattingContext.h>
|
||||
#include <LibWeb/Layout/FormattingContext.h>
|
||||
#include <LibWeb/Layout/InlineFormattingContext.h>
|
||||
#include <LibWeb/Layout/ReplacedBox.h>
|
||||
#include <LibWeb/Layout/SVGFormattingContext.h>
|
||||
#include <LibWeb/Layout/SVGSVGBox.h>
|
||||
|
@ -109,8 +108,7 @@ OwnPtr<FormattingContext> FormattingContext::create_independent_formatting_conte
|
|||
return make<TableFormattingContext>(state, verify_cast<TableBox>(child_box), this);
|
||||
|
||||
VERIFY(is_block_formatting_context());
|
||||
if (child_box.children_are_inline())
|
||||
return make<InlineFormattingContext>(state, verify_cast<BlockContainer>(child_box), static_cast<BlockFormattingContext&>(*this));
|
||||
VERIFY(!child_box.children_are_inline());
|
||||
|
||||
// The child box is a block container that doesn't create its own BFC.
|
||||
// It will be formatted by this BFC.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue