mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00:00
LibWeb: Make CSSStyleDeclaration GC-allocated
This commit is contained in:
@@ -19,8 +19,15 @@
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
ResolvedCSSStyleDeclaration* ResolvedCSSStyleDeclaration::create(DOM::Element& element)
|
||||
{
|
||||
auto& window_object = element.document().preferred_window_object();
|
||||
return window_object.heap().allocate<ResolvedCSSStyleDeclaration>(window_object.realm(), element);
|
||||
}
|
||||
|
||||
ResolvedCSSStyleDeclaration::ResolvedCSSStyleDeclaration(DOM::Element& element)
|
||||
: m_element(element)
|
||||
: CSSStyleDeclaration(element.document().preferred_window_object())
|
||||
, m_element(element)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user