ladybird/Libraries/LibWeb/CSS/StyleValues/ComputationContext.h
Sam Atkins 92897a1dec LibWeb/CSS: Absolutize color KeywordStyleValues
These get computed to an equivalent RGBColorStyleValue.

To support this, we now store the computed color-scheme on the
ComputationContext when computing properties that might contain a color.

This has a nice bonus of correcting the css-accent-color test's result.
2026-02-05 13:48:10 +00:00

21 lines
466 B
C++

/*
* Copyright (c) 2025, Callum Law <callumlaw1709@outlook.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/CSS/Length.h>
#include <LibWeb/CSS/PreferredColorScheme.h>
#include <LibWeb/DOM/AbstractElement.h>
namespace Web::CSS {
struct ComputationContext {
Length::ResolutionContext length_resolution_context;
Optional<DOM::AbstractElement> abstract_element {};
Optional<PreferredColorScheme> color_scheme {};
};
}