diff options
author | Andreas Kling <kling@serenityos.org> | 2021-01-18 17:53:49 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-18 20:20:20 +0100 |
commit | 3e8873b63ebec3a14c4cfcf80786e96a9be8cf86 (patch) | |
tree | c7f6c397143eefb5f0dfc530df5c359a84e8b0cb /Userland/Libraries/LibWeb/Layout | |
parent | 149f10b0b97715ac6c45308654940a17667cdcfb (diff) | |
download | serenity-3e8873b63ebec3a14c4cfcf80786e96a9be8cf86.zip |
LibWeb: Add Layout::Box::margin_box_height()
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/Box.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/Box.h b/Userland/Libraries/LibWeb/Layout/Box.h index 5387ab07ec..b35b561134 100644 --- a/Userland/Libraries/LibWeb/Layout/Box.h +++ b/Userland/Libraries/LibWeb/Layout/Box.h @@ -58,6 +58,12 @@ public: return width() + margin_box.left + margin_box.right; } + float margin_box_height() const + { + auto margin_box = box_model().margin_box(); + return height() + margin_box.top + margin_box.bottom; + } + float border_box_width() const { auto border_box = box_model().border_box(); |