[Web Animations] Support multiple CSS Animations with the same name in animation-name
Created attachment 388572 [details] Patch
Created attachment 388577 [details] Patch
Created attachment 388578 [details] Patch
Created attachment 388660 [details] Patch
Comment on attachment 388660 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=388660&action=review > Source/WebCore/animation/AnimationTimeline.cpp:224 > + for (size_t i = 0; i < cssAnimationList->size(); ++i) { > + if (cssAnimationList->animation(i) == backingAnimation) { > + auto newAnimationList = cssAnimationList->copy(); > + newAnimationList->remove(i); > + keyframeEffectStack.setCSSAnimationList(WTFMove(newAnimationList)); > + return; > + } > + } Why don't you add a remove() to CSSAnimationList that accepts an Animation as a parameter? Is there a reason you don't want to edit the list in place?
(In reply to Dean Jackson from comment #5) > Comment on attachment 388660 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=388660&action=review > > > Source/WebCore/animation/AnimationTimeline.cpp:224 > > + for (size_t i = 0; i < cssAnimationList->size(); ++i) { > > + if (cssAnimationList->animation(i) == backingAnimation) { > > + auto newAnimationList = cssAnimationList->copy(); > > + newAnimationList->remove(i); > > + keyframeEffectStack.setCSSAnimationList(WTFMove(newAnimationList)); > > + return; > > + } > > + } > > Why don't you add a remove() to CSSAnimationList that accepts an Animation > as a parameter? Is there a reason you don't want to edit the list in place? Yes, it comes down from RenderStyle as const.
Committed r255076: <https://trac.webkit.org/changeset/255076>
<rdar://problem/58870279>