mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibWeb: Absolutize StyleValueList in StyleComputer::absolutize_values
This commit is contained in:
Notes:
github-actions[bot]
2025-08-06 16:46:14 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/ba4a57b34db Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5699 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -17,6 +17,17 @@ bool StyleValueList::Properties::operator==(Properties const& other) const
|
||||
return separator == other.separator && values.span() == other.values.span();
|
||||
}
|
||||
|
||||
ValueComparingNonnullRefPtr<CSSStyleValue const> StyleValueList::absolutized(CSSPixelRect const& viewport_rect, Length::FontMetrics const& font_metrics, Length::FontMetrics const& root_font_metrics) const
|
||||
{
|
||||
StyleValueVector absolutized_style_values;
|
||||
absolutized_style_values.ensure_capacity(m_properties.values.size());
|
||||
|
||||
for (auto const& value : m_properties.values)
|
||||
absolutized_style_values.append(value->absolutized(viewport_rect, font_metrics, root_font_metrics));
|
||||
|
||||
return StyleValueList::create(move(absolutized_style_values), m_properties.separator);
|
||||
}
|
||||
|
||||
String StyleValueList::to_string(SerializationMode mode) const
|
||||
{
|
||||
if (m_properties.values.is_empty())
|
||||
|
||||
Reference in New Issue
Block a user