summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Painting
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting')
-rw-r--r--Userland/Libraries/LibWeb/Painting/Paintable.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Painting/Paintable.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/Paintable.cpp b/Userland/Libraries/LibWeb/Painting/Paintable.cpp
index 61ce2b96c9..59ececf2f8 100644
--- a/Userland/Libraries/LibWeb/Painting/Paintable.cpp
+++ b/Userland/Libraries/LibWeb/Painting/Paintable.cpp
@@ -14,6 +14,8 @@ void Paintable::visit_edges(Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
visitor.visit(m_layout_node);
+ if (m_containing_block.has_value())
+ visitor.visit(m_containing_block.value());
}
Paintable::DispatchEventOfSameName Paintable::handle_mousedown(Badge<EventHandler>, CSSPixelPoint, unsigned, unsigned)
diff --git a/Userland/Libraries/LibWeb/Painting/Paintable.h b/Userland/Libraries/LibWeb/Painting/Paintable.h
index 9214208313..026b77d27d 100644
--- a/Userland/Libraries/LibWeb/Painting/Paintable.h
+++ b/Userland/Libraries/LibWeb/Painting/Paintable.h
@@ -141,7 +141,7 @@ protected:
private:
JS::NonnullGCPtr<Layout::Node> m_layout_node;
- Optional<Layout::BlockContainer*> mutable m_containing_block;
+ Optional<JS::GCPtr<Layout::BlockContainer>> mutable m_containing_block;
};
inline DOM::Node* HitTestResult::dom_node()