From 058d44dcae2241c9e5bb0e81268275eae7eb4714 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 24 Sep 2021 11:37:35 +0100 Subject: LibWeb: Replace last couple of StyleValue casts with `as_foo()` --- Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp') diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index d9b59bf80d..7ecde84f51 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -2095,7 +2095,7 @@ RefPtr 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(*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; -- cgit v1.2.3