|
@@ -131,14 +131,14 @@ JS::GCPtr<DOM::Element> SVGUseElement::referenced_element()
|
|
|
}
|
|
|
|
|
|
// https://svgwg.org/svg2-draft/struct.html#UseShadowTree
|
|
|
-void SVGUseElement::clone_element_tree_as_our_shadow_tree(Element* to_clone) const
|
|
|
+void SVGUseElement::clone_element_tree_as_our_shadow_tree(Element* to_clone)
|
|
|
{
|
|
|
- const_cast<DOM::ShadowRoot&>(*shadow_root()).remove_all_children();
|
|
|
+ shadow_root()->remove_all_children();
|
|
|
|
|
|
if (to_clone && is_valid_reference_element(*to_clone)) {
|
|
|
// The ‘use’ element references another element, a copy of which is rendered in place of the ‘use’ in the document.
|
|
|
auto cloned_reference_node = MUST(to_clone->clone_node(nullptr, true));
|
|
|
- const_cast<DOM::ShadowRoot&>(*shadow_root()).append_child(cloned_reference_node).release_value_but_fixme_should_propagate_errors();
|
|
|
+ shadow_root()->append_child(cloned_reference_node).release_value_but_fixme_should_propagate_errors();
|
|
|
}
|
|
|
}
|
|
|
|