1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

LibWeb: Rename confusing parameter in AnimationPlaybackEvent

This commit is contained in:
Matthew Olsson 2024-02-03 18:23:14 -07:00 committed by Andreas Kling
parent 8c80d0ee02
commit 2e29b0d700
Notes: sideshowbarker 2024-07-17 02:14:39 +09:00
2 changed files with 9 additions and 9 deletions

View file

@ -11,19 +11,19 @@ namespace Web::Animations {
JS_DEFINE_ALLOCATOR(AnimationPlaybackEvent);
JS::NonnullGCPtr<AnimationPlaybackEvent> AnimationPlaybackEvent::create(JS::Realm& realm, FlyString const& event_name, AnimationPlaybackEventInit const& event_init)
JS::NonnullGCPtr<AnimationPlaybackEvent> AnimationPlaybackEvent::create(JS::Realm& realm, FlyString const& type, AnimationPlaybackEventInit const& event_init)
{
return realm.heap().allocate<AnimationPlaybackEvent>(realm, realm, event_name, event_init);
return realm.heap().allocate<AnimationPlaybackEvent>(realm, realm, type, event_init);
}
// https://www.w3.org/TR/web-animations-1/#dom-animationplaybackevent-animationplaybackevent
WebIDL::ExceptionOr<JS::NonnullGCPtr<AnimationPlaybackEvent>> AnimationPlaybackEvent::construct_impl(JS::Realm& realm, FlyString const& event_name, AnimationPlaybackEventInit const& event_init)
WebIDL::ExceptionOr<JS::NonnullGCPtr<AnimationPlaybackEvent>> AnimationPlaybackEvent::construct_impl(JS::Realm& realm, FlyString const& type, AnimationPlaybackEventInit const& event_init)
{
return create(realm, event_name, event_init);
return create(realm, type, event_init);
}
AnimationPlaybackEvent::AnimationPlaybackEvent(JS::Realm& realm, FlyString const& event_name, AnimationPlaybackEventInit const& event_init)
: DOM::Event(realm, event_name, event_init)
AnimationPlaybackEvent::AnimationPlaybackEvent(JS::Realm& realm, FlyString const& type, AnimationPlaybackEventInit const& event_init)
: DOM::Event(realm, type, event_init)
, m_current_time(event_init.current_time)
, m_timeline_time(event_init.timeline_time)
{

View file

@ -23,8 +23,8 @@ class AnimationPlaybackEvent : public DOM::Event {
JS_DECLARE_ALLOCATOR(AnimationPlaybackEvent);
public:
[[nodiscard]] static JS::NonnullGCPtr<AnimationPlaybackEvent> create(JS::Realm&, FlyString const& event_name, AnimationPlaybackEventInit const& event_init = {});
static WebIDL::ExceptionOr<JS::NonnullGCPtr<AnimationPlaybackEvent>> construct_impl(JS::Realm&, FlyString const& event_name, AnimationPlaybackEventInit const& event_init);
[[nodiscard]] static JS::NonnullGCPtr<AnimationPlaybackEvent> create(JS::Realm&, FlyString const& type, AnimationPlaybackEventInit const& event_init = {});
static WebIDL::ExceptionOr<JS::NonnullGCPtr<AnimationPlaybackEvent>> construct_impl(JS::Realm&, FlyString const& type, AnimationPlaybackEventInit const& event_init);
virtual ~AnimationPlaybackEvent() override = default;
@ -35,7 +35,7 @@ public:
void set_timeline_time(Optional<double> timeline_time) { m_timeline_time = timeline_time; }
private:
AnimationPlaybackEvent(JS::Realm&, FlyString const& event_name, AnimationPlaybackEventInit const& event_init);
AnimationPlaybackEvent(JS::Realm&, FlyString const& type, AnimationPlaybackEventInit const& event_init);
virtual void initialize(JS::Realm&) override;