LibWeb: Absolutize StyleValues before computing font properties

We also avoid prematurely constructing CSSPixels when computing
font-size which gains us a couple of test passes
This commit is contained in:
Callum Law 2025-10-03 23:16:30 +13:00 committed by Tim Ledbetter
parent ca9d107a1a
commit 28451b16c9
Notes: github-actions[bot] 2025-10-20 15:14:19 +00:00
5 changed files with 53 additions and 45 deletions

View file

@ -127,6 +127,10 @@ private:
double value;
Optional<NumericType> type;
};
// FIXME: Calculations should be simplified apart from percentages by the absolutized method prior to this method
// being called so we can take just the percentage_basis rather than a full CalculationResolutionContext.
// There are still some CalculatedStyleValues which we don't call absolutized for (i.e. sub-values of other
// StyleValue classes which lack their own absolutized method) which will need to be fixed beforehand.
Optional<ResolvedValue> resolve_value(CalculationResolutionContext const&) const;
Optional<ValueType> percentage_resolved_type() const;