SVGSymbolElement.h 896 B

1234567891011121314151617181920212223242526272829303132333435
  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 JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
  18. bool is_direct_child_of_use_shadow_tree() const;
  19. virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override;
  20. Optional<ViewBox> m_view_box;
  21. };
  22. }