mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:57:46 +00:00
LibWeb: Make the paint tree GC-allocated
This simplifies the ownership model between DOM/layout/paint nodes immensely by deferring to the garbage collector for figuring out what's live and what's not.
This commit is contained in:
parent
35ba13802d
commit
4d401bf796
64 changed files with 148 additions and 108 deletions
|
@ -51,9 +51,9 @@ public:
|
|||
|
||||
Painting::Paintable* paintable() { return m_paintable; }
|
||||
Painting::Paintable const* paintable() const { return m_paintable; }
|
||||
void set_paintable(RefPtr<Painting::Paintable>);
|
||||
void set_paintable(JS::GCPtr<Painting::Paintable>);
|
||||
|
||||
virtual RefPtr<Painting::Paintable> create_paintable() const;
|
||||
virtual JS::GCPtr<Painting::Paintable> create_paintable() const;
|
||||
|
||||
DOM::Document& document();
|
||||
DOM::Document const& document() const;
|
||||
|
@ -150,7 +150,7 @@ private:
|
|||
friend class NodeWithStyle;
|
||||
|
||||
JS::NonnullGCPtr<DOM::Node> m_dom_node;
|
||||
RefPtr<Painting::Paintable> m_paintable;
|
||||
JS::GCPtr<Painting::Paintable> m_paintable;
|
||||
|
||||
JS::NonnullGCPtr<HTML::BrowsingContext> m_browsing_context;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue