AK: Use Deducing this for OptionalBase

This is taken from and akin to
https://github.com/SerenityOS/serenity/pull/25894
This commit is contained in:
Hendiadyoin1 2025-07-15 00:22:12 +02:00 committed by Jelle Raaijmakers
parent fd4888e800
commit bcd01da91d
Notes: github-actions[bot] 2025-11-20 15:28:30 +00:00
12 changed files with 81 additions and 94 deletions

View file

@ -2488,7 +2488,7 @@ RefPtr<StyleValue const> StyleComputer::recascade_font_size_if_needed(DOM::Abstr
VERIFY(font_size_value->is_length());
auto inherited_line_height = ancestor.element_to_inherit_style_from().map([](auto& parent_element) { return parent_element.computed_properties()->line_height(); }).value_or(InitialValues::line_height());
auto inherited_line_height = ancestor.element_to_inherit_style_from().map([](auto&& parent_element) { return parent_element.computed_properties()->line_height(); }).value_or(InitialValues::line_height());
current_size_in_px = font_size_value->as_length().length().to_px(viewport_rect(), Length::FontMetrics { current_size_in_px, monospace_font->with_size(current_size_in_px * 0.75f)->pixel_metrics(), inherited_line_height }, m_root_element_font_metrics);
};