mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
LibWeb: Make CSSRule and all its subclasses GC-allocated
This commit is contained in:
parent
5d6cb9cbdb
commit
12042f0757
Notes:
sideshowbarker
2024-07-17 07:29:03 +09:00
Author: https://github.com/awesomekling
Commit: 12042f0757
Pull-request: https://github.com/SerenityOS/serenity/pull/14816
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/linusg ✅
39 changed files with 338 additions and 236 deletions
|
@ -1,16 +1,20 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/CSSConditionRulePrototype.h>
|
||||
#include <LibWeb/Bindings/WindowObject.h>
|
||||
#include <LibWeb/CSS/CSSConditionRule.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
CSSConditionRule::CSSConditionRule(NonnullRefPtrVector<CSSRule>&& rules)
|
||||
: CSSGroupingRule(move(rules))
|
||||
CSSConditionRule::CSSConditionRule(Bindings::WindowObject& window_object, CSSRuleList& rules)
|
||||
: CSSGroupingRule(window_object, rules)
|
||||
{
|
||||
set_prototype(&window_object.ensure_web_prototype<Bindings::CSSConditionRulePrototype>("CSSConditionRule"));
|
||||
}
|
||||
|
||||
void CSSConditionRule::for_each_effective_style_rule(Function<void(CSSStyleRule const&)> const& callback) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue