mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +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,16 +1,26 @@
|
|||
/*
|
||||
* 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/CSSFontFaceRulePrototype.h>
|
||||
#include <LibWeb/Bindings/WindowObject.h>
|
||||
#include <LibWeb/CSS/CSSFontFaceRule.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
CSSFontFaceRule::CSSFontFaceRule(FontFace&& font_face)
|
||||
: m_font_face(move(font_face))
|
||||
CSSFontFaceRule* CSSFontFaceRule::create(Bindings::WindowObject& window_object, FontFace&& font_face)
|
||||
{
|
||||
return window_object.heap().allocate<CSSFontFaceRule>(window_object.realm(), window_object, move(font_face));
|
||||
}
|
||||
|
||||
CSSFontFaceRule::CSSFontFaceRule(Bindings::WindowObject& window_object, FontFace&& font_face)
|
||||
: CSSRule(window_object)
|
||||
, m_font_face(move(font_face))
|
||||
{
|
||||
set_prototype(&window_object.ensure_web_prototype<Bindings::CSSFontFaceRulePrototype>("CSSFontFaceRule"));
|
||||
}
|
||||
|
||||
CSSStyleDeclaration* CSSFontFaceRule::style()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue