mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb/MathML: Stop shadowing value local variable
This commit is contained in:
parent
e561749164
commit
d98cc50736
Notes:
github-actions[bot]
2025-11-14 09:56:15 +00:00
Author: https://github.com/AtkinsSJ
Commit: d98cc50736
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6811
Reviewed-by: https://github.com/lpas
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue