ladybird/Userland/Libraries/LibWeb/CSS/Clip.cpp
Sam Atkins bcebca62d3 LibWeb: Move CSS::EdgeRect into its own files
Also remove the unused StyleValue::to_rect() because an EdgeRect is only
ever held by a RectStyleValue.
2023-03-30 21:29:50 +02:00

29 lines
484 B
C++

/*
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "Clip.h"
namespace Web::CSS {
Clip::Clip(Type type, EdgeRect edge_rect)
: m_type(type)
, m_edge_rect(edge_rect)
{
}
Clip::Clip(EdgeRect edge_rect)
: m_type(Type::Rect)
, m_edge_rect(edge_rect)
{
}
Clip Clip::make_auto()
{
return Clip(Type::Auto, EdgeRect { Length::make_auto(), Length::make_auto(), Length::make_auto(), Length::make_auto() });
}
}