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:
parent
16c173de43
commit
bd48d9521a
3 changed files with 15 additions and 19 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue