From 944b985929d34d0279e111fa14b8dcf1f56a613d Mon Sep 17 00:00:00 2001 From: Callum Law Date: Thu, 21 Aug 2025 16:52:20 +1200 Subject: [PATCH] LibWeb: Remove handling of invalid values in `compute_math_depth` This was unnecessary as the parser will never produce values other than MathDepthStyleValue --- Libraries/LibWeb/CSS/StyleComputer.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Libraries/LibWeb/CSS/StyleComputer.cpp b/Libraries/LibWeb/CSS/StyleComputer.cpp index 50d054be9a6..ffcb8835d4b 100644 --- a/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -3172,12 +3172,7 @@ void StyleComputer::compute_math_depth(ComputedProperties& style, DOM::Element c return element->element_to_inherit_style_from(pseudo_element)->computed_properties()->math_depth(); }; - auto const& value = style.property(CSS::PropertyID::MathDepth); - if (!value.is_math_depth()) { - style.set_math_depth(inherited_math_depth()); - return; - } - auto const& math_depth = value.as_math_depth(); + auto const& math_depth = style.property(CSS::PropertyID::MathDepth).as_math_depth(); auto resolve_integer = [&](StyleValue const& integer_value) { if (integer_value.is_integer())