ladybird/Libraries/LibWeb/CSS/CSSImageValue.h
Sam Atkins feafaf09fc
Some checks are pending
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
LibWeb/CSS: Support converting CSSImageValue to a StyleValue
No known WPT improvements. CSSImageValue is a black box which we
implement the same as CSSStyleValue, so this may not be observably
different.
2025-10-04 22:57:00 +02:00

32 lines
927 B
C++

/*
* 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:
[[nodiscard]] static GC::Ref<CSSImageValue> create(JS::Realm&, NonnullRefPtr<StyleValue const> source_value);
virtual ~CSSImageValue() override = default;
virtual WebIDL::ExceptionOr<String> to_string() const override;
virtual WebIDL::ExceptionOr<NonnullRefPtr<StyleValue const>> create_an_internal_representation(PropertyNameAndID const&) const override;
private:
explicit CSSImageValue(JS::Realm&, NonnullRefPtr<StyleValue const> source_value);
virtual void initialize(JS::Realm&) override;
};
}