SVGSymbolElement.h 976 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) 2023, Preston Taylor <95388976+PrestonLTaylor@users.noreply.github.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/SVG/SVGGraphicsElement.h>
  8. namespace Web::SVG {
  9. class SVGSymbolElement final : public SVGGraphicsElement {
  10. WEB_PLATFORM_OBJECT(SVGSymbolElement, SVGGraphicsElement);
  11. public:
  12. virtual ~SVGSymbolElement() override = default;
  13. void apply_presentational_hints(CSS::StyleProperties& style) const override;
  14. Optional<ViewBox> view_box() const { return m_view_box; }
  15. private:
  16. SVGSymbolElement(DOM::Document&, DOM::QualifiedName);
  17. virtual void initialize(JS::Realm&) override;
  18. virtual JS::GCPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
  19. bool is_direct_child_of_use_shadow_tree() const;
  20. virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override;
  21. Optional<ViewBox> m_view_box;
  22. };
  23. }