1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +00:00

LibWeb: Simplify more code with CSS::LengthPercentage::is_auto()

This commit is contained in:
Andreas Kling 2022-07-25 23:55:20 +02:00
parent 16c173de43
commit bd48d9521a
3 changed files with 15 additions and 19 deletions

View file

@ -393,15 +393,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.length().is_auto();
return box.computed_values().margin().top.length().is_auto();
return box.computed_values().margin().left.is_auto();
return box.computed_values().margin().top.is_auto();
}
bool FlexFormattingContext::is_main_axis_margin_second_auto(Box const& box) const
{
if (is_row_layout())
return box.computed_values().margin().right.length().is_auto();
return box.computed_values().margin().bottom.length().is_auto();
return box.computed_values().margin().right.is_auto();
return box.computed_values().margin().bottom.is_auto();
}
void FlexFormattingContext::set_main_size(Box const& box, float size)