SVGStyleElement.h 1009 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) 2023, Preston Taylor <PrestonLeeTaylor@proton.me>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/DOM/StyleElementUtils.h>
  8. #include <LibWeb/SVG/SVGElement.h>
  9. namespace Web::SVG {
  10. class SVGStyleElement final : public SVGElement {
  11. WEB_PLATFORM_OBJECT(HTMLStyleElement, SVGElement);
  12. JS_DECLARE_ALLOCATOR(SVGStyleElement);
  13. public:
  14. virtual ~SVGStyleElement() override;
  15. virtual void children_changed() override;
  16. virtual void inserted() override;
  17. virtual void removed_from(Node*) override;
  18. CSS::CSSStyleSheet* sheet();
  19. CSS::CSSStyleSheet const* sheet() const;
  20. private:
  21. SVGStyleElement(DOM::Document&, DOM::QualifiedName);
  22. virtual void initialize(JS::Realm&) override;
  23. virtual void visit_edges(Cell::Visitor&) override;
  24. // The semantics and processing of a ‘style’ and its attributes must be the same as is defined for the HTML ‘style’ element.
  25. DOM::StyleElementUtils m_style_element_utils;
  26. };
  27. }