mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 19:45:12 +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: https://github.com/SerenityOS/serenity/commit/03cca4510a7 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()
|
||||
{
|
||||
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