Skip to content

Commit e935dfb

Browse files
Calme1709AtkinsSJ
authored andcommitted
LibWeb: Simplify compute_style_value_list
1 parent 38efc39 commit e935dfb

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

Libraries/LibWeb/CSS/StyleComputer.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2820,18 +2820,12 @@ static CSSPixels snap_a_length_as_a_border_width(double device_pixels_per_css_pi
28202820

28212821
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)
28222822
{
2823-
// FIXME: This is required because our animation-* properties are not yet parsed as lists.
2824-
// Once that is fixed, every value here will be a StyleValueList.
2825-
if (style_value->is_value_list()) {
2826-
StyleValueVector computed_entries;
2823+
StyleValueVector computed_entries;
28272824

2828-
for (auto const& entry : style_value->as_value_list().values())
2829-
computed_entries.append(compute_entry(entry));
2825+
for (auto const& entry : style_value->as_value_list().values())
2826+
computed_entries.append(compute_entry(entry));
28302827

2831-
return StyleValueList::create(move(computed_entries), StyleValueList::Separator::Comma);
2832-
}
2833-
2834-
return compute_entry(style_value);
2828+
return StyleValueList::create(move(computed_entries), StyleValueList::Separator::Comma);
28352829
}
28362830

28372831
NonnullRefPtr<StyleValue const> StyleComputer::compute_value_of_property(

0 commit comments

Comments
 (0)