mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Make CSSStyleDeclaration GC-allocated
This commit is contained in:
parent
12042f0757
commit
72bacba97b
Notes:
sideshowbarker
2024-07-17 07:28:59 +09:00
Author: https://github.com/awesomekling
Commit: 72bacba97b
Pull-request: https://github.com/SerenityOS/serenity/pull/14816
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/linusg ✅
18 changed files with 146 additions and 129 deletions
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue