mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-24 08:59:50 +00:00
LibWeb: Compute and propagate tree-counting function resolution context
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.
This commit is contained in:
parent
fd31fbd84b
commit
9cd23e3ae5
Notes:
github-actions[bot]
2025-10-20 15:13:50 +00:00
Author: https://github.com/Calme1709
Commit: 9cd23e3ae5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6426
Reviewed-by: https://github.com/AtkinsSJ ✅
9 changed files with 78 additions and 12 deletions
|
|
@ -19,12 +19,14 @@ struct CalculationResolutionContext {
|
|||
|
||||
PercentageBasis percentage_basis {};
|
||||
Optional<Length::ResolutionContext> length_resolution_context {};
|
||||
Optional<TreeCountingFunctionResolutionContext> tree_counting_function_resolution_context {};
|
||||
|
||||
static CalculationResolutionContext from_computation_context(ComputationContext const& computation_context, PercentageBasis percentage_basis = {})
|
||||
{
|
||||
return {
|
||||
.percentage_basis = percentage_basis,
|
||||
.length_resolution_context = computation_context.length_resolution_context,
|
||||
.tree_counting_function_resolution_context = computation_context.tree_counting_function_resolution_context
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue