2026-02-04 12:24:04 +13:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2026, Callum Law <callumlaw1709@outlook.com>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "CounterStyleStyleValue.h"
|
2026-02-08 21:13:02 +13:00
|
|
|
#include <LibWeb/CSS/CounterStyle.h>
|
2026-02-04 12:24:04 +13:00
|
|
|
#include <LibWeb/CSS/Enums.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::CSS {
|
|
|
|
|
|
|
|
|
|
void CounterStyleStyleValue::serialize(StringBuilder& builder, SerializationMode) const
|
|
|
|
|
{
|
|
|
|
|
builder.append(m_name);
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-27 13:11:38 +13:00
|
|
|
RefPtr<CounterStyle const> CounterStyleStyleValue::resolve_counter_style(HashMap<FlyString, NonnullRefPtr<CounterStyle const>> const& registered_counter_styles) const
|
2026-02-08 21:13:02 +13:00
|
|
|
{
|
|
|
|
|
// FIXME: Support symbols() function for anonymous counter style
|
2026-02-27 13:11:38 +13:00
|
|
|
return registered_counter_styles.get(m_name).value_or(nullptr);
|
2026-02-08 21:13:02 +13:00
|
|
|
}
|
|
|
|
|
|
2026-02-04 12:24:04 +13:00
|
|
|
}
|