1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

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
5 changed files with 15 additions and 14 deletions

View file

@ -10,7 +10,7 @@
#include <LibWeb/CSS/StyleValues/IdentifierStyleValue.h>
#include <LibWeb/CSS/StyleValues/ShorthandStyleValue.h>
#include <LibWeb/DOM/ShadowRoot.h>
#include <LibWeb/Layout/Box.h>
#include <LibWeb/Layout/SVGGraphicsBox.h>
#include <LibWeb/SVG/AttributeNames.h>
#include <LibWeb/SVG/SVGSymbolElement.h>
#include <LibWeb/SVG/SVGUseElement.h>
@ -61,7 +61,7 @@ bool SVGSymbolElement::is_direct_child_of_use_shadow_tree() const
JS::GCPtr<Layout::Node> SVGSymbolElement::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));
}
}