LibWeb: Don't pass unnecessary PropertyComputationDependencies struct

Since we now have access to the `AbstractElement` through the
`ComputationContext` we can just set the flag that this element relies
on tree counting functions directly, no need to pass this struct around.
This commit is contained in:
Callum Law 2025-10-22 00:48:32 +13:00 committed by Jelle Raaijmakers
commit f49cf75d44
Notes: github-actions[bot] 2025-10-21 23:01:59 +00:00
40 changed files with 200 additions and 249 deletions

View file

@ -84,7 +84,7 @@ String EasingStyleValue::Function::to_string(SerializationMode mode) const
});
}
ValueComparingNonnullRefPtr<StyleValue const> EasingStyleValue::absolutized(ComputationContext const& computation_context, PropertyComputationDependencies& property_computation_dependencies) const
ValueComparingNonnullRefPtr<StyleValue const> EasingStyleValue::absolutized(ComputationContext const& computation_context) const
{
auto const& absolutized_function = m_function.visit(
[&](Linear const& linear) -> Function {
@ -94,24 +94,24 @@ ValueComparingNonnullRefPtr<StyleValue const> EasingStyleValue::absolutized(Comp
RefPtr<StyleValue const> absolutized_input;
if (stop.input)
absolutized_input = stop.input->absolutized(computation_context, property_computation_dependencies);
absolutized_input = stop.input->absolutized(computation_context);
absolutized_stops.append({ stop.output->absolutized(computation_context, property_computation_dependencies), absolutized_input });
absolutized_stops.append({ stop.output->absolutized(computation_context), absolutized_input });
}
return Linear { absolutized_stops };
},
[&](CubicBezier const& cubic_bezier) -> Function {
return CubicBezier {
cubic_bezier.x1->absolutized(computation_context, property_computation_dependencies),
cubic_bezier.y1->absolutized(computation_context, property_computation_dependencies),
cubic_bezier.x2->absolutized(computation_context, property_computation_dependencies),
cubic_bezier.y2->absolutized(computation_context, property_computation_dependencies)
cubic_bezier.x1->absolutized(computation_context),
cubic_bezier.y1->absolutized(computation_context),
cubic_bezier.x2->absolutized(computation_context),
cubic_bezier.y2->absolutized(computation_context)
};
},
[&](Steps const& steps) -> Function {
return Steps {
steps.number_of_intervals->absolutized(computation_context, property_computation_dependencies),
steps.number_of_intervals->absolutized(computation_context),
steps.position
};
});