Serenity Operating System
1/*
2 * Copyright (c) 2022, the SerenityOS developers.
3 *
4 * SPDX-License-Identifier: BSD-2-Clause
5 */
6
7#include "Clip.h"
8#include <LibWeb/CSS/StyleValue.h>
9
10namespace Web::CSS {
11
12Clip::Clip(Type type, EdgeRect edge_rect)
13 : m_type(type)
14 , m_edge_rect(edge_rect)
15{
16}
17
18Clip::Clip(EdgeRect edge_rect)
19 : m_type(Type::Rect)
20 , m_edge_rect(edge_rect)
21{
22}
23
24Clip Clip::make_auto()
25{
26 return Clip(Type::Auto, EdgeRect { Length::make_auto(), Length::make_auto(), Length::make_auto(), Length::make_auto() });
27}
28
29}