Skip to content

Commit 51f694c

Browse files
Calme1709AtkinsSJ
authored andcommitted
LibWeb: Simplify compute_style_value_list
1 parent 3ab0bdf commit 51f694c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Libraries/LibWeb/CSS/StyleComputer.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2807,16 +2807,12 @@ static CSSPixels snap_a_length_as_a_border_width(double device_pixels_per_css_pi
28072807

28082808
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)
28092809
{
2810-
if (style_value->is_value_list()) {
2811-
StyleValueVector computed_entries;
2810+
StyleValueVector computed_entries;
28122811

2813-
for (auto const& entry : style_value->as_value_list().values())
2814-
computed_entries.append(compute_entry(entry));
2812+
for (auto const& entry : style_value->as_value_list().values())
2813+
computed_entries.append(compute_entry(entry));
28152814

2816-
return StyleValueList::create(move(computed_entries), StyleValueList::Separator::Comma);
2817-
}
2818-
2819-
return compute_entry(style_value);
2815+
return StyleValueList::create(move(computed_entries), StyleValueList::Separator::Comma);
28202816
}
28212817

28222818
NonnullRefPtr<StyleValue const> StyleComputer::compute_value_of_property(

0 commit comments

Comments
 (0)