mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Update absolutize to take a ComputationContext struct
This struct will in the future hold information other than a length resolution context (e.g. context for tree counting functions) and a single struct is easier to work with than multiple parameters.
This commit is contained in:
parent
47ffffb775
commit
52192a308b
Notes:
github-actions[bot]
2025-10-07 09:51:56 +00:00
Author: https://github.com/Calme1709
Commit: 52192a308b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6375
Reviewed-by: https://github.com/AtkinsSJ ✅
26 changed files with 146 additions and 113 deletions
|
|
@ -126,10 +126,14 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
auto const& computed_font_size = CSS::StyleComputer::compute_font_size(font_size, computed_math_depth, inherited_font_size, inherited_math_depth, length_resolution_context);
|
||||
auto const& computed_font_weight = CSS::StyleComputer::compute_font_weight(font_weight, inherited_font_weight, length_resolution_context);
|
||||
auto const& computed_font_width = CSS::StyleComputer::compute_font_width(font_width, length_resolution_context);
|
||||
auto const& computed_font_style = CSS::StyleComputer::compute_font_style(font_style, length_resolution_context);
|
||||
CSS::ComputationContext computation_context {
|
||||
.length_resolution_context = length_resolution_context
|
||||
};
|
||||
|
||||
auto const& computed_font_size = CSS::StyleComputer::compute_font_size(font_size, computed_math_depth, inherited_font_size, inherited_math_depth, computation_context);
|
||||
auto const& computed_font_weight = CSS::StyleComputer::compute_font_weight(font_weight, inherited_font_weight, computation_context);
|
||||
auto const& computed_font_width = CSS::StyleComputer::compute_font_width(font_width, computation_context);
|
||||
auto const& computed_font_style = CSS::StyleComputer::compute_font_style(font_style, computation_context);
|
||||
|
||||
return document->style_computer().compute_font_for_style_values(
|
||||
font_family,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue