1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

LibWeb: Split BorderStyleValue out of StyleValue.{h,cpp}

This commit is contained in:
Sam Atkins 2023-03-23 20:56:30 +00:00 committed by Linus Groh
parent 9d5296889f
commit 1c03bc7a6f
8 changed files with 84 additions and 42 deletions

View file

@ -0,0 +1,30 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org>
* Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org>
* Copyright (c) 2022-2023, MacDue <macdue@dueutil.tech>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "BorderStyleValue.h"
namespace Web::CSS {
BorderStyleValue::BorderStyleValue(
ValueComparingNonnullRefPtr<StyleValue> border_width,
ValueComparingNonnullRefPtr<StyleValue> border_style,
ValueComparingNonnullRefPtr<StyleValue> border_color)
: StyleValueWithDefaultOperators(Type::Border)
, m_properties { .border_width = move(border_width), .border_style = move(border_style), .border_color = move(border_color) }
{
}
BorderStyleValue::~BorderStyleValue() = default;
ErrorOr<String> BorderStyleValue::to_string() const
{
return String::formatted("{} {} {}", TRY(m_properties.border_width->to_string()), TRY(m_properties.border_style->to_string()), TRY(m_properties.border_color->to_string()));
}
}