LibWeb: Remove handling of invalid values in compute_math_depth

This was unnecessary as the parser will never produce values other than
MathDepthStyleValue
This commit is contained in:
Callum Law 2025-08-21 16:52:20 +12:00 committed by Jelle Raaijmakers
commit 944b985929
Notes: github-actions[bot] 2025-08-22 07:50:09 +00:00

View file

@ -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())