#pragma once
#include "CSSPrimitiveValue.h"
#include <wtf/text/WTFString.h>
namespace WebCore {
class Counter final : public RefCounted<Counter> {
public:
static Ref<Counter> create(Ref<CSSPrimitiveValue>&& identifier, Ref<CSSPrimitiveValue>&& listStyle, Ref<CSSPrimitiveValue>&& separator)
{
return adoptRef(*new Counter(WTFMove(identifier), WTFMove(listStyle), WTFMove(separator)));
}
String identifier() const { return m_identifier->stringValue(); }
String listStyle() const { return m_listStyle->stringValue(); }
String separator() const { return m_separator->stringValue(); }
const CSSPrimitiveValue& identifierValue() const { return m_identifier; }
const CSSPrimitiveValue& listStyleValue() const { return m_listStyle; }
const CSSPrimitiveValue& separatorValue() const { return m_separator; }
CSSValueID listStyleIdent() const { return m_listStyle->valueID(); }
void setIdentifier(Ref<CSSPrimitiveValue>&& identifier) { m_identifier = WTFMove(identifier); }
void setListStyle(Ref<CSSPrimitiveValue>&& listStyle) { m_listStyle = WTFMove(listStyle); }
void setSeparator(Ref<CSSPrimitiveValue>&& separator) { m_separator = WTFMove(separator); }
bool equals(const Counter& other) const
{
return identifier() == other.identifier()
&& listStyle() == other.listStyle()
&& separator() == other.separator();
}
private:
Counter(Ref<CSSPrimitiveValue>&& identifier, Ref<CSSPrimitiveValue>&& listStyle, Ref<CSSPrimitiveValue>&& separator)
: m_identifier(WTFMove(identifier))
, m_listStyle(WTFMove(listStyle))
, m_separator(WTFMove(separator))
{
}
Ref<CSSPrimitiveValue> m_identifier; Ref<CSSPrimitiveValue> m_listStyle; Ref<CSSPrimitiveValue> m_separator; };
}