/src/serenity/Userland/Libraries/LibWeb/HTML/HTMLFieldSetElement.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright (c) 2020, the SerenityOS developers. |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #pragma once |
8 | | |
9 | | #include <LibWeb/ARIA/Roles.h> |
10 | | #include <LibWeb/DOM/HTMLCollection.h> |
11 | | #include <LibWeb/HTML/FormAssociatedElement.h> |
12 | | #include <LibWeb/HTML/HTMLElement.h> |
13 | | |
14 | | namespace Web::HTML { |
15 | | |
16 | | class HTMLFieldSetElement final |
17 | | : public HTMLElement |
18 | | , public FormAssociatedElement { |
19 | | WEB_PLATFORM_OBJECT(HTMLFieldSetElement, HTMLElement); |
20 | | JS_DECLARE_ALLOCATOR(HTMLFieldSetElement); |
21 | | FORM_ASSOCIATED_ELEMENT(HTMLElement, HTMLFieldSetElement) |
22 | | |
23 | | public: |
24 | | virtual ~HTMLFieldSetElement() override; |
25 | | |
26 | | String const& type() const |
27 | 0 | { |
28 | 0 | static String const fieldset = "fieldset"_string; |
29 | 0 | return fieldset; |
30 | 0 | } |
31 | | |
32 | | bool is_disabled() const; |
33 | | |
34 | | JS::GCPtr<DOM::HTMLCollection> const& elements(); |
35 | | |
36 | | // ^FormAssociatedElement |
37 | | // https://html.spec.whatwg.org/multipage/forms.html#category-listed |
38 | 0 | virtual bool is_listed() const override { return true; } |
39 | | |
40 | | // https://html.spec.whatwg.org/multipage/forms.html#category-autocapitalize |
41 | 0 | virtual bool is_auto_capitalize_inheriting() const override { return true; } |
42 | | |
43 | 0 | virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::group; } |
44 | | |
45 | | private: |
46 | | HTMLFieldSetElement(DOM::Document&, DOM::QualifiedName); |
47 | | |
48 | | virtual void initialize(JS::Realm&) override; |
49 | | virtual void visit_edges(Cell::Visitor&) override; |
50 | | |
51 | | JS::GCPtr<DOM::HTMLCollection> m_elements; |
52 | | }; |
53 | | |
54 | | } |