mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
LibHTML: Fix LayoutDocument height computation
This commit is contained in:
parent
fa876320eb
commit
03cca4510a
1 changed files with 8 additions and 0 deletions
|
@ -12,5 +12,13 @@ LayoutDocument::~LayoutDocument()
|
|||
void LayoutDocument::layout()
|
||||
{
|
||||
rect().set_width(style().size().width());
|
||||
|
||||
LayoutNode::layout();
|
||||
|
||||
int lowest_bottom = 0;
|
||||
for_each_child([&](auto& child) {
|
||||
if (child.rect().bottom() > lowest_bottom)
|
||||
lowest_bottom = child.rect().bottom();
|
||||
});
|
||||
rect().set_bottom(lowest_bottom);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue