mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
LibWeb: Make CSSRule and all its subclasses GC-allocated
This commit is contained in:
parent
5d6cb9cbdb
commit
12042f0757
39 changed files with 338 additions and 236 deletions
|
@ -1,15 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) 2021, the SerenityOS developers.
|
||||
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/CSSRulePrototype.h>
|
||||
#include <LibWeb/Bindings/WindowObject.h>
|
||||
#include <LibWeb/CSS/CSSRule.h>
|
||||
#include <LibWeb/CSS/CSSStyleSheet.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
CSSRule::CSSRule(Bindings::WindowObject& window_object)
|
||||
: PlatformObject(window_object.ensure_web_prototype<Bindings::CSSRulePrototype>("CSSRule"))
|
||||
{
|
||||
}
|
||||
|
||||
void CSSRule::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_parent_style_sheet.ptr());
|
||||
visitor.visit(m_parent_rule.ptr());
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/cssom/#dom-cssrule-csstext
|
||||
String CSSRule::css_text() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue