mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-24 00:49:46 +00:00
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:
parent
5b9a36b172
commit
f49cf75d44
Notes:
github-actions[bot]
2025-10-21 23:01:59 +00:00
Author: https://github.com/Calme1709
Commit: f49cf75d44
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6526
Reviewed-by: https://github.com/gmta ✅
40 changed files with 200 additions and 249 deletions
|
|
@ -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
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue