mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:37:35 +00:00
LibWeb: Add missing is_length() check in FFC::is_cross_auto()
We can't access LengthPercentage::length() before verifying that it's indeed a length.
This commit is contained in:
parent
f0a4b33a5e
commit
c04c2df0f7
1 changed files with 1 additions and 1 deletions
|
@ -310,7 +310,7 @@ float FlexFormattingContext::calculated_main_size(Box const& box) const
|
||||||
bool FlexFormattingContext::is_cross_auto(Box const& box) const
|
bool FlexFormattingContext::is_cross_auto(Box const& box) const
|
||||||
{
|
{
|
||||||
auto& cross_length = is_row_layout() ? box.computed_values().height() : box.computed_values().width();
|
auto& cross_length = is_row_layout() ? box.computed_values().height() : box.computed_values().width();
|
||||||
return cross_length.has_value() && cross_length->length().is_auto();
|
return cross_length.has_value() && cross_length->is_length() && cross_length->length().is_auto();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FlexFormattingContext::is_main_axis_margin_first_auto(Box const& box) const
|
bool FlexFormattingContext::is_main_axis_margin_first_auto(Box const& box) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue