LibHTML: Fix LayoutDocument height computation

This commit is contained in:
Sergey Bugaev 2019-09-25 12:29:25 +03:00 committed by Andreas Kling
parent fa876320eb
commit 03cca4510a

View file

@ -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);
}