/src/serenity/Userland/Libraries/LibWeb/SVG/SVGStyleElement.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright (c) 2023, Preston Taylor <PrestonLeeTaylor@proton.me> |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #pragma once |
8 | | |
9 | | #include <LibWeb/DOM/StyleElementUtils.h> |
10 | | #include <LibWeb/SVG/SVGElement.h> |
11 | | |
12 | | namespace Web::SVG { |
13 | | |
14 | | class SVGStyleElement final : public SVGElement { |
15 | | WEB_PLATFORM_OBJECT(SVGStyleElement, SVGElement); |
16 | | JS_DECLARE_ALLOCATOR(SVGStyleElement); |
17 | | |
18 | | public: |
19 | | virtual ~SVGStyleElement() override; |
20 | | |
21 | | virtual void children_changed() override; |
22 | | virtual void inserted() override; |
23 | | virtual void removed_from(Node*) override; |
24 | | |
25 | | CSS::CSSStyleSheet* sheet(); |
26 | | CSS::CSSStyleSheet const* sheet() const; |
27 | | |
28 | | private: |
29 | | SVGStyleElement(DOM::Document&, DOM::QualifiedName); |
30 | | |
31 | | // ^DOM::Node |
32 | 0 | virtual bool is_svg_style_element() const override { return true; } |
33 | | |
34 | | virtual void initialize(JS::Realm&) override; |
35 | | virtual void visit_edges(Cell::Visitor&) override; |
36 | | |
37 | | // The semantics and processing of a ‘style’ and its attributes must be the same as is defined for the HTML ‘style’ element. |
38 | | DOM::StyleElementUtils m_style_element_utils; |
39 | | }; |
40 | | |
41 | | } |