mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 17:25:06 +00:00
LibWeb: Pass current target box to BFC::run()
The BFC "context box" is now the outer box of the block formatting context. Previously the context box was always the current target box, which made it hard to reason about who was really the containing block of whom in various places. Note that IFC still has the containing block as its context box, this change only affects BFC. However, to clarify the situation in IFC, I've added a containing_block() getter than returns the context_box().
This commit is contained in:
parent
b638e74b68
commit
59de4adb60
14 changed files with 138 additions and 156 deletions
|
@ -192,7 +192,8 @@ void TextNode::for_each_chunk(Callback callback, LayoutMode layout_mode, bool do
|
|||
|
||||
void TextNode::split_into_lines_by_rules(InlineFormattingContext& context, LayoutMode layout_mode, bool do_collapse, bool do_wrap_lines, bool do_wrap_breaks)
|
||||
{
|
||||
auto& containing_block = context.context_box();
|
||||
auto& containing_block = context.containing_block();
|
||||
|
||||
auto& font = specified_style().font();
|
||||
float space_width = font.glyph_width(' ') + font.glyph_spacing();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue