diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2019-09-25 12:29:25 +0300 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-28 18:29:42 +0200 |
commit | 03cca4510a724df0a9db6f728675415f1b8e823e (patch) | |
tree | 817cb1ba8791d379a9d63c9889ed336dcd8a5665 /Libraries/LibHTML | |
parent | fa876320ebb3a32a06dece87a17efd11117fcf76 (diff) | |
download | serenity-03cca4510a724df0a9db6f728675415f1b8e823e.zip |
LibHTML: Fix LayoutDocument height computation
Diffstat (limited to 'Libraries/LibHTML')
-rw-r--r-- | Libraries/LibHTML/Layout/LayoutDocument.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Libraries/LibHTML/Layout/LayoutDocument.cpp b/Libraries/LibHTML/Layout/LayoutDocument.cpp index a734dca5b5..7f3717ce67 100644 --- a/Libraries/LibHTML/Layout/LayoutDocument.cpp +++ b/Libraries/LibHTML/Layout/LayoutDocument.cpp @@ -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); } |