From 40af665a4929db2c387a047964025c89b6ef9016 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 24 Mar 2022 18:06:45 +0100 Subject: LibWeb: Add margin box helpers to Layout::FormattingState --- Userland/Libraries/LibWeb/Layout/FormattingState.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Libraries/LibWeb/Layout/FormattingState.h b/Userland/Libraries/LibWeb/Layout/FormattingState.h index 523d69c98d..99789b93e1 100644 --- a/Userland/Libraries/LibWeb/Layout/FormattingState.h +++ b/Userland/Libraries/LibWeb/Layout/FormattingState.h @@ -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; } -- cgit v1.2.3