mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 15:43:20 +00:00
LibWeb: Use correct percentage basis when resolving line height
This commit is contained in:
parent
078bc1a471
commit
701ef22952
Notes:
github-actions[bot]
2025-10-13 09:19:19 +00:00
Author: https://github.com/tcl3
Commit: 701ef22952
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6458
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 34 additions and 3 deletions
|
@ -3601,7 +3601,7 @@ NonnullRefPtr<StyleValue const> StyleComputer::compute_line_height(NonnullRefPtr
|
|||
|
||||
// NOTE: We also support calc()'d numbers
|
||||
if (specified_value->is_calculated() && specified_value->as_calculated().resolves_to_number())
|
||||
return NumberStyleValue::create(specified_value->as_calculated().resolve_number(CalculationResolutionContext::from_computation_context(computation_context)).value());
|
||||
return NumberStyleValue::create(specified_value->as_calculated().resolve_number(CalculationResolutionContext::from_computation_context(computation_context, Length(1, LengthUnit::Em))).value());
|
||||
|
||||
// <percentage [0,∞]>
|
||||
if (specified_value->is_percentage())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue