summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Page
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-01-11 12:51:49 +0100
committerAndreas Kling <kling@serenityos.org>2023-01-11 12:55:00 +0100
commit4d401bf7968d36769ba096c13cc0616855812a17 (patch)
treeeb558b69186572e892068b154abc9ce546923d95 /Userland/Libraries/LibWeb/Page
parent35ba13802d181d7dffd25733476256bf7807ccb0 (diff)
downloadserenity-4d401bf7968d36769ba096c13cc0616855812a17.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/Page')
-rw-r--r--Userland/Libraries/LibWeb/Page/EventHandler.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibWeb/Page/EventHandler.cpp b/Userland/Libraries/LibWeb/Page/EventHandler.cpp
index e196773ed0..c493602cb1 100644
--- a/Userland/Libraries/LibWeb/Page/EventHandler.cpp
+++ b/Userland/Libraries/LibWeb/Page/EventHandler.cpp
@@ -160,7 +160,7 @@ bool EventHandler::handle_mousewheel(CSSPixelPoint position, unsigned button, un
bool handled_event = false;
- RefPtr<Painting::Paintable> paintable;
+ JS::GCPtr<Painting::Paintable> paintable;
if (m_mouse_event_tracking_layout_node) {
paintable = m_mouse_event_tracking_layout_node->paintable();
} else {
@@ -208,7 +208,7 @@ bool EventHandler::handle_mouseup(CSSPixelPoint position, unsigned button, unsig
bool handled_event = false;
- RefPtr<Painting::Paintable> paintable;
+ JS::GCPtr<Painting::Paintable> paintable;
if (m_mouse_event_tracking_layout_node) {
paintable = m_mouse_event_tracking_layout_node->paintable();
} else {
@@ -327,7 +327,7 @@ bool EventHandler::handle_mousedown(CSSPixelPoint position, unsigned button, uns
JS::GCPtr<DOM::Node> node;
{
- RefPtr<Painting::Paintable> paintable;
+ JS::GCPtr<Painting::Paintable> paintable;
if (m_mouse_event_tracking_layout_node) {
paintable = m_mouse_event_tracking_layout_node->paintable();
} else {
@@ -422,7 +422,7 @@ bool EventHandler::handle_mousemove(CSSPixelPoint position, unsigned buttons, un
bool is_hovering_link = false;
Gfx::StandardCursor hovered_node_cursor = Gfx::StandardCursor::None;
- RefPtr<Painting::Paintable> paintable;
+ JS::GCPtr<Painting::Paintable> paintable;
Optional<int> start_index;
if (m_mouse_event_tracking_layout_node) {
paintable = m_mouse_event_tracking_layout_node->paintable();
@@ -530,7 +530,7 @@ bool EventHandler::handle_doubleclick(CSSPixelPoint position, unsigned button, u
if (!paint_root())
return false;
- RefPtr<Painting::Paintable> paintable;
+ JS::GCPtr<Painting::Paintable> paintable;
if (m_mouse_event_tracking_layout_node) {
paintable = m_mouse_event_tracking_layout_node->paintable();
} else {