1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:38:11 +00:00

LibWeb: Make CSSRuleList GC-allocated

This commit is contained in:
Andreas Kling 2022-08-07 13:51:40 +02:00
parent 5366924f11
commit 5d6cb9cbdb
11 changed files with 50 additions and 29 deletions

View file

@ -279,12 +279,13 @@ NonnullRefPtr<Document> Document::create(AK::URL const& url)
Document::Document(const AK::URL& url)
: ParentNode(*this, NodeType::DOCUMENT_NODE)
, m_style_computer(make<CSS::StyleComputer>(*this))
, m_style_sheets(JS::make_handle(CSS::StyleSheetList::create(*this)))
, m_url(url)
, m_window(HTML::Window::create_with_document(*this))
, m_implementation(DOMImplementation::create({}, *this))
, m_history(HTML::History::create(*this))
{
m_style_sheets = JS::make_handle(CSS::StyleSheetList::create(*this));
HTML::main_thread_event_loop().register_document({}, *this);
m_style_update_timer = Core::Timer::create_single_shot(0, [this] {