Coverage Report

Created: 2026-02-14 08:01

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/serenity/Userland/Libraries/LibWeb/Layout/FormAssociatedLabelableNode.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2022, sin-ack <sin-ack@protonmail.com>
3
 *
4
 * SPDX-License-Identifier: BSD-2-Clause
5
 */
6
7
#pragma once
8
9
#include <LibWeb/Forward.h>
10
#include <LibWeb/HTML/FormAssociatedElement.h>
11
#include <LibWeb/HTML/HTMLElement.h>
12
#include <LibWeb/Layout/LabelableNode.h>
13
14
namespace Web::Layout {
15
16
class FormAssociatedLabelableNode : public LabelableNode {
17
    JS_CELL(FormAssociatedLabelableNode, LabelableNode);
18
19
public:
20
0
    const HTML::FormAssociatedElement& dom_node() const { return dynamic_cast<const HTML::FormAssociatedElement&>(LabelableNode::dom_node()); }
21
0
    HTML::FormAssociatedElement& dom_node() { return dynamic_cast<HTML::FormAssociatedElement&>(LabelableNode::dom_node()); }
22
23
protected:
24
    FormAssociatedLabelableNode(DOM::Document& document, HTML::FormAssociatedElement& element, NonnullRefPtr<CSS::StyleProperties> style)
25
0
        : LabelableNode(document, element.form_associated_element_to_html_element(), move(style))
26
0
    {
27
0
    }
28
29
    virtual ~FormAssociatedLabelableNode() = default;
30
};
31
32
}