mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:37:46 +00:00
LibWeb: Make Paintable visit its cached containing block pointer
This was *probably* already safe, but there's no harm in making sure the cached pointer gets marked during GC.
This commit is contained in:
parent
6b4062ab61
commit
811b8a25c2
2 changed files with 3 additions and 1 deletions
|
@ -14,6 +14,8 @@ void Paintable::visit_edges(Cell::Visitor& visitor)
|
||||||
{
|
{
|
||||||
Base::visit_edges(visitor);
|
Base::visit_edges(visitor);
|
||||||
visitor.visit(m_layout_node);
|
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)
|
Paintable::DispatchEventOfSameName Paintable::handle_mousedown(Badge<EventHandler>, CSSPixelPoint, unsigned, unsigned)
|
||||||
|
|
|
@ -141,7 +141,7 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
JS::NonnullGCPtr<Layout::Node> m_layout_node;
|
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()
|
inline DOM::Node* HitTestResult::dom_node()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue