mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
LibWeb: Make DOMImplementation GC-allocated
This commit is contained in:
parent
cfdb8f2a8e
commit
967a3e5a45
6 changed files with 47 additions and 26 deletions
|
@ -281,7 +281,6 @@ Document::Document(const AK::URL& url)
|
|||
, m_style_computer(make<CSS::StyleComputer>(*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));
|
||||
|
@ -1621,9 +1620,11 @@ void Document::evaluate_media_rules()
|
|||
}
|
||||
}
|
||||
|
||||
NonnullRefPtr<DOMImplementation> Document::implementation() const
|
||||
DOMImplementation* Document::implementation()
|
||||
{
|
||||
return *m_implementation;
|
||||
if (!m_implementation.cell())
|
||||
m_implementation = JS::make_handle(*DOMImplementation::create(*this));
|
||||
return m_implementation.cell();
|
||||
}
|
||||
|
||||
bool Document::has_focus() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue