mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-24 05:25:13 +00:00
LibWeb: Handle single value properties when normalizing transition lists
Previously, if a transition property was not wrapped in a list, it would be replaced with the default value in `StyleComputer::compute_transitioned_properties`.
This commit is contained in:
parent
1f8f3804a3
commit
7a391f419a
Notes:
github-actions[bot]
2025-04-23 20:04:22 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/7a391f419a1 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4387 Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 6 additions and 0 deletions
|
@ -1342,6 +1342,12 @@ static void compute_transitioned_properties(ComputedProperties const& style, DOM
|
|||
auto const* style_value = style.maybe_null_property(property);
|
||||
StyleValueVector list;
|
||||
|
||||
if (style_value && !style_value->is_value_list()) {
|
||||
for (size_t i = 0; i < properties.size(); i++)
|
||||
list.append(*style_value);
|
||||
return list;
|
||||
}
|
||||
|
||||
if (!style_value || !style_value->is_value_list() || style_value->as_value_list().size() == 0) {
|
||||
auto default_value = make_default_value();
|
||||
for (size_t i = 0; i < properties.size(); i++)
|
||||
|
|
Loading…
Add table
Reference in a new issue