mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 07:39:16 +00:00
For us, that's KeywordStyleValue and CustomIdentStyleValue. CustomIdentStyleValue now has a .cpp file to reduce the number of includes in its header file.
25 lines
707 B
C++
25 lines
707 B
C++
/*
|
|
* Copyright (c) 2025, Sam Atkins <sam@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include "CustomIdentStyleValue.h"
|
|
#include <LibWeb/CSS/CSSKeywordValue.h>
|
|
#include <LibWeb/CSS/Parser/ComponentValue.h>
|
|
|
|
namespace Web::CSS {
|
|
|
|
Vector<Parser::ComponentValue> CustomIdentStyleValue::tokenize() const
|
|
{
|
|
return { Parser::Token::create_ident(m_custom_ident) };
|
|
}
|
|
|
|
// https://drafts.css-houdini.org/css-typed-om-1/#reify-ident
|
|
GC::Ref<CSSStyleValue> CustomIdentStyleValue::reify(JS::Realm& realm, String const&) const
|
|
{
|
|
// 1. Return a new CSSKeywordValue with its value internal slot set to the serialization of ident.
|
|
return CSSKeywordValue::create(realm, m_custom_ident);
|
|
}
|
|
|
|
}
|