Coverage Report

Created: 2026-02-14 08:01

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/serenity/Userland/Libraries/LibWeb/Animations/AnimationPlaybackEvent.cpp
Line
Count
Source
1
/*
2
 * Copyright (c) 2023, Matthew Olsson <mattco@serenityos.org>.
3
 *
4
 * SPDX-License-Identifier: BSD-2-Clause
5
 */
6
7
#include <LibWeb/Animations/AnimationPlaybackEvent.h>
8
#include <LibWeb/Bindings/AnimationPlaybackEventPrototype.h>
9
#include <LibWeb/Bindings/Intrinsics.h>
10
11
namespace Web::Animations {
12
13
JS_DEFINE_ALLOCATOR(AnimationPlaybackEvent);
14
15
JS::NonnullGCPtr<AnimationPlaybackEvent> AnimationPlaybackEvent::create(JS::Realm& realm, FlyString const& type, AnimationPlaybackEventInit const& event_init)
16
0
{
17
0
    return realm.heap().allocate<AnimationPlaybackEvent>(realm, realm, type, event_init);
18
0
}
19
20
// https://www.w3.org/TR/web-animations-1/#dom-animationplaybackevent-animationplaybackevent
21
WebIDL::ExceptionOr<JS::NonnullGCPtr<AnimationPlaybackEvent>> AnimationPlaybackEvent::construct_impl(JS::Realm& realm, FlyString const& type, AnimationPlaybackEventInit const& event_init)
22
0
{
23
0
    return create(realm, type, event_init);
24
0
}
25
26
AnimationPlaybackEvent::AnimationPlaybackEvent(JS::Realm& realm, FlyString const& type, AnimationPlaybackEventInit const& event_init)
27
0
    : DOM::Event(realm, type, event_init)
28
0
    , m_current_time(event_init.current_time)
29
0
    , m_timeline_time(event_init.timeline_time)
30
0
{
31
0
}
32
33
void AnimationPlaybackEvent::initialize(JS::Realm& realm)
34
0
{
35
0
    Base::initialize(realm);
36
0
    WEB_SET_PROTOTYPE_FOR_INTERFACE(AnimationPlaybackEvent);
37
0
}
38
39
}