LibWeb: Separate use time easing functions from EasingStyleValue

In the future there will be different methods of creating these use-time
easing functions (e.g. from `KeywordStyleValue`s)
This commit is contained in:
Callum Law 2025-10-11 12:57:26 +13:00 committed by Sam Atkins
commit 95e26819d9
Notes: github-actions[bot] 2025-10-20 10:29:47 +00:00
13 changed files with 343 additions and 246 deletions

View file

@ -1277,9 +1277,9 @@ static void apply_animation_properties(DOM::Document& document, CascadedProperti
play_state = *play_state_value;
}
CSS::EasingStyleValue::Function timing_function { CSS::EasingStyleValue::CubicBezier::ease() };
EasingFunction timing_function = EasingFunction::from_style_value(EasingStyleValue::create(EasingStyleValue::CubicBezier::ease()));
if (auto timing_property = cascaded_properties.property(PropertyID::AnimationTimingFunction); timing_property && timing_property->is_easing())
timing_function = timing_property->as_easing().function();
timing_function = EasingFunction::from_style_value(timing_property->as_easing());
Bindings::CompositeOperation composite_operation { Bindings::CompositeOperation::Replace };
if (auto composite_property = cascaded_properties.property(PropertyID::AnimationComposition); composite_property) {