1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:47:35 +00:00

LibWeb: Remove Length::Type::Undefined! :^)

This commit is contained in:
Sam Atkins 2022-02-18 16:50:17 +00:00 committed by Andreas Kling
parent b715943035
commit 356d8bcfe8
8 changed files with 13 additions and 20 deletions

View file

@ -29,7 +29,7 @@ static bool is_undefined_or_auto(Optional<CSS::LengthPercentage> const& length_p
{
if (!length_percentage.has_value())
return true;
return length_percentage->is_length() && length_percentage->length().is_undefined_or_auto();
return length_percentage->is_length() && length_percentage->length().is_auto();
}
FlexFormattingContext::FlexFormattingContext(Box& flex_container, FormattingContext* parent)
@ -235,11 +235,12 @@ bool FlexFormattingContext::cross_size_is_absolute_or_resolved_nicely(NodeWithSt
if (!length_percentage.has_value())
return false;
// FIXME: Handle calc here.
if (length_percentage->is_length()) {
auto& length = length_percentage->length();
if (length.is_absolute() || length.is_relative())
return true;
if (length.is_undefined_or_auto())
if (length.is_auto())
return false;
}