mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:17:35 +00:00
LibWeb: Implement the <use>
SVG element
The SVG <use> element is used to be able to reuse other SVG graphics without having to re-write the svg element. We now support this feature! :^)
This commit is contained in:
parent
b322abd8d0
commit
c7c3043aa2
10 changed files with 323 additions and 1 deletions
|
@ -16,6 +16,12 @@ class SVGElement : public DOM::Element {
|
|||
public:
|
||||
virtual bool requires_svg_container() const override { return true; }
|
||||
|
||||
virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override;
|
||||
|
||||
virtual void children_changed() override;
|
||||
virtual void inserted() override;
|
||||
virtual void removed_from(Node*) override;
|
||||
|
||||
HTML::DOMStringMap* dataset() { return m_dataset.ptr(); }
|
||||
HTML::DOMStringMap const* dataset() const { return m_dataset.ptr(); }
|
||||
|
||||
|
@ -25,6 +31,9 @@ protected:
|
|||
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
void update_use_elements_that_reference_this();
|
||||
void remove_from_use_element_that_reference_this();
|
||||
|
||||
JS::GCPtr<HTML::DOMStringMap> m_dataset;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue