mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibWeb: Simplify more code with CSS::LengthPercentage::is_auto()
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user