mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-19 10:20:22 +00:00
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.
21 lines
466 B
C++
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 {};
|
|
};
|
|
|
|
}
|