mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Simplify compute_style_value_list
This commit is contained in:
parent
3ab0bdf4fd
commit
51f694c6af
Notes:
github-actions[bot]
2025-12-01 10:18:05 +00:00
Author: https://github.com/Calme1709
Commit: 51f694c6af
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6972
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 4 additions and 8 deletions
|
|
@ -2807,16 +2807,12 @@ static CSSPixels snap_a_length_as_a_border_width(double device_pixels_per_css_pi
|
||||||
|
|
||||||
static NonnullRefPtr<StyleValue const> compute_style_value_list(NonnullRefPtr<StyleValue const> const& style_value, Function<NonnullRefPtr<StyleValue const>(NonnullRefPtr<StyleValue const> const&)> const& compute_entry)
|
static NonnullRefPtr<StyleValue const> compute_style_value_list(NonnullRefPtr<StyleValue const> const& style_value, Function<NonnullRefPtr<StyleValue const>(NonnullRefPtr<StyleValue const> const&)> const& compute_entry)
|
||||||
{
|
{
|
||||||
if (style_value->is_value_list()) {
|
StyleValueVector computed_entries;
|
||||||
StyleValueVector computed_entries;
|
|
||||||
|
|
||||||
for (auto const& entry : style_value->as_value_list().values())
|
for (auto const& entry : style_value->as_value_list().values())
|
||||||
computed_entries.append(compute_entry(entry));
|
computed_entries.append(compute_entry(entry));
|
||||||
|
|
||||||
return StyleValueList::create(move(computed_entries), StyleValueList::Separator::Comma);
|
return StyleValueList::create(move(computed_entries), StyleValueList::Separator::Comma);
|
||||||
}
|
|
||||||
|
|
||||||
return compute_entry(style_value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NonnullRefPtr<StyleValue const> StyleComputer::compute_value_of_property(
|
NonnullRefPtr<StyleValue const> StyleComputer::compute_value_of_property(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue