LibWeb/CSS: Add ability to reify a StyleValue

When no better reification form is available, we produce an opaque
CSSStyleValue with a serialized value. For starters, this will be the
only way to reify, and then we'll add others later.
This commit is contained in:
Sam Atkins 2025-08-13 14:46:21 +01:00
commit 276540fbe9
Notes: github-actions[bot] 2025-08-18 09:14:16 +00:00
4 changed files with 13 additions and 4 deletions

View file

@ -13,12 +13,12 @@ namespace Web::CSS {
GC_DEFINE_ALLOCATOR(CSSStyleValue);
GC::Ref<CSSStyleValue> CSSStyleValue::create(JS::Realm& realm, Optional<String> associated_property, Optional<String> constructed_from_string)
GC::Ref<CSSStyleValue> CSSStyleValue::create(JS::Realm& realm, String associated_property, String constructed_from_string)
{
return realm.create<CSSStyleValue>(realm, move(associated_property), move(constructed_from_string));
}
CSSStyleValue::CSSStyleValue(JS::Realm& realm, Optional<String> associated_property, Optional<String> constructed_from_string)
CSSStyleValue::CSSStyleValue(JS::Realm& realm, String associated_property, String constructed_from_string)
: PlatformObject(realm)
, m_associated_property(move(associated_property))
, m_constructed_from_string(move(constructed_from_string))