Coverage Report

Created: 2026-06-07 07:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/serenity/Userland/Libraries/LibWeb/CSS/Clip.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2022, the SerenityOS developers.
3
 *
4
 * SPDX-License-Identifier: BSD-2-Clause
5
 */
6
7
#pragma once
8
9
#include <LibWeb/CSS/EdgeRect.h>
10
11
namespace Web::CSS {
12
13
class Clip {
14
public:
15
    enum class Type {
16
        Auto,
17
        Rect
18
    };
19
20
    Clip(Type type, EdgeRect edge_rect);
21
    Clip(EdgeRect edge_rect);
22
23
    static Clip make_auto();
24
25
0
    bool is_auto() const { return m_type == Type::Auto; }
26
0
    bool is_rect() const { return m_type == Type::Rect; }
27
28
0
    EdgeRect to_rect() const { return m_edge_rect; }
29
30
private:
31
    Type m_type;
32
    EdgeRect m_edge_rect;
33
};
34
35
}