Summary: | [Web Animations] Support multiple CSS Animations with the same name in animation-name | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antoine Quint <graouts> | ||||||||||
Component: | Animations | Assignee: | Antoine Quint <graouts> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | dino, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Antoine Quint
2020-01-23 11:38:20 PST
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> |