LibWeb: Use initial value for animation start if it does not exist

This fixes an issue where a property could not be animated unless the
element had a specified value for that property somewhere in its
styling.
This commit is contained in:
Matthew Olsson 2024-02-11 14:21:35 -07:00 committed by Andreas Kling
parent 65858154de
commit 4e27d07ff2
Notes: sideshowbarker 2024-07-17 02:05:41 +09:00

View file

@ -923,6 +923,9 @@ ErrorOr<void> StyleComputer::collect_animation_into(JS::NonnullGCPtr<Animations:
auto resolved_end_property = resolve_property(end_property.value());
if (resolved_end_property && !resolved_start_property)
resolved_start_property = CSS::property_initial_value(document().realm(), it.key);
if (!resolved_start_property || !resolved_end_property)
continue;