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
|
@ -16,10 +16,10 @@ namespace Web::CSS {
|
|||
|
||||
class Screen final : public DOM::EventTarget {
|
||||
WEB_PLATFORM_OBJECT(Screen, DOM::EventTarget);
|
||||
JS_DECLARE_ALLOCATOR(Screen);
|
||||
GC_DECLARE_ALLOCATOR(Screen);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static JS::NonnullGCPtr<Screen> create(HTML::Window&);
|
||||
[[nodiscard]] static GC::Ref<Screen> create(HTML::Window&);
|
||||
|
||||
i32 width() const { return screen_rect().width(); }
|
||||
i32 height() const { return screen_rect().height(); }
|
||||
|
@ -27,12 +27,12 @@ public:
|
|||
i32 avail_height() const { return screen_rect().height(); }
|
||||
u32 color_depth() const { return 24; }
|
||||
u32 pixel_depth() const { return 24; }
|
||||
JS::NonnullGCPtr<ScreenOrientation> orientation();
|
||||
GC::Ref<ScreenOrientation> orientation();
|
||||
|
||||
bool is_extended() const;
|
||||
|
||||
void set_onchange(JS::GCPtr<WebIDL::CallbackType> event_handler);
|
||||
JS::GCPtr<WebIDL::CallbackType> onchange();
|
||||
void set_onchange(GC::Ptr<WebIDL::CallbackType> event_handler);
|
||||
GC::Ptr<WebIDL::CallbackType> onchange();
|
||||
|
||||
private:
|
||||
explicit Screen(HTML::Window&);
|
||||
|
@ -44,8 +44,8 @@ private:
|
|||
|
||||
Gfx::IntRect screen_rect() const;
|
||||
|
||||
JS::NonnullGCPtr<HTML::Window> m_window;
|
||||
JS::GCPtr<ScreenOrientation> m_orientation;
|
||||
GC::Ref<HTML::Window> m_window;
|
||||
GC::Ptr<ScreenOrientation> m_orientation;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue