summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-03-11 11:44:33 +0100
committerAndreas Kling <kling@serenityos.org>2023-03-11 11:45:17 +0100
commit0808463a7d4c9b7fc2bd64a650c6445cfda3d33d (patch)
tree5c6da898ef802e9d87fa8cca4c305b5d9196cc4f /Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp
parentf97754942c57117c07b3d369fa23d12c38828583 (diff)
downloadserenity-0808463a7d4c9b7fc2bd64a650c6445cfda3d33d.zip
LibWeb: Use FlexItem::outer_hypothetical_main_size() in one more place
Better than doing the calculation manually.
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp
index 95abfb3bad..b2726039fa 100644
--- a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp
+++ b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp
@@ -857,7 +857,7 @@ void FlexFormattingContext::collect_flex_items_into_flex_lines()
FlexLine line;
CSSPixels line_main_size = 0;
for (auto& item : m_flex_items) {
- auto outer_hypothetical_main_size = item.hypothetical_main_size + item.margins.main_before + item.margins.main_after + item.borders.main_before + item.borders.main_after + item.padding.main_before + item.padding.main_after;
+ auto const outer_hypothetical_main_size = item.outer_hypothetical_main_size();
if (!line.items.is_empty() && (line_main_size + outer_hypothetical_main_size) > m_available_space_for_items->main.to_px_or_zero()) {
m_flex_lines.append(move(line));
line = {};