1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:17:35 +00:00

LibWeb: Add margin box helpers to Layout::FormattingState

This commit is contained in:
Andreas Kling 2022-03-24 18:06:45 +01:00
parent 329f06d59a
commit 40af665a49

View file

@ -66,6 +66,9 @@ struct FormattingState {
float margin_box_top() const { return margin_top + border_top + padding_top; }
float margin_box_bottom() const { return margin_bottom + border_bottom + padding_bottom; }
float margin_box_width() const { return margin_box_left() + content_width + margin_box_right(); }
float margin_box_height() const { return margin_box_top() + content_height + margin_box_bottom(); }
float border_box_left() const { return border_left + padding_left; }
float border_box_right() const { return border_right + padding_right; }
float border_box_top() const { return border_top + padding_top; }