1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:27:43 +00:00

LibWeb: Make CSSStyleDeclaration GC-allocated

This commit is contained in:
Andreas Kling 2022-08-07 16:21:26 +02:00
parent 12042f0757
commit 72bacba97b
18 changed files with 146 additions and 129 deletions

View file

@ -11,11 +11,11 @@
namespace Web::CSS {
class ResolvedCSSStyleDeclaration final : public CSSStyleDeclaration {
JS_OBJECT(ResolvedCSSStyleDeclaration, CSSStyleDeclaration);
public:
static NonnullRefPtr<ResolvedCSSStyleDeclaration> create(DOM::Element& element)
{
return adopt_ref(*new ResolvedCSSStyleDeclaration(element));
}
static ResolvedCSSStyleDeclaration* create(DOM::Element& element);
explicit ResolvedCSSStyleDeclaration(DOM::Element&);
virtual ~ResolvedCSSStyleDeclaration() override = default;
@ -28,8 +28,6 @@ public:
virtual String serialized() const override;
private:
explicit ResolvedCSSStyleDeclaration(DOM::Element&);
RefPtr<StyleValue> style_value_for_property(Layout::NodeWithStyle const&, PropertyID) const;
NonnullRefPtr<DOM::Element> m_element;