diff --git a/Userland/Libraries/LibWeb/SVG/SVGElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGElement.cpp index 9164381b26d..d0d8be96b82 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGElement.cpp @@ -132,7 +132,7 @@ JS::GCPtr SVGElement::owner_svg_element() // The ownerSVGElement IDL attribute represents the nearest ancestor ‘svg’ element. // On getting ownerSVGElement, the nearest ancestor ‘svg’ element is returned; // if the current element is the outermost svg element, then null is returned. - return first_ancestor_of_type(); + return shadow_including_first_ancestor_of_type(); } JS::NonnullGCPtr SVGElement::svg_animated_length_for_property(CSS::PropertyID property) const