1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 10:01:13 +09: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:
Shannon Booth 2024-11-15 04:01:23 +13:00 committed by Andreas Kling
parent ce23efc5f6
commit f87041bf3a
Notes: github-actions[bot] 2024-11-15 13:50:17 +00:00
1722 changed files with 9939 additions and 9906 deletions

View file

@ -14,9 +14,9 @@
namespace Web::CSS {
JS_DEFINE_ALLOCATOR(Screen);
GC_DEFINE_ALLOCATOR(Screen);
JS::NonnullGCPtr<Screen> Screen::create(HTML::Window& window)
GC::Ref<Screen> Screen::create(HTML::Window& window)
{
return window.realm().create<Screen>(window);
}
@ -51,7 +51,7 @@ Gfx::IntRect Screen::screen_rect() const
};
}
JS::NonnullGCPtr<ScreenOrientation> Screen::orientation()
GC::Ref<ScreenOrientation> Screen::orientation()
{
if (!m_orientation)
m_orientation = ScreenOrientation::create(realm());
@ -66,13 +66,13 @@ bool Screen::is_extended() const
}
// https://w3c.github.io/window-management/#dom-screen-onchange
void Screen::set_onchange(JS::GCPtr<WebIDL::CallbackType> event_handler)
void Screen::set_onchange(GC::Ptr<WebIDL::CallbackType> event_handler)
{
set_event_handler_attribute(HTML::EventNames::change, event_handler);
}
// https://w3c.github.io/window-management/#dom-screen-onchange
JS::GCPtr<WebIDL::CallbackType> Screen::onchange()
GC::Ptr<WebIDL::CallbackType> Screen::onchange()
{
return event_handler_attribute(HTML::EventNames::change);
}