mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 15:43:20 +00:00
LibWeb: Absolutize CalculatedSVs in StyleComputer::absolutize_values
This commit is contained in:
parent
9db3c66a85
commit
a2ceed27e2
Notes:
github-actions[bot]
2025-08-06 16:46:20 +00:00
Author: https://github.com/Calme1709
Commit: a2ceed27e2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5699
Reviewed-by: https://github.com/AtkinsSJ ✅
13 changed files with 49 additions and 40 deletions
|
@ -2661,6 +2661,17 @@ String CalculatedStyleValue::to_string(SerializationMode serialization_mode) con
|
|||
return serialize_a_math_function(m_calculation, m_context, serialization_mode);
|
||||
}
|
||||
|
||||
ValueComparingNonnullRefPtr<CSSStyleValue const> CalculatedStyleValue::absolutized(CSSPixelRect const& viewport_rect, Length::FontMetrics const& font_metrics, Length::FontMetrics const& root_font_metrics) const
|
||||
{
|
||||
Length::ResolutionContext length_resolution_context {
|
||||
.viewport_rect = viewport_rect,
|
||||
.font_metrics = font_metrics,
|
||||
.root_font_metrics = root_font_metrics
|
||||
};
|
||||
|
||||
return CalculatedStyleValue::create(simplify_a_calculation_tree(m_calculation, m_context, { .length_resolution_context = length_resolution_context }), m_resolved_type, m_context);
|
||||
}
|
||||
|
||||
bool CalculatedStyleValue::equals(CSSStyleValue const& other) const
|
||||
{
|
||||
if (type() != other.type())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue