mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Simplify handling of font-variation-settings
Since we resolve any relative lengths at compute time there's no need for the value to be passed around as a `NumberOrCalculated` and we can just resolve it within `ComputedProperties::font_variation_settings`. The only place this is used it is used with value_or so there's no need to return it is an `Optional`. This is only used for loading fonts (which occurs during style computation) so there's no need to store it in `ComputedValues`
This commit is contained in:
parent
4fb28539a9
commit
dfa47d9ed6
Notes:
github-actions[bot]
2025-12-05 10:04:40 +00:00
Author: https://github.com/Calme1709
Commit: dfa47d9ed6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6757
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/gmta
7 changed files with 14 additions and 23 deletions
|
|
@ -550,8 +550,7 @@ void NodeWithStyle::apply_style(CSS::ComputedProperties const& computed_style)
|
|||
if (auto maybe_font_language_override = computed_style.font_language_override(); maybe_font_language_override.has_value())
|
||||
computed_values.set_font_language_override(maybe_font_language_override.release_value());
|
||||
computed_values.set_font_features(computed_style.font_features());
|
||||
if (auto maybe_font_variation_settings = computed_style.font_variation_settings(); maybe_font_variation_settings.has_value())
|
||||
computed_values.set_font_variation_settings(maybe_font_variation_settings.release_value());
|
||||
computed_values.set_font_variation_settings(computed_style.font_variation_settings());
|
||||
|
||||
auto const& border_bottom_left_radius = computed_style.property(CSS::PropertyID::BorderBottomLeftRadius);
|
||||
if (border_bottom_left_radius.is_border_radius()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue