mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
LibWeb: Copy the keyframes in KeyframeEffect's copy constructor
This commit is contained in:
parent
5b84bd6e45
commit
b5c682bc2e
Notes:
sideshowbarker
2024-07-17 06:39:26 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/b5c682bc2e Pull-request: https://github.com/SerenityOS/serenity/pull/24530
3 changed files with 15 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
anim count: 1
|
||||
keyframe: {"offset":null,"computedOffset":1,"easing":"linear","composite":"auto","marginLeft":"10px"}
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="../../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let effect = new KeyframeEffect(null, [{ marginLeft: "10px" }]);
|
||||
let copiedEffect = new KeyframeEffect(effect);
|
||||
let copiedKeyframes = copiedEffect.getKeyframes();
|
||||
println(`anim count: ${copiedKeyframes.length}`);
|
||||
if (copiedKeyframes.length > 0)
|
||||
println(`keyframe: ${JSON.stringify(copiedKeyframes[0])}`);
|
||||
})
|
||||
</script>
|
|
@ -706,8 +706,8 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<KeyframeEffect>> KeyframeEffect::construct_
|
|||
// - effect target,
|
||||
effect->m_target_element = source->target();
|
||||
|
||||
// FIXME:
|
||||
// - keyframes,
|
||||
effect->m_keyframes = source->m_keyframes;
|
||||
|
||||
// - composite operation, and
|
||||
effect->set_composite(source->composite());
|
||||
|
|
Loading…
Reference in a new issue