2025-09-12 15:07:19 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2025, Sam Atkins <sam@ladybird.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibWeb/CSS/CSSStyleValue.h>
|
|
|
|
|
|
|
|
namespace Web::CSS {
|
|
|
|
|
|
|
|
// https://drafts.css-houdini.org/css-typed-om-1/#cssimagevalue
|
|
|
|
class CSSImageValue final : public CSSStyleValue {
|
|
|
|
WEB_PLATFORM_OBJECT(CSSImageValue, CSSStyleValue);
|
|
|
|
GC_DECLARE_ALLOCATOR(CSSImageValue);
|
|
|
|
|
|
|
|
public:
|
2025-09-19 14:54:23 +01:00
|
|
|
[[nodiscard]] static GC::Ref<CSSImageValue> create(JS::Realm&, NonnullRefPtr<StyleValue const> source_value);
|
2025-09-12 15:07:19 +01:00
|
|
|
|
|
|
|
virtual ~CSSImageValue() override = default;
|
|
|
|
|
2025-09-16 15:06:38 +01:00
|
|
|
virtual WebIDL::ExceptionOr<String> to_string() const override;
|
2025-10-02 15:08:35 +01:00
|
|
|
virtual WebIDL::ExceptionOr<NonnullRefPtr<StyleValue const>> create_an_internal_representation(PropertyNameAndID const&) const override;
|
2025-09-12 15:07:19 +01:00
|
|
|
|
|
|
|
private:
|
2025-09-19 14:54:23 +01:00
|
|
|
explicit CSSImageValue(JS::Realm&, NonnullRefPtr<StyleValue const> source_value);
|
2025-09-12 15:07:19 +01:00
|
|
|
|
|
|
|
virtual void initialize(JS::Realm&) override;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|