mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02: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:
Notes:
github-actions[bot]
2025-12-05 10:04:40 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/dfa47d9ed6f Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6757 Reviewed-by: https://github.com/AtkinsSJ ✅ Reviewed-by: https://github.com/gmta
@@ -148,8 +148,7 @@ void CanvasTextDrawingStyles<IncludingClass, CanvasType>::set_font(StringView fo
|
||||
computed_font_style->as_font_style().to_font_slope(),
|
||||
computed_font_weight->as_number().number(),
|
||||
computed_font_width->as_percentage().percentage(),
|
||||
{},
|
||||
length_resolution_context);
|
||||
{});
|
||||
},
|
||||
[](HTML::WorkerGlobalScope*) -> RefPtr<Gfx::FontCascadeList const> {
|
||||
// FIXME: implement computing the font for HTML::WorkerGlobalScope
|
||||
|
||||
Reference in New Issue
Block a user