Coverage Report

Created: 2025-09-05 06:52

/src/serenity/Userland/Libraries/LibWeb/HTML/HTMLTableRowElement.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
3
 *
4
 * SPDX-License-Identifier: BSD-2-Clause
5
 */
6
7
#pragma once
8
9
#include <LibWeb/ARIA/Roles.h>
10
#include <LibWeb/HTML/HTMLElement.h>
11
12
namespace Web::HTML {
13
14
class HTMLTableRowElement final : public HTMLElement {
15
    WEB_PLATFORM_OBJECT(HTMLTableRowElement, HTMLElement);
16
    JS_DECLARE_ALLOCATOR(HTMLTableRowElement);
17
18
public:
19
    virtual ~HTMLTableRowElement() override;
20
21
    JS::NonnullGCPtr<DOM::HTMLCollection> cells() const;
22
23
    int row_index() const;
24
    int section_row_index() const;
25
    WebIDL::ExceptionOr<JS::NonnullGCPtr<HTMLTableCellElement>> insert_cell(i32 index);
26
    WebIDL::ExceptionOr<void> delete_cell(i32 index);
27
28
    // https://www.w3.org/TR/html-aria/#el-tr
29
0
    virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::row; }
30
31
private:
32
    HTMLTableRowElement(DOM::Document&, DOM::QualifiedName);
33
34
0
    virtual bool is_html_table_row_element() const override { return true; }
35
36
    virtual void initialize(JS::Realm&) override;
37
    virtual void visit_edges(Cell::Visitor&) override;
38
    virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
39
40
    JS::GCPtr<DOM::HTMLCollection> mutable m_cells;
41
};
42
43
}
44
45
namespace Web::DOM {
46
template<>
47
0
inline bool Node::fast_is<HTML::HTMLTableRowElement>() const { return is_html_table_row_element(); }
48
}