LibWeb/MathML: Stop shadowing value local variable

This commit is contained in:
Sam Atkins 2025-11-13 14:54:10 +00:00
parent e561749164
commit d98cc50736
Notes: github-actions[bot] 2025-11-14 09:56:15 +00:00

View file

@ -121,9 +121,9 @@ void MathMLElement::apply_presentational_hints(GC::Ref<CSS::CascadedProperties>
// are respectively mapped to add(<U>) add(<-U>) and <U>.
if (Optional<StringView> parsed_value = HTML::parse_integer_digits(value); parsed_value.has_value()) {
auto string_value = parsed_value.value();
if (auto value = parsed_value->to_number<i32>(TrimWhitespace::No); value.has_value()) {
auto style_value = string_value[0] == '+' || string_value[0] == '-' ? CSS::MathDepthStyleValue::create_add(CSS::IntegerStyleValue::create(value.release_value()))
: CSS::MathDepthStyleValue::create_integer(CSS::IntegerStyleValue::create(value.release_value()));
if (auto integer_value = parsed_value->to_number<i32>(TrimWhitespace::No); integer_value.has_value()) {
auto style_value = string_value[0] == '+' || string_value[0] == '-' ? CSS::MathDepthStyleValue::create_add(CSS::IntegerStyleValue::create(integer_value.release_value()))
: CSS::MathDepthStyleValue::create_integer(CSS::IntegerStyleValue::create(integer_value.release_value()));
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::MathDepth, style_value);
}
}