/* * Copyright (c) 2023, Aliaksandr Kalenik * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include namespace Web::CSS { class PlaceSelfStyleValue final : public StyleValueWithDefaultOperators { public: static ValueComparingNonnullRefPtr create(ValueComparingNonnullRefPtr align_self, ValueComparingNonnullRefPtr justify_self) { return adopt_ref(*new (nothrow) PlaceSelfStyleValue(move(align_self), move(justify_self))); } virtual ~PlaceSelfStyleValue() override = default; ValueComparingNonnullRefPtr align_self() const { return m_properties.align_self; } ValueComparingNonnullRefPtr justify_self() const { return m_properties.justify_self; } virtual String to_string() const override; bool properties_equal(PlaceSelfStyleValue const& other) const { return m_properties == other.m_properties; } private: PlaceSelfStyleValue(ValueComparingNonnullRefPtr align_self, ValueComparingNonnullRefPtr justify_self) : StyleValueWithDefaultOperators(Type::PlaceSelf) , m_properties { .align_self = move(align_self), .justify_self = move(justify_self) } { } struct Properties { ValueComparingNonnullRefPtr align_self; ValueComparingNonnullRefPtr justify_self; bool operator==(Properties const&) const = default; } m_properties; }; }