Coverage Report

Created: 2026-02-16 07:47

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/serenity/Userland/Libraries/LibWeb/CSS/StyleValues/RectStyleValue.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
3
 * Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org>
4
 * Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org>
5
 * Copyright (c) 2022-2023, MacDue <macdue@dueutil.tech>
6
 *
7
 * SPDX-License-Identifier: BSD-2-Clause
8
 */
9
10
#pragma once
11
12
#include <LibWeb/CSS/CSSStyleValue.h>
13
#include <LibWeb/CSS/EdgeRect.h>
14
15
namespace Web::CSS {
16
17
class RectStyleValue : public StyleValueWithDefaultOperators<RectStyleValue> {
18
public:
19
    static ValueComparingNonnullRefPtr<RectStyleValue> create(EdgeRect rect);
20
0
    virtual ~RectStyleValue() override = default;
21
22
0
    EdgeRect rect() const { return m_rect; }
23
    virtual String to_string() const override;
24
25
0
    bool properties_equal(RectStyleValue const& other) const { return m_rect == other.m_rect; }
26
27
private:
28
    explicit RectStyleValue(EdgeRect rect)
29
0
        : StyleValueWithDefaultOperators(Type::Rect)
30
0
        , m_rect(move(rect))
31
0
    {
32
0
    }
33
34
    EdgeRect m_rect;
35
};
36
37
}