LibWeb: Initial work to store ComputedProperties in computed form

`StyleValue`s stored within `ComputedProperties` should be in their
computed forms, this is for various reasons including:
 - Inheritance should be of computed values
 - Animations should work on computed values
 - Triggering transitions should work on computed values

Currently we store `StyleValue`s in an absolutized version of the
specified value - this is equivalent to the computed form in many cases
which is why this hasn't been causing significant issues but there are
some cases - such as `border-*-width` keywords where this is not the
case.

No functionality change as we are yet to implement any properties
This commit is contained in:
Callum Law 2025-08-26 14:48:47 +12:00 committed by Sam Atkins
commit f9e5332d16
Notes: github-actions[bot] 2025-08-28 08:31:40 +00:00
3 changed files with 43 additions and 10 deletions

View file

@ -835,7 +835,7 @@ CSS::RequiredInvalidationAfterStyleChange Element::recompute_inherited_style()
return invalidation;
document().style_computer().compute_font(*computed_properties, this, {});
document().style_computer().absolutize_values(*computed_properties);
document().style_computer().compute_property_values(*computed_properties);
for (auto [property_id, old_value] : old_values_with_relative_units) {
auto const& new_value = computed_properties->property(static_cast<CSS::PropertyID>(property_id));