summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/BrowsingContext.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-08-28 13:42:07 +0200
committerAndreas Kling <kling@serenityos.org>2022-09-06 00:27:09 +0200
commit6f433c86564c24d47d520cb5bdcc2209d724ac96 (patch)
tree886a2f727782e466e99c61c628637872c1b7403f /Userland/Libraries/LibWeb/HTML/BrowsingContext.h
parentbb547ce1c4251e3689287eac845593398a379ca5 (diff)
downloadserenity-6f433c86564c24d47d520cb5bdcc2209d724ac96.zip
LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocated
This is a monster patch that turns all EventTargets into GC-allocated PlatformObjects. Their C++ wrapper classes are removed, and the LibJS garbage collector is now responsible for their lifetimes. There's a fair amount of hacks and band-aids in this patch, and we'll have a lot of cleanup to do after this.
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/BrowsingContext.h')
-rw-r--r--Userland/Libraries/LibWeb/HTML/BrowsingContext.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.h b/Userland/Libraries/LibWeb/HTML/BrowsingContext.h
index f48ef6d4f5..ddcd870ea1 100644
--- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.h
+++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.h
@@ -26,7 +26,7 @@ namespace Web::HTML {
class BrowsingContext : public TreeNode<BrowsingContext> {
public:
- static NonnullRefPtr<BrowsingContext> create_a_new_browsing_context(Page&, RefPtr<DOM::Document> creator, RefPtr<DOM::Element> embedder);
+ static NonnullRefPtr<BrowsingContext> create_a_new_browsing_context(Page&, JS::GCPtr<DOM::Document> creator, JS::GCPtr<DOM::Element> embedder);
~BrowsingContext();
@@ -41,8 +41,8 @@ public:
bool is_top_level() const;
bool is_focused_context() const;
- DOM::Document const* active_document() const { return m_active_document; }
- DOM::Document* active_document() { return m_active_document; }
+ DOM::Document const* active_document() const;
+ DOM::Document* active_document();
void set_active_document(DOM::Document*);
@@ -109,7 +109,7 @@ public:
bool has_a_rendering_opportunity() const;
- RefPtr<DOM::Node> currently_focused_area();
+ JS::GCPtr<DOM::Node> currently_focused_area();
String const& name() const { return m_name; }
void set_name(String const& name) { m_name = name; }
@@ -143,7 +143,7 @@ private:
Optional<HTML::Origin> m_creator_origin;
WeakPtr<HTML::BrowsingContextContainer> m_container;
- RefPtr<DOM::Document> m_active_document;
+ JS::Handle<DOM::Document> m_active_document;
Gfx::IntSize m_size;
Gfx::IntPoint m_viewport_scroll_offset;