mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +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
|
@ -29,12 +29,12 @@ struct FontFaceDescriptors {
|
|||
|
||||
class FontFace final : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(FontFace, Bindings::PlatformObject);
|
||||
JS_DECLARE_ALLOCATOR(FontFace);
|
||||
GC_DECLARE_ALLOCATOR(FontFace);
|
||||
|
||||
public:
|
||||
using FontFaceSource = Variant<String, JS::Handle<WebIDL::BufferSource>>;
|
||||
using FontFaceSource = Variant<String, GC::Root<WebIDL::BufferSource>>;
|
||||
|
||||
[[nodiscard]] static JS::NonnullGCPtr<FontFace> construct_impl(JS::Realm&, String family, FontFaceSource source, FontFaceDescriptors const& descriptors);
|
||||
[[nodiscard]] static GC::Ref<FontFace> construct_impl(JS::Realm&, String family, FontFaceSource source, FontFaceDescriptors const& descriptors);
|
||||
virtual ~FontFace() override;
|
||||
|
||||
String family() const { return m_family; }
|
||||
|
@ -74,15 +74,15 @@ public:
|
|||
|
||||
Bindings::FontFaceLoadStatus status() const { return m_status; }
|
||||
|
||||
JS::NonnullGCPtr<WebIDL::Promise> load();
|
||||
JS::NonnullGCPtr<WebIDL::Promise> loaded() const;
|
||||
GC::Ref<WebIDL::Promise> load();
|
||||
GC::Ref<WebIDL::Promise> loaded() const;
|
||||
|
||||
void load_font_source();
|
||||
|
||||
JS::NonnullGCPtr<WebIDL::Promise> font_status_promise() { return m_font_status_promise; }
|
||||
GC::Ref<WebIDL::Promise> font_status_promise() { return m_font_status_promise; }
|
||||
|
||||
private:
|
||||
FontFace(JS::Realm&, JS::NonnullGCPtr<WebIDL::Promise> font_status_promise, Vector<ParsedFontFace::Source> urls, ByteBuffer data, String family, FontFaceDescriptors const& descriptors);
|
||||
FontFace(JS::Realm&, GC::Ref<WebIDL::Promise> font_status_promise, Vector<ParsedFontFace::Source> urls, ByteBuffer data, String family, FontFaceDescriptors const& descriptors);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
@ -104,9 +104,9 @@ private:
|
|||
// https://drafts.csswg.org/css-font-loading/#dom-fontface-status
|
||||
Bindings::FontFaceLoadStatus m_status { Bindings::FontFaceLoadStatus::Unloaded };
|
||||
|
||||
JS::NonnullGCPtr<WebIDL::Promise> m_font_status_promise; // [[FontStatusPromise]]
|
||||
Vector<ParsedFontFace::Source> m_urls; // [[Urls]]
|
||||
ByteBuffer m_binary_data; // [[Data]]
|
||||
GC::Ref<WebIDL::Promise> m_font_status_promise; // [[FontStatusPromise]]
|
||||
Vector<ParsedFontFace::Source> m_urls; // [[Urls]]
|
||||
ByteBuffer m_binary_data; // [[Data]]
|
||||
|
||||
RefPtr<Gfx::Typeface> m_parsed_font;
|
||||
RefPtr<Core::Promise<NonnullRefPtr<Gfx::Typeface>>> m_font_load_promise;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue