2025-09-30 09:36:05 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2025, Callum Law <callumlaw1709@outlook.com>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <LibWeb/CSS/Length.h>
|
2026-02-02 08:25:56 -03:00
|
|
|
#include <LibWeb/CSS/PreferredColorScheme.h>
|
2025-10-21 08:06:38 -03:00
|
|
|
#include <LibWeb/DOM/AbstractElement.h>
|
2025-09-30 09:36:05 -03:00
|
|
|
|
|
|
|
|
namespace Web::CSS {
|
|
|
|
|
|
|
|
|
|
struct ComputationContext {
|
|
|
|
|
Length::ResolutionContext length_resolution_context;
|
2025-10-21 08:06:38 -03:00
|
|
|
Optional<DOM::AbstractElement> abstract_element {};
|
2026-02-02 08:25:56 -03:00
|
|
|
Optional<PreferredColorScheme> color_scheme {};
|
2025-12-30 06:36:27 -03:00
|
|
|
|
|
|
|
|
void visit_edges(GC::Cell::Visitor& visitor)
|
|
|
|
|
{
|
|
|
|
|
if (abstract_element.has_value())
|
|
|
|
|
abstract_element->visit(visitor);
|
|
|
|
|
}
|
2025-09-30 09:36:05 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|