LibWeb: Use GCPtr for Element::layout_node

This improves debuggability by converting a SIGSEGV into a
verification failed on a null dereference.
This commit is contained in:
Shannon Booth 2024-05-02 22:32:44 +12:00 committed by Andreas Kling
parent 67f659bb85
commit aede010096
Notes: sideshowbarker 2024-07-16 20:21:48 +09:00
5 changed files with 9 additions and 9 deletions

View file

@ -48,7 +48,7 @@ void SVGCircleElement::apply_presentational_hints(CSS::StyleProperties& style) c
Gfx::Path SVGCircleElement::get_path(CSSPixelSize viewport_size)
{
auto* node = layout_node();
auto node = layout_node();
auto cx = float(node->computed_values().cx().to_px(*node, viewport_size.width()));
auto cy = float(node->computed_values().cy().to_px(*node, viewport_size.height()));
// Percentages refer to the normalized diagonal of the current SVG viewport