mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-24 00:49:46 +00:00
LibWeb: Add absolutized method for FontStyleStyleValue
This commit is contained in:
parent
28451b16c9
commit
8284a99f0a
Notes:
github-actions[bot]
2025-10-20 15:14:13 +00:00
Author: https://github.com/Calme1709
Commit: 8284a99f0a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6426
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 16 additions and 14 deletions
|
|
@ -3456,18 +3456,7 @@ NonnullRefPtr<StyleValue const> StyleComputer::compute_font_style(NonnullRefPtr<
|
|||
if (specified_value->is_keyword())
|
||||
return FontStyleStyleValue::create(*keyword_to_font_style(specified_value->to_keyword()));
|
||||
|
||||
auto const& angle_value = specified_value->as_font_style().angle();
|
||||
|
||||
if (!angle_value)
|
||||
return specified_value;
|
||||
|
||||
if (angle_value->is_angle())
|
||||
return FontStyleStyleValue::create(specified_value->as_font_style().font_style(), AngleStyleValue::create(Angle::make_degrees(angle_value->as_angle().angle().to_degrees())));
|
||||
|
||||
if (angle_value->is_calculated())
|
||||
return FontStyleStyleValue::create(specified_value->as_font_style().font_style(), AngleStyleValue::create(angle_value->as_calculated().resolve_angle(CalculationResolutionContext::from_computation_context(computation_context)).value()));
|
||||
|
||||
VERIFY_NOT_REACHED();
|
||||
return specified_value->absolutized(computation_context);
|
||||
}
|
||||
|
||||
NonnullRefPtr<StyleValue const> StyleComputer::compute_font_weight(NonnullRefPtr<StyleValue const> const& specified_value, double inherited_font_weight, ComputationContext const& computation_context)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue