mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb/CSS: Allow non-StyleValueLists in animation properties
Reverts51f694c6afandb52beb5105. The animation-* properties are in an awkward place currently, where they *should* be lists, and a lot of our code acts as if they are, but actually we parse them as single values. The above commits caused a few WPT tests to crash - see link below. I've imported one of them to prevent future regressions. https://wpt.fyi/results/css/css-typed-om/the-stylepropertymap/properties?diff&filter=ADC&run_id=6293362870321152&run_id=5123272984494080
This commit is contained in:
parent
4d27e9aa5e
commit
d9abfdf2ab
Notes:
github-actions[bot]
2025-12-02 09:49:39 +00:00
Author: https://github.com/AtkinsSJ
Commit: d9abfdf2ab
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6987
4 changed files with 83 additions and 6 deletions
|
|
@ -2807,12 +2807,18 @@ 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)
|
||||
{
|
||||
StyleValueVector computed_entries;
|
||||
// FIXME: This is required because our animation-* properties are not yet parsed as lists.
|
||||
// Once that is fixed, every value here will be a StyleValueList.
|
||||
if (style_value->is_value_list()) {
|
||||
StyleValueVector computed_entries;
|
||||
|
||||
for (auto const& entry : style_value->as_value_list().values())
|
||||
computed_entries.append(compute_entry(entry));
|
||||
for (auto const& entry : style_value->as_value_list().values())
|
||||
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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue