summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Layout
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-07-21 16:34:25 +0200
committerAndreas Kling <kling@serenityos.org>2022-07-25 15:03:18 +0200
commit7aa9e03e85072510adf48863a863c2fceec69808 (patch)
tree6ef5c8771b54d3e864158124c28711965b8cd089 /Userland/Libraries/LibWeb/Layout
parent3145f92bc0ef778acc5188b0e77218e34e384369 (diff)
downloadserenity-7aa9e03e85072510adf48863a863c2fceec69808.zip
LibWeb: Simplify some code with CSS::LengthPercentage::is_auto()
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout')
-rw-r--r--Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp8
1 files 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)