summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM
diff options
context:
space:
mode:
authorMatthew Olsson <matthewcolsson@gmail.com>2023-03-21 10:08:44 -0700
committerAndreas Kling <kling@serenityos.org>2023-04-30 06:04:33 +0200
commit39d8c8d2a9cd600b8baf55862b0431bd08c4b299 (patch)
tree0cac645a30e19cd7c457a98122102a72994b9733 /Userland/Libraries/LibWeb/DOM
parenta3344cab63e7441b9a166521d6ad7889e70083e7 (diff)
downloadserenity-39d8c8d2a9cd600b8baf55862b0431bd08c4b299.zip
LibJS+LibWeb: Add missing visit calls in visit_edges implementations
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM')
-rw-r--r--Userland/Libraries/LibWeb/DOM/AccessibilityTreeNode.cpp6
-rw-r--r--Userland/Libraries/LibWeb/DOM/Document.cpp33
2 files changed, 20 insertions, 19 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/AccessibilityTreeNode.cpp b/Userland/Libraries/LibWeb/DOM/AccessibilityTreeNode.cpp
index f9afa51b06..263d67b94c 100644
--- a/Userland/Libraries/LibWeb/DOM/AccessibilityTreeNode.cpp
+++ b/Userland/Libraries/LibWeb/DOM/AccessibilityTreeNode.cpp
@@ -74,9 +74,9 @@ void AccessibilityTreeNode::serialize_tree_as_json(JsonObjectSerializer<StringBu
void AccessibilityTreeNode::visit_edges(Visitor& visitor)
{
Base::visit_edges(visitor);
- visitor.visit(value());
- for (auto child : children())
- child->visit_edges(visitor);
+ visitor.visit(m_value);
+ for (auto const& child : m_children)
+ visitor.visit(child);
}
}
diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp
index 0aa1394a3e..726ed53c1c 100644
--- a/Userland/Libraries/LibWeb/DOM/Document.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Document.cpp
@@ -334,19 +334,20 @@ JS::ThrowCompletionOr<void> Document::initialize(JS::Realm& realm)
void Document::visit_edges(Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
- visitor.visit(m_window.ptr());
- visitor.visit(m_style_sheets.ptr());
- visitor.visit(m_hovered_node.ptr());
- visitor.visit(m_inspected_node.ptr());
- visitor.visit(m_active_favicon.ptr());
- visitor.visit(m_focused_element.ptr());
- visitor.visit(m_active_element.ptr());
- visitor.visit(m_implementation.ptr());
- visitor.visit(m_current_script.ptr());
- visitor.visit(m_associated_inert_template_document.ptr());
+ visitor.visit(m_window);
+ visitor.visit(m_layout_root);
+ visitor.visit(m_style_sheets);
+ visitor.visit(m_hovered_node);
+ visitor.visit(m_inspected_node);
+ visitor.visit(m_active_favicon);
+ visitor.visit(m_focused_element);
+ visitor.visit(m_active_element);
+ visitor.visit(m_implementation);
+ visitor.visit(m_current_script);
+ visitor.visit(m_associated_inert_template_document);
visitor.visit(m_appropriate_template_contents_owner_document);
- visitor.visit(m_pending_parsing_blocking_script.ptr());
- visitor.visit(m_history.ptr());
+ visitor.visit(m_pending_parsing_blocking_script);
+ visitor.visit(m_history);
visitor.visit(m_browsing_context);
@@ -363,17 +364,17 @@ void Document::visit_edges(Cell::Visitor& visitor)
visitor.visit(m_parser);
for (auto& script : m_scripts_to_execute_when_parsing_has_finished)
- visitor.visit(script.ptr());
+ visitor.visit(script);
for (auto& script : m_scripts_to_execute_as_soon_as_possible)
- visitor.visit(script.ptr());
+ visitor.visit(script);
for (auto& node_iterator : m_node_iterators)
visitor.visit(node_iterator);
for (auto& target : m_pending_scroll_event_targets)
- visitor.visit(target.ptr());
+ visitor.visit(target);
for (auto& target : m_pending_scrollend_event_targets)
- visitor.visit(target.ptr());
+ visitor.visit(target);
}
// https://w3c.github.io/selection-api/#dom-document-getselection