mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-03 17:02:56 +00:00
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:
parent
67f659bb85
commit
aede010096
Notes:
sideshowbarker
2024-07-16 20:21:48 +09:00
Author: https://github.com/shannonbooth
Commit: aede010096
Pull-request: https://github.com/SerenityOS/serenity/pull/24187
5 changed files with 9 additions and 9 deletions
|
@ -238,7 +238,7 @@ Optional<float> SVGGraphicsElement::stroke_width() const
|
|||
CSSPixels viewport_width = 0;
|
||||
CSSPixels viewport_height = 0;
|
||||
if (auto* svg_svg_element = shadow_including_first_ancestor_of_type<SVGSVGElement>()) {
|
||||
if (auto* svg_svg_layout_node = svg_svg_element->layout_node()) {
|
||||
if (auto svg_svg_layout_node = svg_svg_element->layout_node()) {
|
||||
viewport_width = svg_svg_layout_node->computed_values().width().to_px(*svg_svg_layout_node, 0);
|
||||
viewport_height = svg_svg_layout_node->computed_values().height().to_px(*svg_svg_layout_node, 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue