LibWeb: Use SVGGraphicsBox for <symbol> and <use> elements

This allows various SVG properties (like masking) to be applied to these
elements.
This commit is contained in:
MacDue 2024-03-10 14:41:00 +01:00 committed by Andreas Kling
parent 05f42efc06
commit 15e3b0ebde
Notes: sideshowbarker 2024-07-17 10:16:43 +09:00
5 changed files with 15 additions and 14 deletions

View file

@ -10,6 +10,7 @@
#include <LibWeb/DOM/Event.h>
#include <LibWeb/DOM/ShadowRoot.h>
#include <LibWeb/Layout/Box.h>
#include <LibWeb/Layout/SVGGraphicsBox.h>
#include <LibWeb/Namespace.h>
#include <LibWeb/SVG/AttributeNames.h>
#include <LibWeb/SVG/SVGSVGElement.h>
@ -186,7 +187,7 @@ JS::GCPtr<SVGElement> SVGUseElement::animated_instance_root() const
JS::GCPtr<Layout::Node> SVGUseElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
{
return heap().allocate_without_realm<Layout::Box>(document(), this, move(style));
return heap().allocate_without_realm<Layout::SVGGraphicsBox>(document(), *this, move(style));
}
}