From a27dd03dcce41fa923adc4ab546356627f7930bb Mon Sep 17 00:00:00 2001 From: Matthew Olsson Date: Sat, 3 Feb 2024 12:32:44 -0700 Subject: [PATCH] LibWeb: Avoid slicing struct in KeyframeEffect::construct_impl --- Userland/Libraries/LibWeb/Animations/KeyframeEffect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/Animations/KeyframeEffect.cpp b/Userland/Libraries/LibWeb/Animations/KeyframeEffect.cpp index 85752d514b..dfcb6d7270 100644 --- a/Userland/Libraries/LibWeb/Animations/KeyframeEffect.cpp +++ b/Userland/Libraries/LibWeb/Animations/KeyframeEffect.cpp @@ -49,7 +49,7 @@ WebIDL::ExceptionOr> KeyframeEffect::construct_ } // 4. Let timing input be the result corresponding to the first matching condition from below. - EffectTiming timing_input; + KeyframeEffectOptions timing_input; // If options is a KeyframeEffectOptions object, if (options.has()) { @@ -60,7 +60,7 @@ WebIDL::ExceptionOr> KeyframeEffect::construct_ else { // Let timing input be a new EffectTiming object with all members set to their default values and duration set // to options. - timing_input = { .duration = options.get() }; + timing_input.duration = options.get(); } // 5. Call the procedure to update the timing properties of an animation effect of effect from timing input.