mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibWeb: Make StyleSheet and CSSStyleSheet GC-allocated
This commit is contained in:
parent
0fe923e355
commit
5d60212076
Notes:
sideshowbarker
2024-07-17 07:29:15 +09:00
Author: https://github.com/awesomekling
Commit: 5d60212076
Pull-request: https://github.com/SerenityOS/serenity/pull/14816
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/linusg ✅
21 changed files with 166 additions and 96 deletions
|
@ -5,12 +5,25 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/StyleSheetPrototype.h>
|
||||
#include <LibWeb/Bindings/WindowObject.h>
|
||||
#include <LibWeb/CSS/CSSStyleSheet.h>
|
||||
#include <LibWeb/CSS/StyleSheet.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
StyleSheet::StyleSheet(Bindings::WindowObject& window_object)
|
||||
: PlatformObject(window_object.ensure_web_prototype<Bindings::StyleSheetPrototype>("StyleSheet"))
|
||||
{
|
||||
}
|
||||
|
||||
void StyleSheet::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_parent_style_sheet);
|
||||
}
|
||||
|
||||
void StyleSheet::set_owner_node(DOM::Element* element)
|
||||
{
|
||||
if (element)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue