LibWeb/CSS: Implement CSSImageValue and reify images as it

This is specced to be opaque, so there's not much to it.
This commit is contained in:
Sam Atkins 2025-09-12 15:07:19 +01:00
commit 5904694844
Notes: github-actions[bot] 2025-09-15 07:48:05 +00:00
10 changed files with 109 additions and 4 deletions

View file

@ -0,0 +1,19 @@
/*
* Copyright (c) 2025, Sam Atkins <sam@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "AbstractImageStyleValue.h"
#include <LibWeb/CSS/CSSImageValue.h>
namespace Web::CSS {
// https://drafts.css-houdini.org/css-typed-om-1/#reify-stylevalue
GC::Ref<CSSStyleValue> AbstractImageStyleValue::reify(JS::Realm& realm, String const&) const
{
// AD-HOC: There's no spec description of how to reify as a CSSImageValue.
return CSSImageValue::create(realm, to_string(SerializationMode::Normal));
}
}