mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:47:34 +00:00
LibWeb: Simplify some code with CSS::LengthPercentage::is_auto()
This commit is contained in:
parent
3145f92bc0
commit
7aa9e03e85
1 changed files with 4 additions and 4 deletions
|
@ -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
|
bool FlexFormattingContext::is_main_axis_margin_first_auto(Box const& box) const
|
||||||
{
|
{
|
||||||
if (is_row_layout())
|
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().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().top.length().is_auto();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FlexFormattingContext::is_main_axis_margin_second_auto(Box const& box) const
|
bool FlexFormattingContext::is_main_axis_margin_second_auto(Box const& box) const
|
||||||
{
|
{
|
||||||
if (is_row_layout())
|
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().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().bottom.length().is_auto();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlexFormattingContext::set_main_size(Box const& box, float size)
|
void FlexFormattingContext::set_main_size(Box const& box, float size)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue