mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00: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()
|
void LayoutDocument::layout()
|
||||||
{
|
{
|
||||||
rect().set_width(style().size().width());
|
rect().set_width(style().size().width());
|
||||||
|
|
||||||
LayoutNode::layout();
|
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
Add a link
Reference in a new issue