Skip to content

Commit

Permalink
Index test in generated animation list apply functions is wrong way r…
Browse files Browse the repository at this point in the history
…ound

https://bugs.webkit.org/show_bug.cgi?id=265124
rdar://118644028

Reviewed by Tim Nguyen.

* Source/WebCore/css/process-css-properties.py:

We are adding unnecessary entries to the list and then later trimming them.

Canonical link: https://commits.webkit.org/270973@main
  • Loading branch information
anttijk committed Nov 20, 2023
1 parent cdf6403 commit 3d1b2eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebCore/css/process-css-properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -3361,7 +3361,7 @@ def _generate_animation_property_value_setter(self, to, property):
to.write(f"if (is<CSSValueList>(value)) {{")
to.write(f" // Walk each value and put it into an animation, creating new animations as needed.")
to.write(f" for (auto& currentValue : downcast<CSSValueList>(value)) {{")
to.write(f" if (childIndex <= list.size())")
to.write(f" if (childIndex >= list.size())")
to.write(f" list.append(Animation::create());")
to.write(f" builderState.styleMap().mapAnimation{property.name_for_methods}(list.animation(childIndex), currentValue);")
to.write(f" ++childIndex;")
Expand Down

0 comments on commit 3d1b2eb

Please sign in to comment.