mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-23 08:30:50 +00:00
Tree counting functions should be resolved at style computation time - to do this we will need to know the element's sibling count and index. This commit computes that information and propagates it to the various `StyleValue::to_computed_value` methods.
23 lines
474 B
C++
23 lines
474 B
C++
/*
|
|
* Copyright (c) 2025, Callum Law <callumlaw1709@outlook.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibWeb/CSS/Length.h>
|
|
|
|
namespace Web::CSS {
|
|
|
|
struct TreeCountingFunctionResolutionContext {
|
|
size_t sibling_count;
|
|
size_t sibling_index;
|
|
};
|
|
|
|
struct ComputationContext {
|
|
Length::ResolutionContext length_resolution_context;
|
|
Optional<TreeCountingFunctionResolutionContext> tree_counting_function_resolution_context {};
|
|
};
|
|
|
|
}
|