mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-17 21:49:42 +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
|
@ -56,12 +56,12 @@ ValueComparingNonnullRefPtr<StyleValue const> ShadowStyleValue::spread_distance(
|
|||
return *m_properties.spread_distance;
|
||||
}
|
||||
|
||||
ValueComparingNonnullRefPtr<StyleValue const> ShadowStyleValue::absolutized(CSSPixelRect const& viewport_rect, Length::FontMetrics const& font_metrics, Length::FontMetrics const& root_font_metrics) const
|
||||
ValueComparingNonnullRefPtr<StyleValue const> ShadowStyleValue::absolutized(ComputationContext const& computation_context) const
|
||||
{
|
||||
auto absolutized_offset_x = offset_x()->absolutized(viewport_rect, font_metrics, root_font_metrics);
|
||||
auto absolutized_offset_y = offset_y()->absolutized(viewport_rect, font_metrics, root_font_metrics);
|
||||
auto absolutized_blur_radius = blur_radius()->absolutized(viewport_rect, font_metrics, root_font_metrics);
|
||||
auto absolutized_spread_distance = spread_distance()->absolutized(viewport_rect, font_metrics, root_font_metrics);
|
||||
auto absolutized_offset_x = offset_x()->absolutized(computation_context);
|
||||
auto absolutized_offset_y = offset_y()->absolutized(computation_context);
|
||||
auto absolutized_blur_radius = blur_radius()->absolutized(computation_context);
|
||||
auto absolutized_spread_distance = spread_distance()->absolutized(computation_context);
|
||||
return create(m_properties.shadow_type, color(), absolutized_offset_x, absolutized_offset_y, absolutized_blur_radius, absolutized_spread_distance, placement());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue