mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +00:00
LibHTML: Fix LayoutDocument height computation
This commit is contained in:
parent
fa876320eb
commit
03cca4510a
Notes:
sideshowbarker
2024-07-19 11:56:06 +09:00
Author: https://github.com/bugaevc
Commit: 03cca4510a
Pull-request: https://github.com/SerenityOS/serenity/pull/609
Reviewed-by: https://github.com/awesomekling ✅
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