1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:48:11 +00:00

LibWeb: Replace last couple of StyleValue casts with as_foo()

This commit is contained in:
Sam Atkins 2021-09-24 11:37:35 +01:00 committed by Andreas Kling
parent a83b620fa6
commit 058d44dcae
2 changed files with 3 additions and 3 deletions

View file

@ -2095,7 +2095,7 @@ RefPtr<StyleValue> Parser::parse_flex_value(ParsingContext const& context, Vecto
return nullptr;
// Zero is a valid value for basis, but only if grow and shrink are already specified.
if (value->is_numeric() && static_cast<NumericStyleValue&>(*value).value() == 0) {
if (value->has_number() && value->to_number() == 0) {
if (flex_grow && flex_shrink && !flex_basis) {
flex_basis = LengthStyleValue::create(Length(0, Length::Type::Px));
continue;