mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-03 01:38:52 +00:00
LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
This commit is contained in:
parent
ce23efc5f6
commit
f87041bf3a
Notes:
github-actions[bot]
2024-11-15 13:50:17 +00:00
Author: https://github.com/shannonbooth
Commit: f87041bf3a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2345
1722 changed files with 9939 additions and 9906 deletions
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <AK/Badge.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibJS/Heap/MarkedVector.h>
|
||||
#include <LibGC/MarkedVector.h>
|
||||
#include <LibWeb/DOM/EventTarget.h>
|
||||
#include <LibWeb/HTML/VideoTrack.h>
|
||||
|
||||
|
@ -16,18 +16,18 @@ namespace Web::HTML {
|
|||
|
||||
class VideoTrackList final : public DOM::EventTarget {
|
||||
WEB_PLATFORM_OBJECT(VideoTrackList, DOM::EventTarget);
|
||||
JS_DECLARE_ALLOCATOR(VideoTrackList);
|
||||
GC_DECLARE_ALLOCATOR(VideoTrackList);
|
||||
|
||||
public:
|
||||
void add_track(Badge<HTMLMediaElement>, JS::NonnullGCPtr<VideoTrack>);
|
||||
void add_track(Badge<HTMLMediaElement>, GC::Ref<VideoTrack>);
|
||||
void remove_all_tracks(Badge<HTMLMediaElement>);
|
||||
|
||||
Span<JS::NonnullGCPtr<VideoTrack>> video_tracks() { return m_video_tracks; }
|
||||
Span<GC::Ref<VideoTrack>> video_tracks() { return m_video_tracks; }
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/media.html#dom-videotracklist-length
|
||||
size_t length() const { return m_video_tracks.size(); }
|
||||
|
||||
JS::GCPtr<VideoTrack> get_track_by_id(StringView id) const;
|
||||
GC::Ptr<VideoTrack> get_track_by_id(StringView id) const;
|
||||
i32 selected_index() const;
|
||||
|
||||
void set_onchange(WebIDL::CallbackType*);
|
||||
|
@ -47,7 +47,7 @@ private:
|
|||
virtual void initialize(JS::Realm&) override;
|
||||
virtual JS::ThrowCompletionOr<Optional<JS::PropertyDescriptor>> internal_get_own_property(JS::PropertyKey const& property_name) const override;
|
||||
|
||||
Vector<JS::NonnullGCPtr<VideoTrack>> m_video_tracks;
|
||||
Vector<GC::Ref<VideoTrack>> m_video_tracks;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue