1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 23:28:11 +00:00

LibWeb: Add Layout::Box::margin_box_width()

This commit is contained in:
Andreas Kling 2021-01-18 17:33:16 +01:00
parent 140463e833
commit d18bc9ccd2

View file

@ -52,6 +52,12 @@ public:
float width() const { return m_size.width(); }
float height() const { return m_size.height(); }
float margin_box_width() const
{
auto margin_box = box_model().margin_box();
return width() + margin_box.left + margin_box.right;
}
float border_box_width() const
{
auto border_box = box_model().border_box();