From 7aa9e03e85072510adf48863a863c2fceec69808 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 21 Jul 2022 16:34:25 +0200 Subject: [PATCH] LibWeb: Simplify some code with CSS::LengthPercentage::is_auto() --- .../Libraries/LibWeb/Layout/FlexFormattingContext.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp index 5f313a23e0..adbe120da0 100644 --- a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp @@ -376,15 +376,15 @@ bool FlexFormattingContext::is_cross_auto(Box const& box) const bool FlexFormattingContext::is_main_axis_margin_first_auto(Box const& box) const { if (is_row_layout()) - return box.computed_values().margin().left.is_length() && box.computed_values().margin().left.length().is_auto(); - return box.computed_values().margin().top.is_length() && box.computed_values().margin().top.length().is_auto(); + return box.computed_values().margin().left.length().is_auto(); + return box.computed_values().margin().top.length().is_auto(); } bool FlexFormattingContext::is_main_axis_margin_second_auto(Box const& box) const { if (is_row_layout()) - return box.computed_values().margin().right.is_length() && box.computed_values().margin().right.length().is_auto(); - return box.computed_values().margin().bottom.is_length() && box.computed_values().margin().bottom.length().is_auto(); + return box.computed_values().margin().right.length().is_auto(); + return box.computed_values().margin().bottom.length().is_auto(); } void FlexFormattingContext::set_main_size(Box const& box, float size)