mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:57:34 +00:00
LibWeb: Make IFC register absolutely positioned descendants with BFC
This allows BFC to position all absolutely positioned descendants in the same pass.
This commit is contained in:
parent
6444525edc
commit
dcc2568439
2 changed files with 3 additions and 1 deletions
|
@ -37,6 +37,8 @@ public:
|
|||
|
||||
static void compute_height(Box&);
|
||||
|
||||
void add_absolutely_positioned_box(Box& box) { m_absolutely_positioned_boxes.append(box); }
|
||||
|
||||
protected:
|
||||
void compute_position(Box&);
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ void InlineFormattingContext::run(Box&, LayoutMode layout_mode)
|
|||
containing_block().for_each_child([&](auto& child) {
|
||||
VERIFY(child.is_inline());
|
||||
if (is<Box>(child) && child.is_absolutely_positioned()) {
|
||||
layout_absolutely_positioned_element(verify_cast<Box>(child));
|
||||
parent().add_absolutely_positioned_box(static_cast<Box&>(child));
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue